From c0699ea2afd5323922163b469d211dd2c0b93528 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Fri, 26 Jun 2026 15:15:39 +0200 Subject: [PATCH 01/11] phase 0-2 --- .../wit/deps/golem-core-v2/golem-core-v2.wit | 41 +- .../proto/golem/schema/schema.proto | 40 +- .../src/schema/tests/binary_codec_tests.rs | 21 + golem-common/src/schema/tests/mod.rs | 96 + .../src/schema/tests/protobuf_tests.rs | 37 + golem-common/src/schema/tests/wit_tests.rs | 47 +- golem-common/src/schema/tool/mod.rs | 36 +- golem-common/src/schema/tool/tests.rs | 1046 ++++++- golem-common/src/schema/tool/validation.rs | 597 +++- golem-common/src/schema/tool/wit.rs | 48 +- golem-common/src/schema/validation/mod.rs | 2 +- .../validation/tests/wellformed_strategy.rs | 22 +- .../wit/deps/golem-core-v2/golem-core-v2.wit | 41 +- golem-common/wit/deps/golem-tool/common.wit | 51 +- golem-schema-derive/src/codegen/poem.rs | 6 +- golem-schema/src/schema/protobuf.rs | 124 +- golem-schema/src/schema/schema_type.rs | 574 +++- golem-schema/src/schema/validation/mod.rs | 2 +- .../src/schema/validation/subtyping.rs | 266 +- .../validation/tests/subtyping_tests.rs | 95 +- .../schema/validation/tests/value_tests.rs | 150 +- .../validation/tests/well_formedness_tests.rs | 293 +- .../validation/tests/wellformed_strategy.rs | 22 +- golem-schema/src/schema/validation/value.rs | 173 +- .../src/schema/validation/well_formedness.rs | 160 +- golem-schema/src/schema/wit/decode.rs | 78 +- golem-schema/src/schema/wit/encode.rs | 62 +- .../wit/deps/golem-core-v2/golem-core-v2.wit | 41 +- .../wit/deps/golem-core-v2/golem-core-v2.wit | 41 +- .../golem_sdk/wit/deps/golem-tool/common.wit | 51 +- sdks/rust/golem-rust/src/agentic/errors.rs | 30 + .../src/agentic/extended_tool_type.rs | 2458 +++++++++++++++++ sdks/rust/golem-rust/src/agentic/mod.rs | 8 + sdks/rust/golem-rust/src/agentic/tool_impl.rs | 13 +- .../golem-rust/src/agentic/tool_refinement.rs | 161 ++ .../golem-rust/src/agentic/tool_registry.rs | 103 + sdks/rust/golem-rust/tests/agent.rs | 4 +- .../wit/deps/golem-core-v2/golem-core-v2.wit | 41 +- .../golem-rust/wit/deps/golem-tool/common.wit | 51 +- .../wit/deps/golem-core-v2/golem-core-v2.wit | 41 +- sdks/scala/wit/deps/golem-tool/common.wit | 51 +- .../wit/deps/golem-core-v2/golem-core-v2.wit | 41 +- sdks/ts/wit/deps/golem-tool/common.wit | 51 +- wit/deps/golem-core-v2/golem-core-v2.wit | 41 +- wit/deps/golem-tool/common.wit | 51 +- 45 files changed, 6950 insertions(+), 458 deletions(-) create mode 100644 sdks/rust/golem-rust/src/agentic/extended_tool_type.rs create mode 100644 sdks/rust/golem-rust/src/agentic/tool_refinement.rs create mode 100644 sdks/rust/golem-rust/src/agentic/tool_registry.rs diff --git a/cli/golem-cli/wit/deps/golem-core-v2/golem-core-v2.wit b/cli/golem-cli/wit/deps/golem-core-v2/golem-core-v2.wit index 950c5c843b..c2a4bd4b4d 100644 --- a/cli/golem-cli/wit/deps/golem-core-v2/golem-core-v2.wit +++ b/cli/golem-cli/wit/deps/golem-core-v2/golem-core-v2.wit @@ -221,16 +221,16 @@ interface types { // --- Primitives --- bool-type, - s8-type, - s16-type, - s32-type, - s64-type, - u8-type, - u16-type, - u32-type, - u64-type, - f32-type, - f64-type, + s8-type(option), + s16-type(option), + s32-type(option), + s64-type(option), + u8-type(option), + u16-type(option), + u32-type(option), + u64-type(option), + f32-type(option), + f64-type(option), char-type, string-type, @@ -296,6 +296,27 @@ interface types { err: option, } + // --- Numeric restrictions --- + + /// A numeric bound usable across every numeric representation. Float bounds + /// carry canonical IEEE-754 `f64` bits (NaN/inf rejected, -0.0 normalized); + /// comparisons decode the bits to `f64` and compare numerically. + variant numeric-bound { + signed(s64), + unsigned(u64), + float-bits(u64), + } + + /// Inline numeric refinement. `none` on a numeric type means unconstrained + /// (the common case). The empty restriction set is never encoded as `some`: + /// producers normalize it to `none`, decoders normalize a decoded empty to + /// `none`. `unit` is schema/help metadata only. + record numeric-restrictions { + min: option, + max: option, + unit: option, + } + // --- Text / Binary restrictions --- record text-restrictions { diff --git a/golem-api-grpc/proto/golem/schema/schema.proto b/golem-api-grpc/proto/golem/schema/schema.proto index f31e4d07c5..da8b4cf262 100644 --- a/golem-api-grpc/proto/golem/schema/schema.proto +++ b/golem-api-grpc/proto/golem/schema/schema.proto @@ -58,16 +58,16 @@ message SchemaType { // Primitives golem.common.Empty bool_type = 3; - golem.common.Empty s8_type = 4; - golem.common.Empty s16_type = 5; - golem.common.Empty s32_type = 6; - golem.common.Empty s64_type = 7; - golem.common.Empty u8_type = 8; - golem.common.Empty u16_type = 9; - golem.common.Empty u32_type = 10; - golem.common.Empty u64_type = 11; - golem.common.Empty f32_type = 12; - golem.common.Empty f64_type = 13; + NumericRestrictions s8_type = 4; + NumericRestrictions s16_type = 5; + NumericRestrictions s32_type = 6; + NumericRestrictions s64_type = 7; + NumericRestrictions u8_type = 8; + NumericRestrictions u16_type = 9; + NumericRestrictions u32_type = 10; + NumericRestrictions u64_type = 11; + NumericRestrictions f32_type = 12; + NumericRestrictions f64_type = 13; golem.common.Empty char_type = 14; golem.common.Empty string_type = 15; @@ -162,6 +162,26 @@ message ResultType { SchemaType err = 2; } +// A numeric bound usable across every numeric representation. Float bounds +// carry canonical IEEE-754 f64 bits (NaN/inf rejected, -0.0 normalized). +message NumericBound { + oneof bound { + int64 signed = 1; + uint64 unsigned = 2; + uint64 float_bits = 3; + } +} + +// Inline numeric refinement. A present message with no fields set decodes to +// `None` (the empty restriction set is never kept as `Some`). `unit` is +// schema/help metadata only. +message NumericRestrictions { + // Absent min/max (message not set) means unbounded on that side. + NumericBound min = 1; + NumericBound max = 2; + optional string unit = 3; +} + message TextRestrictions { // Absent `languages` means unrestricted. StringList languages = 1; diff --git a/golem-common/src/schema/tests/binary_codec_tests.rs b/golem-common/src/schema/tests/binary_codec_tests.rs index 6a2ba0147b..91e7a38017 100644 --- a/golem-common/src/schema/tests/binary_codec_tests.rs +++ b/golem-common/src/schema/tests/binary_codec_tests.rs @@ -59,3 +59,24 @@ proptest! { ); } } + +/// Deterministic numeric-restriction vectors round-trip through the desert +/// `BinaryCodec` exactly. Adjacent payloadless variants (`bool`/`char`/`string`) +/// are included to prove the codec stays internally consistent after the numeric +/// variants gained an `Option` payload. +#[test] +fn numeric_restrictions_binary_codec_golden_round_trip() { + use crate::schema::schema_type::SchemaType; + + for (label, ty) in crate::schema::tests::golden_numeric_schema_types() { + let graph = SchemaGraph::anonymous(ty); + let back: SchemaGraph = roundtrip(&graph); + assert_eq!(graph, back, "binary numeric golden mismatch: {label}"); + } + + for adjacent in [SchemaType::bool(), SchemaType::char(), SchemaType::string()] { + let graph = SchemaGraph::anonymous(adjacent); + let back: SchemaGraph = roundtrip(&graph); + assert_eq!(graph, back); + } +} diff --git a/golem-common/src/schema/tests/mod.rs b/golem-common/src/schema/tests/mod.rs index 71478b52e6..a8c372675c 100644 --- a/golem-common/src/schema/tests/mod.rs +++ b/golem-common/src/schema/tests/mod.rs @@ -20,3 +20,99 @@ mod protobuf_tests; mod schema_derive_tests; #[cfg(feature = "full")] mod wit_tests; + +/// Deterministic cross-SDK numeric-restriction vectors, shared by the protobuf, +/// WIT, and binary codec round-trip tests. Every entry is already normalized +/// (no `Some(empty)`), so each codec must preserve it exactly. Empty → `None` +/// normalization is covered separately by the per-codec decode-boundary tests. +#[cfg(feature = "full")] +pub(crate) fn golden_numeric_schema_types() +-> Vec<(&'static str, crate::schema::schema_type::SchemaType)> { + use crate::schema::metadata::MetadataEnvelope; + use crate::schema::schema_type::{NumericBound, NumericRestrictions, SchemaType}; + + fn restr( + min: Option, + max: Option, + unit: Option<&str>, + ) -> Option { + NumericRestrictions { + min, + max, + unit: unit.map(|u| u.to_string()), + } + .normalize() + } + + macro_rules! numeric { + ($variant:ident, $r:expr) => { + SchemaType::$variant { + restrictions: $r, + metadata: MetadataEnvelope::default(), + } + }; + } + + let u = NumericBound::Unsigned; + let s = NumericBound::Signed; + let f = |v: f64| NumericBound::float(v).expect("finite bound"); + + vec![ + // bare u32 (None) — the unconstrained hot-path case + ("u32 bare", SchemaType::u32()), + // u32 min=1 + ("u32 min=1", numeric!(U32, restr(Some(u(1)), None, None))), + ( + "u32 min=1 +unit", + numeric!(U32, restr(Some(u(1)), None, Some("items"))), + ), + // u32 bounds=(0,100) + ( + "u32 bounds=(0,100)", + numeric!(U32, restr(Some(u(0)), Some(u(100)), None)), + ), + ( + "u32 bounds=(0,100) +unit", + numeric!(U32, restr(Some(u(0)), Some(u(100)), Some("percent"))), + ), + // s64 bounds=(0, i64::MAX) + ( + "s64 bounds=(0,i64::MAX)", + numeric!(S64, restr(Some(s(0)), Some(s(i64::MAX)), None)), + ), + ( + "s64 bounds=(0,i64::MAX) +unit", + numeric!(S64, restr(Some(s(0)), Some(s(i64::MAX)), Some("ns"))), + ), + // u64 near u64::MAX + ( + "u64 near u64::MAX", + numeric!(U64, restr(Some(u(u64::MAX - 1)), Some(u(u64::MAX)), None)), + ), + ( + "u64 near u64::MAX +unit", + numeric!( + U64, + restr(Some(u(u64::MAX - 1)), Some(u(u64::MAX)), Some("bytes")) + ), + ), + // f64 min=0.0 + ( + "f64 min=0.0", + numeric!(F64, restr(Some(f(0.0)), None, None)), + ), + ( + "f64 min=0.0 +unit", + numeric!(F64, restr(Some(f(0.0)), None, Some("seconds"))), + ), + // s8 / f32 coverage for the desert variant-payload change + ( + "s8 bounds=(-1,1)", + numeric!(S8, restr(Some(s(-1)), Some(s(1)), None)), + ), + ( + "f32 max=1.5", + numeric!(F32, restr(None, Some(f(1.5)), None)), + ), + ] +} diff --git a/golem-common/src/schema/tests/protobuf_tests.rs b/golem-common/src/schema/tests/protobuf_tests.rs index 12f0ab55af..42c8e2652b 100644 --- a/golem-common/src/schema/tests/protobuf_tests.rs +++ b/golem-common/src/schema/tests/protobuf_tests.rs @@ -188,3 +188,40 @@ fn field_source_round_trips() { assert_eq!(source, back); } } + +/// Deterministic numeric-restriction vectors round-trip through the protobuf +/// mirror exactly. +#[test] +fn numeric_restrictions_proto_golden_round_trip() { + for (label, ty) in crate::schema::tests::golden_numeric_schema_types() { + let graph = SchemaGraph::anonymous(ty); + let proto: golem_api_grpc::proto::golem::schema::SchemaGraph = graph.clone().into(); + let back: SchemaGraph = proto.try_into().expect("decode"); + assert_eq!(graph, back, "proto numeric golden mismatch: {label}"); + } +} + +/// A stored `Some(empty)` numeric restriction normalizes to `None` when it +/// crosses the protobuf decode boundary (covers both `unit: None` and the +/// empty-string `unit` case). +#[test] +fn numeric_empty_restrictions_normalize_to_none_proto() { + use crate::schema::schema_type::{NumericRestrictions, SchemaType}; + + for empty in [ + NumericRestrictions::default(), + NumericRestrictions { + min: None, + max: None, + unit: Some(String::new()), + }, + ] { + let graph = SchemaGraph::anonymous(SchemaType::U32 { + restrictions: Some(empty), + metadata: MetadataEnvelope::default(), + }); + let proto: golem_api_grpc::proto::golem::schema::SchemaGraph = graph.into(); + let back: SchemaGraph = proto.try_into().expect("decode"); + assert_eq!(back.root.numeric_restrictions(), None); + } +} diff --git a/golem-common/src/schema/tests/wit_tests.rs b/golem-common/src/schema/tests/wit_tests.rs index 5431e91678..4495e03ada 100644 --- a/golem-common/src/schema/tests/wit_tests.rs +++ b/golem-common/src/schema/tests/wit_tests.rs @@ -103,11 +103,56 @@ fn unknown_ref_is_rejected_on_encode() { assert!(matches!(err, EncodeError::UnknownTypeId(_))); } +/// Deterministic numeric-restriction vectors round-trip through the WIT codec +/// exactly. +#[test] +fn numeric_restrictions_wit_golden_round_trip() { + for (label, ty) in crate::schema::tests::golden_numeric_schema_types() { + let graph = SchemaGraph::anonymous(ty); + let wire = encode_graph(&graph).expect("encode"); + let back = decode_graph(&wire).expect("decode"); + assert_eq!(graph, back, "wit numeric golden mismatch: {label}"); + } +} + +/// A `some(empty)` numeric restriction on the WIT wire normalizes to `None` when +/// decoded, both through the native encode path and a hand-built wire payload +/// carrying an empty-string `unit`. +#[test] +fn numeric_empty_restrictions_normalize_to_none_wit() { + use crate::schema::schema_type::{NumericRestrictions, SchemaType}; + + // Native Some(empty) encodes as some(empty wire) and decodes back to None. + let graph = SchemaGraph::anonymous(SchemaType::U32 { + restrictions: Some(NumericRestrictions::default()), + metadata: Default::default(), + }); + let wire = encode_graph(&graph).expect("encode"); + let back = decode_graph(&wire).expect("decode"); + assert_eq!(back.root.numeric_restrictions(), None); + + // A hand-built wire payload with an empty-string unit also normalizes away. + let wire_graph = wire::SchemaGraph { + type_nodes: vec![wire::SchemaTypeNode { + body: wire::SchemaTypeBody::U32Type(Some(wire::NumericRestrictions { + min: None, + max: None, + unit: Some(String::new()), + })), + metadata: empty_metadata(), + }], + defs: vec![], + root: 0, + }; + let back = decode_graph(&wire_graph).expect("decode"); + assert_eq!(back.root.numeric_restrictions(), None); +} + #[test] fn duplicate_def_id_is_rejected_on_decode() { let graph = wire::SchemaGraph { type_nodes: vec![wire::SchemaTypeNode { - body: wire::SchemaTypeBody::S32Type, + body: wire::SchemaTypeBody::S32Type(None), metadata: empty_metadata(), }], defs: vec![ diff --git a/golem-common/src/schema/tool/mod.rs b/golem-common/src/schema/tool/mod.rs index ce84961c3b..bf363101e5 100644 --- a/golem-common/src/schema/tool/mod.rs +++ b/golem-common/src/schema/tool/mod.rs @@ -139,6 +139,8 @@ pub struct Positional { /// Default value, interpreted against [`type_`](Self::type_). pub default: Option, pub required: bool, + /// If true, the positional's value may be read from standard input. + pub accepts_stdio: bool, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -154,6 +156,8 @@ pub struct TailPositional { pub separator: Option, /// If true, tokens after `separator` are not flag-parsed. pub verbatim: bool, + /// If true, the tail items may be read from standard input. + pub accepts_stdio: bool, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -176,15 +180,37 @@ pub enum OptionShape { Scalar(SchemaType), /// Bare presence collapses to `default`; with value parses normally. OptionalScalar(SchemaType), - /// Repeatable; value type in the derived signature is list-of-scalar. - Repeatable(RepeatableShape), + /// Repeatable scalar option (`-e a -e b`); the collected value is a list + /// of the element type. + RepeatableList(RepeatableListShape), + /// Repeatable key-value option (`-c a=1 -c b=2`); the collected value is a + /// [`SchemaType::Map`], never a `list`. + RepeatableMap(RepeatableMapShape), } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -pub struct RepeatableShape { +pub struct RepeatableListShape { pub repetition: Repetition, - /// Schema of a single item. - pub type_: SchemaType, + /// Schema of a single collected element. + pub item_type: SchemaType, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +pub struct RepeatableMapShape { + pub repetition: Repetition, + /// A [`SchemaType::Map`] node; the collected value is this map. + pub map_type: SchemaType, + /// What happens when the same key is supplied more than once. + pub duplicate_key_policy: DuplicateKeyPolicy, +} + +/// Resolution policy for a repeated key in a [`OptionShape::RepeatableMap`]. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +pub enum DuplicateKeyPolicy { + /// A repeated key is a usage error. + Reject, + /// A repeated key takes the last supplied value. + LastWins, } #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] diff --git a/golem-common/src/schema/tool/tests.rs b/golem-common/src/schema/tool/tests.rs index 4631809e32..fa6c6975a5 100644 --- a/golem-common/src/schema/tool/tests.rs +++ b/golem-common/src/schema/tool/tests.rs @@ -20,7 +20,10 @@ use crate::schema::metadata::TypeId; use crate::schema::proptest_strategies::{ schema_graph_strategy, transportable_schema_value_strategy, }; -use crate::schema::schema_type::{NamedFieldType, SchemaType, VariantCaseType}; +use crate::schema::schema_type::{ + DiscriminatorRule, NamedFieldType, NumericBound, NumericRestrictions, SchemaType, UnionBranch, + UnionSpec, VariantCaseType, +}; use crate::schema::schema_value::SchemaValue; use proptest::prelude::*; use test_r::test; @@ -131,6 +134,7 @@ fn kitchen_sink_tool() -> Tool { type_: color_ref.clone(), default: Some(SchemaValue::Enum { case: 0 }), required: true, + accepts_stdio: false, }], tail: Some(TailPositional { name: "rest".to_string(), @@ -141,6 +145,7 @@ fn kitchen_sink_tool() -> Tool { max: Some(3), separator: Some("--".to_string()), verbatim: true, + accepts_stdio: true, }), }; body.options = vec![ @@ -161,9 +166,24 @@ fn kitchen_sink_tool() -> Tool { aliases: Vec::new(), doc: Doc::default(), value_name: None, - shape: OptionShape::Repeatable(RepeatableShape { + shape: OptionShape::RepeatableList(RepeatableListShape { repetition: Repetition::Either(','), - type_: SchemaType::string(), + item_type: SchemaType::string(), + }), + default: None, + required: false, + env_var: None, + }, + OptionSpec { + long: "config".to_string(), + short: Some('c'), + aliases: Vec::new(), + doc: Doc::default(), + value_name: Some("KEY=VALUE".to_string()), + shape: OptionShape::RepeatableMap(RepeatableMapShape { + repetition: Repetition::Repeated, + map_type: SchemaType::map(SchemaType::string(), SchemaType::string()), + duplicate_key_policy: DuplicateKeyPolicy::LastWins, }), default: None, required: false, @@ -306,6 +326,35 @@ fn rich_tool_without_input_variant_is_valid() { assert_eq!(validate_tool(&tool), Ok(())); } +#[test] +fn repeatable_map_value_is_uses_resolved_map_value_type() { + let map_id = TypeId::new("config-map"); + let mut cfg = scalar_option("config", SchemaType::string()); + cfg.shape = OptionShape::RepeatableMap(RepeatableMapShape { + repetition: Repetition::Repeated, + map_type: SchemaType::ref_to(map_id.clone()), + duplicate_key_policy: DuplicateKeyPolicy::Reject, + }); + + let mut body = empty_body(); + body.options = vec![cfg]; + body.constraints = vec![Constraint::RequiresAll(vec![Ref::ValueIs(ValueIsRef { + name: "config".to_string(), + value: SchemaValue::U32(1), + })])]; + + let mut node = root("tool"); + node.body = Some(body); + let mut tool = tool_with_root(node); + tool.schema.defs = vec![SchemaTypeDef { + id: map_id, + name: Some("ConfigMap".to_string()), + body: SchemaType::map(SchemaType::string(), SchemaType::u32()), + }]; + + assert_eq!(validate_tool(&tool), Ok(())); +} + // --- validation: failures --- #[test] @@ -506,6 +555,7 @@ fn verbatim_tail_without_separator_is_rejected() { max: None, separator: None, verbatim: true, + accepts_stdio: false, }), }; let mut node = root("tool"); @@ -530,6 +580,7 @@ fn variant_in_input_position_is_rejected() { type_: SchemaType::variant(vec![variant_case("ok", None)]), default: None, required: true, + accepts_stdio: false, }], tail: None, }; @@ -637,6 +688,7 @@ fn positional_default_type_mismatch_is_rejected() { type_: SchemaType::s64(), default: Some(SchemaValue::String("nope".to_string())), required: false, + accepts_stdio: false, }], tail: None, }; @@ -655,9 +707,9 @@ fn repeatable_scalar_default_is_rejected() { // A repeatable option's default must be a list of element values, not a // bare element. let mut inc = scalar_option("inc", SchemaType::string()); - inc.shape = OptionShape::Repeatable(RepeatableShape { + inc.shape = OptionShape::RepeatableList(RepeatableListShape { repetition: Repetition::Repeated, - type_: SchemaType::string(), + item_type: SchemaType::string(), }); inc.default = Some(SchemaValue::String("x".to_string())); let mut body = empty_body(); @@ -675,9 +727,9 @@ fn repeatable_scalar_default_is_rejected() { #[test] fn repeatable_list_default_is_accepted() { let mut inc = scalar_option("inc", SchemaType::string()); - inc.shape = OptionShape::Repeatable(RepeatableShape { + inc.shape = OptionShape::RepeatableList(RepeatableListShape { repetition: Repetition::Repeated, - type_: SchemaType::string(), + item_type: SchemaType::string(), }); inc.default = Some(SchemaValue::List { elements: vec![SchemaValue::String("x".to_string())], @@ -690,6 +742,156 @@ fn repeatable_list_default_is_accepted() { assert_eq!(validate_tool(&tool), Ok(())); } +#[test] +fn repeatable_map_default_must_be_a_map() { + // A repeatable-map option's default must be the collected map value, not a + // bare element. + let mut cfg = scalar_option("config", SchemaType::string()); + cfg.shape = OptionShape::RepeatableMap(RepeatableMapShape { + repetition: Repetition::Repeated, + map_type: SchemaType::map(SchemaType::string(), SchemaType::string()), + duplicate_key_policy: DuplicateKeyPolicy::Reject, + }); + cfg.default = Some(SchemaValue::String("x".to_string())); + let mut body = empty_body(); + body.options = vec![cfg]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + let errors = validate_tool(&tool).unwrap_err(); + assert!(errors.iter().any(|e| matches!( + e, + ToolValidationError::DefaultTypeMismatch { name, .. } if name == "config" + ))); +} + +#[test] +fn repeatable_map_type_must_be_a_map() { + // A repeatable-map option whose stored `map_type` is not a Map node is + // rejected: the collected key-value value must be a map. + let mut cfg = scalar_option("config", SchemaType::string()); + cfg.shape = OptionShape::RepeatableMap(RepeatableMapShape { + repetition: Repetition::Repeated, + map_type: SchemaType::string(), + duplicate_key_policy: DuplicateKeyPolicy::Reject, + }); + let mut body = empty_body(); + body.options = vec![cfg]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + let errors = validate_tool(&tool).unwrap_err(); + assert!(errors.iter().any(|e| matches!( + e, + ToolValidationError::RepeatableMapTypeNotMap { name, .. } if name == "config" + ))); +} + +#[test] +fn dangling_ref_inside_non_map_repeatable_map_type_does_not_hide_not_map_error() { + let mut cfg = scalar_option("config", SchemaType::string()); + cfg.shape = OptionShape::RepeatableMap(RepeatableMapShape { + repetition: Repetition::Repeated, + map_type: SchemaType::record(vec![record_field( + "missing", + SchemaType::ref_to(TypeId::new("missing")), + )]), + duplicate_key_policy: DuplicateKeyPolicy::Reject, + }); + + let mut body = empty_body(); + body.options = vec![cfg]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { command, position, id } + if command == "tool" && position == "config" && id == "missing" + )), + "expected unresolved ref at config, got {errors:?}" + ); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::RepeatableMapTypeNotMap { command, name } + if command == "tool" && name == "config" + )), + "expected repeatable-map not-map error at config, got {errors:?}" + ); +} + +#[test] +fn ill_formed_numeric_input_schema_is_rejected() { + let mut body = empty_body(); + body.options = vec![scalar_option( + "count", + SchemaType::U32 { + restrictions: Some(NumericRestrictions { + min: Some(NumericBound::Unsigned(10)), + max: Some(NumericBound::Unsigned(1)), + unit: None, + }), + metadata: Default::default(), + }, + )]; + + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + + let errors = validate_tool(&tool).unwrap_err(); + assert!(!errors.is_empty()); +} + +#[test] +fn global_repeatable_map_validates_map_key_refs() { + let mut cfg = scalar_option("config", SchemaType::string()); + cfg.shape = OptionShape::RepeatableMap(RepeatableMapShape { + repetition: Repetition::Repeated, + map_type: SchemaType::map( + SchemaType::ref_to(TypeId::new("missing-key")), + SchemaType::string(), + ), + duplicate_key_policy: DuplicateKeyPolicy::Reject, + }); + + let mut node = root("tool"); + node.globals.options = vec![cfg]; + let tool = tool_with_root(node); + + let errors = validate_tool(&tool).unwrap_err(); + assert!(errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { id, .. } if id == "missing-key" + ))); +} + +#[test] +fn repeatable_map_default_is_accepted() { + let mut cfg = scalar_option("config", SchemaType::string()); + cfg.shape = OptionShape::RepeatableMap(RepeatableMapShape { + repetition: Repetition::Repeated, + map_type: SchemaType::map(SchemaType::string(), SchemaType::string()), + duplicate_key_policy: DuplicateKeyPolicy::LastWins, + }); + cfg.default = Some(SchemaValue::Map { + entries: vec![( + SchemaValue::String("a".to_string()), + SchemaValue::String("1".to_string()), + )], + }); + let mut body = empty_body(); + body.options = vec![cfg]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + assert_eq!(validate_tool(&tool), Ok(())); +} + #[test] fn dangling_type_ref_is_rejected() { // An option referencing a type id that has no definition in the graph. @@ -708,6 +910,537 @@ fn dangling_type_ref_is_rejected() { ))); } +#[test] +fn pure_recursive_alias_input_type_is_rejected() { + let id = TypeId::new("cycle"); + let mut body = empty_body(); + body.options = vec![scalar_option("arg", SchemaType::ref_to(id.clone()))]; + let mut node = root("tool"); + node.body = Some(body); + let mut tool = tool_with_root(node); + tool.schema.defs = vec![SchemaTypeDef { + id: id.clone(), + name: Some("Cycle".to_string()), + body: SchemaType::ref_to(id), + }]; + + assert!( + validate_tool(&tool).is_err(), + "a pure recursive alias never resolves to a concrete input type and must be rejected" + ); +} + +#[test] +fn pure_recursive_alias_input_type_is_reported_once_at_input_position() { + let id = TypeId::new("cycle"); + let mut body = empty_body(); + body.options = vec![scalar_option("arg", SchemaType::ref_to(id.clone()))]; + let mut node = root("tool"); + node.body = Some(body); + let mut tool = tool_with_root(node); + tool.schema.defs = vec![SchemaTypeDef { + id: id.clone(), + name: Some("Cycle".to_string()), + body: SchemaType::ref_to(id), + }]; + + let errors = validate_tool(&tool).expect_err("recursive alias must be rejected"); + let recursive_alias_errors = errors + .iter() + .filter(|e| { + matches!( + e, + ToolValidationError::IllFormedSchema { detail, .. } + if detail.contains("reference cycle with no concrete type") + ) + }) + .collect::>(); + assert_eq!( + recursive_alias_errors, + vec![&ToolValidationError::IllFormedSchema { + command: "tool".to_string(), + position: "arg".to_string(), + detail: "type reference `cycle` forms a reference cycle with no concrete type" + .to_string(), + }], + "recursive alias should be reported once at the input that uses it, got {errors:?}" + ); +} + +#[test] +fn mutual_recursive_alias_input_type_is_reported_once_at_input_position() { + let a = TypeId::new("a"); + let b = TypeId::new("b"); + + let mut body = empty_body(); + body.options = vec![scalar_option("arg", SchemaType::ref_to(a.clone()))]; + let mut node = root("tool"); + node.body = Some(body); + let mut tool = tool_with_root(node); + tool.schema.defs = vec![ + SchemaTypeDef { + id: a.clone(), + name: Some("A".to_string()), + body: SchemaType::ref_to(b.clone()), + }, + SchemaTypeDef { + id: b, + name: Some("B".to_string()), + body: SchemaType::ref_to(a), + }, + ]; + + let errors = validate_tool(&tool).expect_err("recursive alias must be rejected"); + let recursive_alias_errors = errors + .iter() + .filter(|e| { + matches!( + e, + ToolValidationError::IllFormedSchema { detail, .. } + if detail.contains("reference cycle with no concrete type") + ) + }) + .collect::>(); + assert_eq!( + recursive_alias_errors, + vec![&ToolValidationError::IllFormedSchema { + command: "tool".to_string(), + position: "arg".to_string(), + detail: "type reference `a` forms a reference cycle with no concrete type".to_string(), + }], + "mutual recursive alias should be reported once at the input that uses it, got {errors:?}" + ); +} + +#[test] +fn dangling_type_ref_with_default_reports_only_unresolved_type_ref() { + let mut opt = scalar_option("out", SchemaType::ref_to(TypeId::new("missing"))); + opt.default = Some(SchemaValue::String("x".to_string())); + + let mut body = empty_body(); + body.options = vec![opt]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + + assert_eq!( + validate_tool(&tool), + Err(vec![ToolValidationError::UnresolvedTypeRef { + command: "tool".to_string(), + position: "out".to_string(), + id: "missing".to_string(), + }]) + ); +} + +#[test] +fn dangling_type_ref_does_not_hide_independent_default_type_mismatch() { + let mut opt = scalar_option( + "arg", + SchemaType::record(vec![record_field( + "missing", + SchemaType::ref_to(TypeId::new("missing")), + )]), + ); + opt.default = Some(SchemaValue::String("not-a-record".to_string())); + + let mut body = empty_body(); + body.options = vec![opt]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { command, position, id } + if command == "tool" && position == "arg" && id == "missing" + )), + "expected unresolved ref at arg, got {errors:?}" + ); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::DefaultTypeMismatch { command, name } + if command == "tool" && name == "arg" + )), + "expected independent default mismatch at arg, got {errors:?}" + ); +} + +#[test] +fn dangling_type_ref_with_value_is_reports_only_unresolved_type_ref() { + let mut body = empty_body(); + body.options = vec![scalar_option( + "out", + SchemaType::ref_to(TypeId::new("missing")), + )]; + body.constraints = vec![Constraint::RequiresAll(vec![Ref::ValueIs(ValueIsRef { + name: "out".to_string(), + value: SchemaValue::String("x".to_string()), + })])]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + + assert_eq!( + validate_tool(&tool), + Err(vec![ToolValidationError::UnresolvedTypeRef { + command: "tool".to_string(), + position: "out".to_string(), + id: "missing".to_string(), + }]) + ); +} + +#[test] +fn dangling_ref_while_peeling_value_is_option_list_reports_only_unresolved_type_ref() { + let mut body = empty_body(); + body.options = vec![scalar_option( + "out", + SchemaType::option(SchemaType::ref_to(TypeId::new("missing-list"))), + )]; + body.constraints = vec![Constraint::RequiresAll(vec![Ref::ValueIs(ValueIsRef { + name: "out".to_string(), + value: SchemaValue::String("x".to_string()), + })])]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + + assert_eq!( + validate_tool(&tool), + Err(vec![ToolValidationError::UnresolvedTypeRef { + command: "tool".to_string(), + position: "out".to_string(), + id: "missing-list".to_string(), + }]) + ); +} + +#[test] +fn recursive_ref_while_peeling_value_is_option_is_not_suppressed_as_dangling() { + let cycle_id = TypeId::new("cycle"); + let mut body = empty_body(); + body.options = vec![scalar_option( + "out", + SchemaType::option(SchemaType::ref_to(cycle_id.clone())), + )]; + body.constraints = vec![Constraint::RequiresAll(vec![Ref::ValueIs(ValueIsRef { + name: "out".to_string(), + value: SchemaValue::String("x".to_string()), + })])]; + let mut node = root("tool"); + node.body = Some(body); + let mut tool = tool_with_root(node); + tool.schema.defs = vec![SchemaTypeDef { + id: cycle_id.clone(), + name: Some("Cycle".to_string()), + body: SchemaType::ref_to(cycle_id), + }]; + + let errors = validate_tool(&tool).expect_err("recursive alias must not suppress value-is"); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::ValueIsTypeMismatch { command, name } + if command == "tool" && name == "out" + )), + "expected value-is mismatch for recursive option alias, got {errors:?}" + ); +} + +#[test] +fn dangling_type_ref_does_not_hide_independent_value_is_type_mismatch() { + let mut body = empty_body(); + body.options = vec![scalar_option( + "arg", + SchemaType::record(vec![record_field( + "missing", + SchemaType::ref_to(TypeId::new("missing")), + )]), + )]; + body.constraints = vec![Constraint::RequiresAll(vec![Ref::ValueIs(ValueIsRef { + name: "arg".to_string(), + value: SchemaValue::String("not-a-record".to_string()), + })])]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { command, position, id } + if command == "tool" && position == "arg" && id == "missing" + )), + "expected unresolved ref at arg, got {errors:?}" + ); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::ValueIsTypeMismatch { command, name } + if command == "tool" && name == "arg" + )), + "expected independent value-is mismatch at arg, got {errors:?}" + ); +} + +#[test] +fn dangling_type_ref_does_not_hide_independent_inline_schema_error() { + let mut body = empty_body(); + body.options = vec![scalar_option( + "arg", + SchemaType::record(vec![ + record_field("missing", SchemaType::ref_to(TypeId::new("missing"))), + record_field( + "bad", + SchemaType::U32 { + restrictions: Some(NumericRestrictions { + min: Some(NumericBound::Unsigned(10)), + max: Some(NumericBound::Unsigned(1)), + unit: None, + }), + metadata: Default::default(), + }, + ), + ]), + )]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { command, position, id } + if command == "tool" && position == "arg" && id == "missing" + )), + "expected unresolved ref at arg, got {errors:?}" + ); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::IllFormedSchema { command, position, detail } + if command == "tool" + && position == "arg" + && detail.contains("numeric min bound is greater than max bound") + )), + "expected independent invalid numeric restriction at arg, got {errors:?}" + ); +} + +#[test] +fn dangling_type_ref_does_not_hide_independent_map_key_schema_error() { + let mut body = empty_body(); + body.options = vec![scalar_option( + "arg", + SchemaType::record(vec![ + record_field("missing", SchemaType::ref_to(TypeId::new("missing"))), + record_field( + "bad-map", + SchemaType::map( + SchemaType::record(vec![record_field("key", SchemaType::string())]), + SchemaType::string(), + ), + ), + ]), + )]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { command, position, id } + if command == "tool" && position == "arg" && id == "missing" + )), + "expected unresolved ref at arg, got {errors:?}" + ); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::IllFormedSchema { command, position, detail } + if command == "tool" + && position == "arg" + && detail.contains("map key must be a primitive type") + )), + "expected independent non-primitive map key error at arg, got {errors:?}" + ); +} + +#[test] +fn dangling_union_branch_body_reports_only_unresolved_type_ref() { + let mut body = empty_body(); + body.options = vec![scalar_option( + "arg", + SchemaType::union(UnionSpec { + branches: vec![UnionBranch { + tag: "text".to_string(), + body: SchemaType::ref_to(TypeId::new("missing")), + discriminator: DiscriminatorRule::Prefix { + prefix: "x".to_string(), + }, + metadata: Default::default(), + }], + }), + )]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + + assert_eq!( + validate_tool(&tool), + Err(vec![ToolValidationError::UnresolvedTypeRef { + command: "tool".to_string(), + position: "arg".to_string(), + id: "missing".to_string(), + }]) + ); +} + +#[test] +fn dangling_ref_in_definition_does_not_hide_independent_definition_schema_error() { + let mut schema = SchemaGraph::empty(); + schema.defs = vec![SchemaTypeDef { + id: TypeId::new("outer"), + name: None, + body: SchemaType::record(vec![ + record_field("missing", SchemaType::ref_to(TypeId::new("missing"))), + record_field( + "bad", + SchemaType::U32 { + restrictions: Some(NumericRestrictions { + min: Some(NumericBound::Unsigned(10)), + max: Some(NumericBound::Unsigned(1)), + unit: None, + }), + metadata: Default::default(), + }, + ), + ]), + }]; + let tool = Tool { + version: "1.0.0".to_string(), + commands: CommandTree { + nodes: vec![root("tool")], + }, + schema, + }; + + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { command, position, id } + if command == "" && position == "outer" && id == "missing" + )), + "expected unresolved ref in def outer, got {errors:?}" + ); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::IllFormedSchema { command, position, detail } + if command == "" + && position == "outer" + && detail.contains("numeric min bound is greater than max bound") + )), + "expected independent invalid numeric restriction in def outer, got {errors:?}" + ); +} + +#[test] +fn dangling_repeatable_map_type_reports_only_unresolved_type_ref() { + let mut cfg = scalar_option("config", SchemaType::string()); + cfg.shape = OptionShape::RepeatableMap(RepeatableMapShape { + repetition: Repetition::Repeated, + map_type: SchemaType::ref_to(TypeId::new("missing-map")), + duplicate_key_policy: DuplicateKeyPolicy::Reject, + }); + + let mut body = empty_body(); + body.options = vec![cfg]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + + assert_eq!( + validate_tool(&tool), + Err(vec![ToolValidationError::UnresolvedTypeRef { + command: "tool".to_string(), + position: "config".to_string(), + id: "missing-map".to_string(), + }]) + ); +} + +#[test] +fn repeatable_map_recursive_alias_type_is_rejected() { + let map_id = TypeId::new("config-map"); + let mut cfg = scalar_option("config", SchemaType::string()); + cfg.shape = OptionShape::RepeatableMap(RepeatableMapShape { + repetition: Repetition::Repeated, + map_type: SchemaType::ref_to(map_id.clone()), + duplicate_key_policy: DuplicateKeyPolicy::Reject, + }); + + let mut body = empty_body(); + body.options = vec![cfg]; + let mut node = root("tool"); + node.body = Some(body); + let mut tool = tool_with_root(node); + tool.schema.defs = vec![SchemaTypeDef { + id: map_id.clone(), + name: Some("ConfigMap".to_string()), + body: SchemaType::ref_to(map_id), + }]; + + let errors = validate_tool(&tool).expect_err("recursive alias is not a map type"); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::RepeatableMapTypeNotMap { command, name } + if command == "tool" && name == "config" + )), + "expected repeatable-map not-map error for recursive alias, got {errors:?}" + ); +} + +#[test] +fn duplicate_type_ids_in_tool_schema_are_rejected() { + let mut schema = SchemaGraph::empty(); + schema.defs = vec![ + SchemaTypeDef { + id: TypeId::new("dup"), + name: Some("First".to_string()), + body: SchemaType::string(), + }, + SchemaTypeDef { + id: TypeId::new("dup"), + name: Some("Second".to_string()), + body: SchemaType::u32(), + }, + ]; + + let tool = Tool { + version: "1.0.0".to_string(), + commands: CommandTree { + nodes: vec![root("tool")], + }, + schema, + }; + + assert!( + validate_tool(&tool).is_err(), + "tool validation must reject duplicate schema definition ids before wire encoding fails" + ); +} + #[test] fn dangling_ref_in_definition_is_rejected() { // A definition body references a type id that is not in the graph; this is @@ -732,6 +1465,251 @@ fn dangling_ref_in_definition_is_rejected() { ))); } +#[test] +fn constructor_def_nested_alias_dangling_ref_is_reported_once_at_constructor_def() { + let outer = TypeId::new("outer"); + let alias = TypeId::new("alias"); + let missing = TypeId::new("missing"); + + let mut body = empty_body(); + body.options = vec![scalar_option("arg", SchemaType::ref_to(outer.clone()))]; + let mut node = root("tool"); + node.body = Some(body); + + let mut schema = SchemaGraph::empty(); + schema.defs = vec![ + SchemaTypeDef { + id: outer.clone(), + name: None, + body: SchemaType::record(vec![record_field( + "field", + SchemaType::ref_to(alias.clone()), + )]), + }, + SchemaTypeDef { + id: alias, + name: None, + body: SchemaType::ref_to(missing), + }, + ]; + + let tool = Tool { + version: "1.0.0".to_string(), + commands: CommandTree { nodes: vec![node] }, + schema, + }; + + let errors = validate_tool(&tool).unwrap_err(); + assert_eq!( + errors + .iter() + .filter(|e| matches!(e, ToolValidationError::UnresolvedTypeRef { id, .. } if id == "missing")) + .collect::>(), + vec![&ToolValidationError::UnresolvedTypeRef { + command: "".to_string(), + position: "outer".to_string(), + id: "missing".to_string(), + }], + "nested alias failure should be reported once at the constructor def, got {errors:?}" + ); +} + +#[test] +fn repeated_alias_dangling_ref_in_one_constructor_def_is_reported_once() { + let outer = TypeId::new("outer"); + let alias = TypeId::new("alias"); + let missing = TypeId::new("missing"); + + let mut schema = SchemaGraph::empty(); + schema.defs = vec![ + SchemaTypeDef { + id: outer.clone(), + name: None, + body: SchemaType::record(vec![ + record_field("first", SchemaType::ref_to(alias.clone())), + record_field("second", SchemaType::ref_to(alias.clone())), + ]), + }, + SchemaTypeDef { + id: alias, + name: None, + body: SchemaType::ref_to(missing), + }, + ]; + + let tool = Tool { + version: "1.0.0".to_string(), + commands: CommandTree { + nodes: vec![root("tool")], + }, + schema, + }; + + let errors = validate_tool(&tool).unwrap_err(); + let unresolved = errors + .iter() + .filter( + |e| matches!(e, ToolValidationError::UnresolvedTypeRef { id, .. } if id == "missing"), + ) + .collect::>(); + assert_eq!( + unresolved, + vec![&ToolValidationError::UnresolvedTypeRef { + command: "".to_string(), + position: "outer".to_string(), + id: "missing".to_string(), + }], + "the same alias-chain failure should be reported once at the outer constructor def, got {errors:?}" + ); +} + +#[test] +fn covered_alias_id_does_not_skip_later_duplicate_def_body_validation() { + let dup = TypeId::new("dup"); + let ok = TypeId::new("ok"); + let missing = TypeId::new("missing"); + + let mut body = empty_body(); + body.options = vec![scalar_option("arg", SchemaType::ref_to(dup.clone()))]; + let mut node = root("tool"); + node.body = Some(body); + + let mut schema = SchemaGraph::empty(); + schema.defs = vec![ + SchemaTypeDef { + id: dup.clone(), + name: Some("FirstDup".to_string()), + body: SchemaType::ref_to(ok.clone()), + }, + SchemaTypeDef { + id: ok, + name: Some("Ok".to_string()), + body: SchemaType::string(), + }, + SchemaTypeDef { + id: dup, + name: Some("SecondDup".to_string()), + body: SchemaType::record(vec![record_field("bad", SchemaType::ref_to(missing))]), + }, + ]; + + let tool = Tool { + version: "1.0.0".to_string(), + commands: CommandTree { nodes: vec![node] }, + schema, + }; + + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors + .iter() + .any(|e| matches!(e, ToolValidationError::DuplicateTypeId { id } if id == "dup")), + "expected duplicate type id to be reported, got {errors:?}" + ); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { command, position, id } + if command == "" && position == "dup" && id == "missing" + )), + "covered alias id should not suppress validation of a later duplicate definition body, got {errors:?}" + ); +} + +#[test] +fn covered_alias_id_does_not_skip_later_duplicate_pure_alias_body_validation() { + let dup = TypeId::new("dup"); + let ok = TypeId::new("ok"); + let missing = TypeId::new("missing"); + + let mut body = empty_body(); + body.options = vec![scalar_option("arg", SchemaType::ref_to(dup.clone()))]; + let mut node = root("tool"); + node.body = Some(body); + + let mut schema = SchemaGraph::empty(); + schema.defs = vec![ + SchemaTypeDef { + id: dup.clone(), + name: Some("FirstDup".to_string()), + body: SchemaType::ref_to(ok.clone()), + }, + SchemaTypeDef { + id: ok, + name: Some("Ok".to_string()), + body: SchemaType::string(), + }, + SchemaTypeDef { + id: dup, + name: Some("SecondDup".to_string()), + body: SchemaType::ref_to(missing), + }, + ]; + + let tool = Tool { + version: "1.0.0".to_string(), + commands: CommandTree { nodes: vec![node] }, + schema, + }; + + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors + .iter() + .any(|e| matches!(e, ToolValidationError::DuplicateTypeId { id } if id == "dup")), + "expected duplicate type id to be reported, got {errors:?}" + ); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { command, position, id } + if command == "" && position == "dup" && id == "missing" + )), + "covered alias id should not suppress validation of a later duplicate pure-alias definition body, got {errors:?}" + ); +} + +#[test] +fn unused_dangling_def_is_not_suppressed_by_same_missing_ref_at_input_position() { + let missing = TypeId::new("missing"); + + let mut body = empty_body(); + body.options = vec![scalar_option("out", SchemaType::ref_to(missing.clone()))]; + let mut node = root("tool"); + node.body = Some(body); + + let mut schema = SchemaGraph::empty(); + schema.defs = vec![SchemaTypeDef { + id: TypeId::new("unused"), + name: None, + body: SchemaType::list(SchemaType::ref_to(missing.clone())), + }]; + + let tool = Tool { + version: "1.0.0".to_string(), + commands: CommandTree { nodes: vec![node] }, + schema, + }; + + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { command, position, id } + if command == "tool" && position == "out" && id == "missing" + )), + "expected unresolved ref at input position, got {errors:?}" + ); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::UnresolvedTypeRef { command, position, id } + if command == "" && position == "unused" && id == "missing" + )), + "expected same missing ref in unused definition to still be reported, got {errors:?}" + ); +} + #[test] fn out_of_bounds_command_index_is_rejected() { let mut node = root("tool"); @@ -996,13 +1974,36 @@ fn arb_command_annotations() -> impl Strategy { ) } +fn arb_duplicate_key_policy() -> impl Strategy { + prop_oneof![ + Just(DuplicateKeyPolicy::Reject), + Just(DuplicateKeyPolicy::LastWins) + ] +} + fn arb_option_shape() -> impl Strategy { prop_oneof![ arb_schema_type().prop_map(OptionShape::Scalar), arb_schema_type().prop_map(OptionShape::OptionalScalar), - (arb_repetition(), arb_schema_type()).prop_map(|(repetition, type_)| { - OptionShape::Repeatable(RepeatableShape { repetition, type_ }) + (arb_repetition(), arb_schema_type()).prop_map(|(repetition, item_type)| { + OptionShape::RepeatableList(RepeatableListShape { + repetition, + item_type, + }) }), + ( + arb_repetition(), + arb_schema_type(), + arb_schema_type(), + arb_duplicate_key_policy() + ) + .prop_map(|(repetition, key, value, duplicate_key_policy)| { + OptionShape::RepeatableMap(RepeatableMapShape { + repetition, + map_type: SchemaType::map(key, value), + duplicate_key_policy, + }) + }), ] } @@ -1043,15 +2044,17 @@ fn arb_positional() -> impl Strategy { arb_schema_type(), prop::option::of(transportable_schema_value_strategy()), any::(), + any::(), ) .prop_map( - |(name, doc, value_name, type_, default, required)| Positional { + |(name, doc, value_name, type_, default, required, accepts_stdio)| Positional { name, doc, value_name, type_, default, required, + accepts_stdio, }, ) } @@ -1066,17 +2069,21 @@ fn arb_tail_positional() -> impl Strategy { prop::option::of(any::()), prop::option::of(arb_ident()), any::(), + any::(), ) .prop_map( - |(name, doc, value_name, item_type, min, max, separator, verbatim)| TailPositional { - name, - doc, - value_name, - item_type, - min, - max, - separator, - verbatim, + |(name, doc, value_name, item_type, min, max, separator, verbatim, accepts_stdio)| { + TailPositional { + name, + doc, + value_name, + item_type, + min, + max, + separator, + verbatim, + accepts_stdio, + } }, ) } @@ -1444,6 +2451,7 @@ proptest! { type_, default: None, required: true, + accepts_stdio: false, }]; let mut node = root("root"); node.body = Some(body); diff --git a/golem-common/src/schema/tool/validation.rs b/golem-common/src/schema/tool/validation.rs index 28417ff2eb..ed7484e2d0 100644 --- a/golem-common/src/schema/tool/validation.rs +++ b/golem-common/src/schema/tool/validation.rs @@ -58,10 +58,12 @@ use super::{ CommandBody, CommandIndex, CommandNode, Constraint, Globals, OptionShape, OptionSpec, Positional, Ref, Tool, }; -use crate::schema::graph::SchemaGraph; +use crate::schema::graph::{RefResolutionError, SchemaGraph}; +use crate::schema::metadata::TypeId; use crate::schema::schema_type::SchemaType; use crate::schema::schema_value::SchemaValue; -use crate::schema::validation::value::validate_value; +use crate::schema::validation::value::{ValueError, validate_value}; +use crate::schema::validation::well_formedness::{SchemaError, validate_root_type}; use regex::Regex; use std::collections::HashSet; use std::fmt::{self, Display, Formatter}; @@ -103,6 +105,9 @@ pub enum ToolValidationError { /// declared type (a `repeatable` option's default must be a list of its /// element type). DefaultTypeMismatch { command: String, name: String }, + /// A `repeatable-map` option's collected `map_type` does not resolve to a + /// [`SchemaType::Map`] (the collected key-value value must be a map node). + RepeatableMapTypeNotMap { command: String, name: String }, /// An embedded type contains a [`SchemaType::Ref`] whose id does not /// resolve to a definition in the tool's [`SchemaGraph`]. UnresolvedTypeRef { @@ -110,6 +115,17 @@ pub enum ToolValidationError { position: String, id: String, }, + /// An embedded type is not structurally well-formed (for example an + /// inverted numeric `min > max`, an empty variant, or a non-primitive map + /// key), as reported by schema well-formedness validation. + IllFormedSchema { + command: String, + position: String, + detail: String, + }, + /// Two definitions in the tool's [`SchemaGraph`] share the same type id; the + /// wire encoder requires definition ids to be unique. + DuplicateTypeId { id: String }, /// A body's `default-formatter` does not resolve to one of its formatters. UnresolvedDefaultFormatter { command: String, formatter: String }, /// A `tail-positional` declares `verbatim = true` without a `separator`. @@ -171,6 +187,12 @@ impl Display for ToolValidationError { "default literal for {name:?} is not valid for its type in command {command:?}" ) } + ToolValidationError::RepeatableMapTypeNotMap { command, name } => { + write!( + f, + "repeatable-map option {name:?} in command {command:?} does not collect into a map type" + ) + } ToolValidationError::UnresolvedTypeRef { command, position, @@ -181,6 +203,19 @@ impl Display for ToolValidationError { "type reference {id:?} at position {position:?} in command {command:?} does not resolve to a definition in the tool schema" ) } + ToolValidationError::IllFormedSchema { + command, + position, + detail, + } => { + write!( + f, + "type at position {position:?} in command {command:?} is not well-formed: {detail}" + ) + } + ToolValidationError::DuplicateTypeId { id } => { + write!(f, "duplicate schema definition id {id:?}") + } ToolValidationError::UnresolvedDefaultFormatter { command, formatter } => { write!( f, @@ -241,6 +276,41 @@ struct Validator<'a> { /// Types reachable from an input position; checked for `variant` after the /// command traversal. input_roots: Vec>, + /// Every [`SchemaType::Ref`] id written structurally in a command position + /// type (descending through inline constructors, but not following refs into + /// definition bodies). These are exactly the refs whose alias chains the + /// use-site well-formedness check ([`Self::check_type_well_formed`]) walks + /// and reports on, so they seed the suppression of redundant def-body copies + /// in [`Self::check_def_refs`]. + used_ref_ids: HashSet, +} + +/// The `value-is` comparand recorded for a name that carries a declared value +/// type. A name absent from the comparand map carries no value type at all (a +/// flag), which is a genuine `value-is` mismatch. +#[derive(Clone, Copy)] +enum ValueComparand<'a> { + /// The resolved type a `value-is` literal must be valid for. + Type(&'a SchemaType), + /// The name is typed, but its declared type could not be resolved to a + /// comparable value type (a repeatable-map whose `map_type` does not resolve + /// to a map). The underlying type error is reported separately, so + /// `value-is` checking is suppressed to avoid a misleading cascade. + BlockedByTypeError, +} + +/// The classification of a `value-is` literal against a declared value type. +enum ValueIsOutcome { + /// The literal is a valid value for the declared type (or, under the + /// element relaxation, for its element type). + Compatible, + /// The literal is not valid for the declared type and the mismatch is + /// genuine (not merely an artifact of an unresolved reference). + Mismatch, + /// The comparison failed only because the literal descended into an + /// unresolved reference, reported separately as `UnresolvedTypeRef`; the + /// mismatch is suppressed to avoid misleading cascade noise. + BlockedByDanglingRef, } /// The set of names and declared types reachable from a command body, used for @@ -250,10 +320,11 @@ struct NameScope<'a> { /// All referenceable names (option/flag long names, aliases, positional /// names). names: HashSet, - /// Names that carry a declared value type, mapped to the type a `value-is` - /// literal must be valid for (already unwrapped to the element type for - /// repeatable options and tail positionals). - typed: std::collections::HashMap, + /// Names that carry a declared value type, mapped to the comparand a + /// `value-is` literal must be valid for (already unwrapped to the element + /// type for repeatable options and tail positionals). A name present in + /// [`Self::names`] but absent here is a flag (no value type). + typed: std::collections::HashMap>, } impl<'a> Validator<'a> { @@ -262,10 +333,13 @@ impl<'a> Validator<'a> { tool, errors: Vec::new(), input_roots: Vec::new(), + used_ref_ids: HashSet::new(), } } fn run(&mut self) { + self.check_duplicate_type_ids(); + if self.tool.commands.nodes.is_empty() { self.errors.push(ToolValidationError::EmptyCommandTree); } @@ -361,14 +435,16 @@ impl<'a> Validator<'a> { fn check_globals(&mut self, command: &str, globals: &'a Globals) { for opt in &globals.options { self.check_option_identifiers(opt); + self.check_repeatable_map(command, opt); self.check_option_default(command, opt); - self.check_type_refs(command, &opt.long, option_value_type(opt)); - // A global option is an input position; its value type must not - // reach a variant. + self.check_type_well_formed(command, &opt.long, option_input_type(opt)); + // A global option is an input position; its full collected input + // type (both map key and value for a repeatable-map) must not reach + // a variant. self.input_roots.push(InputRoot { command: command.to_string(), position: opt.long.clone(), - ty: option_value_type(opt), + ty: option_input_type(opt), }); } for flag in &globals.flags { @@ -453,24 +529,59 @@ impl<'a> Validator<'a> { } } + /// A `repeatable-map` option collects its occurrences into a single map + /// value, so its stored `map_type` must resolve to a [`SchemaType::Map`]. + fn check_repeatable_map(&mut self, command: &str, opt: &OptionSpec) { + if let OptionShape::RepeatableMap(shape) = &opt.shape { + // Whether the stored type is a map is decided by its *top-level* + // resolution only. A `map_type` that resolves to a concrete non-map + // type — or to a reference cycle, which can never resolve to a map — + // is a genuine "not a map" error, even if some nested field is itself + // a dangling reference. A `map_type` that is itself a *dangling* + // reference cannot be classified and is reported separately as + // `UnresolvedTypeRef`, so reporting a "not a map" error on top of it + // would be misleading. + let not_a_map = match self.tool.schema.resolve_ref(&shape.map_type) { + Ok(SchemaType::Map { .. }) => false, + Ok(_) | Err(RefResolutionError::RecursiveRef(_)) => true, + Err(RefResolutionError::DanglingRef(_)) => false, + }; + if not_a_map { + self.errors + .push(ToolValidationError::RepeatableMapTypeNotMap { + command: command.to_string(), + name: opt.long.clone(), + }); + } + } + } + /// Validate an option's `default` literal (if present) against its declared - /// value type. A `repeatable` option's default is the whole repeated value, - /// so it is validated against `list`; scalar and optional-scalar - /// defaults are validated against the scalar type directly. + /// value type. A repeatable option's default is the whole collected value: + /// a `repeatable-list` default is validated against `list`, a + /// `repeatable-map` default against the map node directly; scalar and + /// optional-scalar defaults are validated against the scalar type directly. fn check_option_default(&mut self, command: &str, opt: &OptionSpec) { let Some(default) = &opt.default else { return; }; - let valid = match &opt.shape { + let graph = &self.tool.schema; + // A mismatch is suppressed only when it is *purely* an artifact of an + // unresolved reference the value descended into (reported separately as + // `UnresolvedTypeRef`); an independent shape mismatch is still reported. + let result = match &opt.shape { OptionShape::Scalar(ty) | OptionShape::OptionalScalar(ty) => { - validate_value(&self.tool.schema, ty, default).is_ok() + validate_value(graph, ty, default) } - OptionShape::Repeatable(shape) => { - let list_ty = SchemaType::list(shape.type_.clone()); - validate_value(&self.tool.schema, &list_ty, default).is_ok() + OptionShape::RepeatableList(shape) => { + let list_ty = SchemaType::list(shape.item_type.clone()); + validate_value(graph, &list_ty, default) } + OptionShape::RepeatableMap(shape) => validate_value(graph, &shape.map_type, default), }; - if !valid { + if let Err(errors) = result + && !value_mismatch_is_only_dangling(&errors) + { self.errors.push(ToolValidationError::DefaultTypeMismatch { command: command.to_string(), name: opt.long.clone(), @@ -482,7 +593,10 @@ impl<'a> Validator<'a> { /// declared type. fn check_positional_default(&mut self, command: &str, positional: &Positional) { if let Some(default) = &positional.default - && validate_value(&self.tool.schema, &positional.type_, default).is_err() + && let Err(errors) = validate_value(&self.tool.schema, &positional.type_, default) + // Suppress only when the mismatch is purely an artifact of an + // unresolved reference (reported separately as `UnresolvedTypeRef`). + && !value_mismatch_is_only_dangling(&errors) { self.errors.push(ToolValidationError::DefaultTypeMismatch { command: command.to_string(), @@ -491,42 +605,96 @@ impl<'a> Validator<'a> { } } - /// Check that every [`SchemaType::Ref`] embedded (directly or through inline - /// composites) in `ty` resolves to a definition in the tool's schema graph. - /// References inside a resolved definition's body are not followed here; - /// definition bodies are validated once by [`Self::check_def_refs`]. - fn check_type_refs(&mut self, command: &str, position: &str, ty: &SchemaType) { - let mut unresolved = Vec::new(); - collect_dangling_refs(&self.tool.schema, ty, &mut unresolved); - for id in unresolved { - self.errors.push(ToolValidationError::UnresolvedTypeRef { - command: command.to_string(), - position: position.to_string(), - id, - }); + /// Validate an embedded type at an input/output position for structural + /// well-formedness against the tool's schema graph: every + /// [`SchemaType::Ref`] must resolve to a definition, and every inline + /// restriction (numeric bounds, text/binary ranges, union discriminators, + /// ...) must be valid. References inside a resolved definition's body are + /// not followed here; definition bodies are validated once by + /// [`Self::check_def_refs`]. + /// + /// A dangling reference is reported as + /// [`ToolValidationError::UnresolvedTypeRef`]; any other well-formedness + /// failure is reported as [`ToolValidationError::IllFormedSchema`]. When a + /// type has dangling references, only those are reported (structural errors + /// caused by the missing definition would be misleading noise). + fn check_type_well_formed(&mut self, command: &str, position: &str, ty: &SchemaType) { + collect_structural_ref_ids(ty, &mut self.used_ref_ids); + if let Err(errors) = validate_root_type(&self.tool.schema, ty) { + self.errors.extend(map_schema_errors( + command.to_string(), + position.to_string(), + errors, + )); } } - /// Check that every named definition body references only definitions that - /// exist in the graph. [`GraphEncoder`](super::wit) encodes all definition - /// bodies eagerly, so an unresolved reference in any definition — even an - /// unreferenced one — would fail wire encoding. + /// Report definitions that share a type id. The wire [`GraphEncoder`] and + /// schema well-formedness both require ids to be unique, so a duplicate is a + /// producer-side invariant violation even though each individual body may be + /// well-formed. + fn check_duplicate_type_ids(&mut self) { + let mut seen: HashSet = HashSet::new(); + for def in &self.tool.schema.defs { + if !seen.insert(def.id.to_string()) { + self.errors.push(ToolValidationError::DuplicateTypeId { + id: def.id.to_string(), + }); + } + } + } + + /// Check that every named definition body is well-formed and references only + /// definitions that exist in the graph. [`GraphEncoder`](super::wit) encodes + /// all definition bodies eagerly, so an unresolved reference in any + /// definition — even an unreferenced one — would fail wire encoding. fn check_def_refs(&mut self) { - let mut unresolved: Vec<(String, String)> = Vec::new(); + // A pure-alias definition (a bare `Ref` body) reports only an alias-chain + // failure (dangling or recursive), and that exact failure is already + // reported by every position whose `resolve_ref` walks into it: a command + // position, or a constructor definition body (which is always validated + // and whose nested refs are walked). Validating such a pure alias again + // would double-report. So seed the suppression set from command-position + // refs and from the refs structurally written in constructor definition + // bodies, then follow pure-alias edges. Pure aliases nothing references + // (including an unreferenced alias cycle) are *not* seeded, so they are + // still validated and reported at their own `` position. + let mut seeds = self.used_ref_ids.clone(); for def in &self.tool.schema.defs { - let mut out = Vec::new(); - collect_dangling_refs(&self.tool.schema, &def.body, &mut out); - for id in out { - unresolved.push((def.id.to_string(), id)); + if !matches!(def.body, SchemaType::Ref { .. }) { + collect_structural_ref_ids(&def.body, &mut seeds); } } - for (def_id, id) in unresolved { - self.errors.push(ToolValidationError::UnresolvedTypeRef { - command: format!(""), - position: def_id, - id, - }); + let covered = pure_alias_closure(&self.tool.schema, &seeds); + // Ids carried by more than one definition. Pure-alias coverage is keyed + // by `TypeId`, but a duplicate-id graph is already malformed (reported as + // `DuplicateTypeId`) and id resolution is ambiguous, so suppression + // cannot safely identify which same-id body is the covered alias. + // Validate every duplicate-id body so none of their failures are lost. + let mut seen_ids: HashSet<&TypeId> = HashSet::new(); + let mut duplicate_ids: HashSet<&TypeId> = HashSet::new(); + for def in &self.tool.schema.defs { + if !seen_ids.insert(&def.id) { + duplicate_ids.insert(&def.id); + } + } + let mut reported: Vec = Vec::new(); + for def in &self.tool.schema.defs { + // Skip only a uniquely-named pure-alias definition that the closure + // marked as covered: its single possible failure is already reported + // at the position whose chain walk reaches it. + if covered.contains(&def.id) + && matches!(def.body, SchemaType::Ref { .. }) + && !duplicate_ids.contains(&def.id) + { + continue; + } + if let Err(errors) = validate_root_type(&self.tool.schema, &def.body) { + let def_id = def.id.to_string(); + reported.extend(map_schema_errors(format!(""), def_id, errors)); + } } + self.errors.extend(reported); } fn check_subcommand_uniqueness(&mut self, node: &'a CommandNode) { @@ -548,6 +716,11 @@ impl<'a> Validator<'a> { } fn check_body(&mut self, command: &str, body: &'a CommandBody, in_scope: &[&'a Globals]) { + // The tool's shared schema graph, used to resolve `value-is` comparands + // through any `repeatable-map` `Ref` map types. Bound to the tool's `'a` + // lifetime (independent of the `&mut self` borrow) so resolved types can + // live in the name scope. + let graph: &'a SchemaGraph = &self.tool.schema; // Build the in-scope global token sets first so body-local tokens can be // checked against them. let mut global_names: HashSet = HashSet::new(); @@ -587,7 +760,7 @@ impl<'a> Validator<'a> { let mut scope = NameScope::default(); for globals in in_scope { for opt in &globals.options { - register_option(&mut scope, opt); + register_option(graph, &mut scope, opt); } for flag in &globals.flags { scope.names.insert(flag.long.clone()); @@ -609,15 +782,16 @@ impl<'a> Validator<'a> { short, }); } - register_option(&mut scope, opt); + register_option(graph, &mut scope, opt); + self.check_repeatable_map(command, opt); self.check_option_default(command, opt); - self.check_type_refs(command, &opt.long, option_value_type(opt)); + self.check_type_well_formed(command, &opt.long, option_input_type(opt)); // A body option is an input position; its value type must not reach // a variant. self.input_roots.push(InputRoot { command: command.to_string(), position: opt.long.clone(), - ty: option_value_type(opt), + ty: option_input_type(opt), }); } @@ -646,11 +820,12 @@ impl<'a> Validator<'a> { self.check_identifier("positional name", &positional.name); add_name(self, &positional.name); scope.names.insert(positional.name.clone()); - scope - .typed - .insert(positional.name.clone(), &positional.type_); + scope.typed.insert( + positional.name.clone(), + ValueComparand::Type(&positional.type_), + ); self.check_positional_default(command, positional); - self.check_type_refs(command, &positional.name, &positional.type_); + self.check_type_well_formed(command, &positional.name, &positional.type_); self.input_roots.push(InputRoot { command: command.to_string(), position: positional.name.clone(), @@ -663,8 +838,10 @@ impl<'a> Validator<'a> { add_name(self, &tail.name); scope.names.insert(tail.name.clone()); // A tail positional is list-like; a value-is literal matches an item. - scope.typed.insert(tail.name.clone(), &tail.item_type); - self.check_type_refs(command, &tail.name, &tail.item_type); + scope + .typed + .insert(tail.name.clone(), ValueComparand::Type(&tail.item_type)); + self.check_type_well_formed(command, &tail.name, &tail.item_type); self.input_roots.push(InputRoot { command: command.to_string(), position: tail.name.clone(), @@ -698,13 +875,13 @@ impl<'a> Validator<'a> { formatter: result.default_formatter.clone(), }); } - self.check_type_refs(command, "result", &result.type_); + self.check_type_well_formed(command, "result", &result.type_); } for error_case in &body.errors { self.check_identifier("error-case name", &error_case.name); if let Some(payload) = &error_case.payload { - self.check_type_refs(command, &error_case.name, payload); + self.check_type_well_formed(command, &error_case.name, payload); } } } @@ -732,14 +909,30 @@ impl<'a> Validator<'a> { continue; } match scope.typed.get(&value_is.name) { - Some(declared) => { - if !self.value_is_compatible(declared, &value_is.value) { - self.errors.push(ToolValidationError::ValueIsTypeMismatch { - command: command.to_string(), - name: value_is.name.clone(), - }); + Some(ValueComparand::Type(declared)) => { + match self.value_is_outcome(declared, &value_is.value) { + ValueIsOutcome::Compatible => {} + ValueIsOutcome::Mismatch => { + self.errors.push(ToolValidationError::ValueIsTypeMismatch { + command: command.to_string(), + name: value_is.name.clone(), + }); + } + ValueIsOutcome::BlockedByDanglingRef => { + // The literal descended into an unresolved + // reference, reported separately as + // `UnresolvedTypeRef`; a value-is mismatch + // here would be misleading cascade noise. + } } } + Some(ValueComparand::BlockedByTypeError) => { + // The name is typed but its declared type could not + // be resolved to a comparable value type (a + // repeatable-map whose `map_type` is not a map); the + // underlying type error is reported separately, so a + // value-is mismatch here would be misleading noise. + } None => { // Name resolves to a flag (no value type), so a // value-is literal cannot be type-compatible. @@ -754,29 +947,65 @@ impl<'a> Validator<'a> { } } - /// A `value-is` literal is compatible if it is a valid value for the - /// declared type, or — for the "any element/occurrence" relaxation — for - /// the element type of a list-shaped (optionally `option`-wrapped) declared - /// type. Repeatable options already store their element type. - fn value_is_compatible(&self, declared: &SchemaType, value: &SchemaValue) -> bool { + /// Classify a `value-is` literal against the declared type. The literal is + /// [`ValueIsOutcome::Compatible`] if it is a valid value for the declared + /// type, or — for the "any element/occurrence" relaxation — for the element + /// type of a list-shaped (optionally `option`-wrapped) declared type; + /// repeatable options already store their element type. + /// + /// When neither comparison holds, the result is [`ValueIsOutcome::Mismatch`] + /// unless the relevant comparison failed *purely* because the value + /// descended into an unresolved reference, in which case it is + /// [`ValueIsOutcome::BlockedByDanglingRef`] and the mismatch is suppressed + /// (the unresolved reference is reported separately as `UnresolvedTypeRef`). + fn value_is_outcome(&self, declared: &SchemaType, value: &SchemaValue) -> ValueIsOutcome { let graph = &self.tool.schema; - if validate_value(graph, declared, value).is_ok() { - return true; + let direct = validate_value(graph, declared, value); + if direct.is_ok() { + return ValueIsOutcome::Compatible; } - let Ok(mut peeled) = graph.resolve_ref(declared) else { - return false; - }; - // Peel `option` wrappers (resolving refs along the way). - while let SchemaType::Option { inner, .. } = peeled { - match graph.resolve_ref(inner) { - Ok(next) => peeled = next, - Err(_) => return false, + + // "any element/occurrence" relaxation: peel `option` wrappers (resolving + // refs along the way) and, for a list-shaped declared type, compare the + // literal against the element type. When this relaxation applies, its + // element comparison is the relevant one for classification. + if let Ok(mut peeled) = graph.resolve_ref(declared) { + while let SchemaType::Option { inner, .. } = peeled { + match graph.resolve_ref(inner) { + Ok(next) => peeled = next, + // The wrapped type is a *dangling* reference, so neither the + // option-inner nor the element relaxation can be decided; the + // missing reference is reported separately as + // `UnresolvedTypeRef`, so the mismatch is suppressed. + Err(RefResolutionError::DanglingRef(_)) => { + return ValueIsOutcome::BlockedByDanglingRef; + } + // A reference cycle never bottoms out in a concrete type, so + // no literal can ever be valid for it: a genuine mismatch. + Err(RefResolutionError::RecursiveRef(_)) => { + return ValueIsOutcome::Mismatch; + } + } + } + if let SchemaType::List { element, .. } | SchemaType::FixedList { element, .. } = peeled + { + return match validate_value(graph, element, value) { + Ok(()) => ValueIsOutcome::Compatible, + Err(errors) if value_mismatch_is_only_dangling(&errors) => { + ValueIsOutcome::BlockedByDanglingRef + } + Err(_) => ValueIsOutcome::Mismatch, + }; } } - if let SchemaType::List { element, .. } | SchemaType::FixedList { element, .. } = peeled { - return validate_value(graph, element, value).is_ok(); + + // No relaxation applied: classify on the direct comparison. + match direct { + Err(errors) if value_mismatch_is_only_dangling(&errors) => { + ValueIsOutcome::BlockedByDanglingRef + } + _ => ValueIsOutcome::Mismatch, } - false } fn check_no_variant_in_input(&mut self) { @@ -795,21 +1024,54 @@ impl<'a> Validator<'a> { } } -/// The type a `value-is` literal for this option is compared against, and the -/// option's input value type. For a repeatable option this is the element type, -/// matching the "any occurrence equals this literal" semantics. -fn option_value_type(opt: &OptionSpec) -> &SchemaType { +/// The type a `value-is` literal for this option is compared against. For a +/// `repeatable-list` option this is the element type and for a `repeatable-map` +/// option the map's value type, matching the "any occurrence / entry equals this +/// literal" semantics. +/// +/// A `repeatable-map`'s `map_type` may itself be a [`SchemaType::Ref`], so it is +/// resolved through `graph` before its value type is extracted. Returns `None` +/// when the map type is dangling or does not resolve to a [`SchemaType::Map`]; +/// those shapes are reported separately (`UnresolvedTypeRef` / +/// `RepeatableMapTypeNotMap`), so the `value-is` comparand is simply skipped to +/// avoid a misleading cascading `ValueIsTypeMismatch`. +fn option_value_type<'a>(graph: &'a SchemaGraph, opt: &'a OptionSpec) -> Option<&'a SchemaType> { + match &opt.shape { + OptionShape::Scalar(t) | OptionShape::OptionalScalar(t) => Some(t), + OptionShape::RepeatableList(shape) => Some(&shape.item_type), + OptionShape::RepeatableMap(shape) => match graph.resolve_ref(&shape.map_type).ok()? { + SchemaType::Map { value, .. } => Some(value), + _ => None, + }, + } +} + +/// The full collected input type of an option, used for type-reference +/// resolution and the "no variant in input position" check. A `repeatable-list` +/// stores its element type (the `list` wrapper carries no extra node); a +/// `repeatable-map` stores the whole `map` node so both key and value types are +/// reached. +fn option_input_type(opt: &OptionSpec) -> &SchemaType { match &opt.shape { OptionShape::Scalar(t) | OptionShape::OptionalScalar(t) => t, - OptionShape::Repeatable(shape) => &shape.type_, + OptionShape::RepeatableList(shape) => &shape.item_type, + OptionShape::RepeatableMap(shape) => &shape.map_type, } } -fn register_option<'a>(scope: &mut NameScope<'a>, opt: &'a OptionSpec) { +fn register_option<'a>(graph: &'a SchemaGraph, scope: &mut NameScope<'a>, opt: &'a OptionSpec) { scope.names.insert(opt.long.clone()); scope.names.extend(opt.aliases.iter().cloned()); - // Repeatable options accept the element type per occurrence/element. - let comparand = option_value_type(opt); + // An option always carries a value type, so it is always registered as a + // comparand. When that type does not resolve to a comparable value type (a + // repeatable-map whose `map_type` is not a map) the comparand is + // `BlockedByTypeError` so `value-is` checking is suppressed; the underlying + // type error is reported elsewhere. A dangling reference inside an otherwise + // comparable type is handled at check time by [`Validator::value_is_outcome`]. + let comparand = match option_value_type(graph, opt) { + Some(ty) => ValueComparand::Type(ty), + None => ValueComparand::BlockedByTypeError, + }; scope.typed.insert(opt.long.clone(), comparand); for alias in &opt.aliases { scope.typed.insert(alias.clone(), comparand); @@ -867,63 +1129,156 @@ fn type_reaches_variant( } } -/// Collect the ids of every [`SchemaType::Ref`] reachable from `ty` through -/// inline composite types whose id is not present in `graph`. References inside -/// a resolved definition body are not followed (definition bodies are checked -/// separately), so no cycle guard is needed: inline composites form a finite -/// tree. -fn collect_dangling_refs(graph: &SchemaGraph, ty: &SchemaType, out: &mut Vec) { +/// Returns `true` when a value/type comparison failed *only* because the value +/// descended into an unresolved (dangling) reference — every reported +/// [`ValueError`] is a [`ValueError::DanglingRef`]. In that case the dependent +/// mismatch (default / `value-is`) is an artifact of the missing reference, +/// which is reported separately as [`ToolValidationError::UnresolvedTypeRef`], +/// so it is suppressed. An empty error slice never counts as "only dangling". +fn value_mismatch_is_only_dangling(errors: &[ValueError]) -> bool { + !errors.is_empty() + && errors + .iter() + .all(|e| matches!(e, ValueError::DanglingRef { .. })) +} + +/// Map [`SchemaError`]s from well-formedness validation of a single embedded +/// type into position-aware [`ToolValidationError`]s. A dangling reference +/// becomes [`ToolValidationError::UnresolvedTypeRef`]; any other structural +/// failure becomes [`ToolValidationError::IllFormedSchema`]. +/// +/// Each error is mapped independently: a dangling reference never hides a +/// genuine, unrelated schema error elsewhere in the same type (for example an +/// invalid numeric restriction or a non-primitive map key on a sibling field). +/// Well-formedness already avoids emitting cascade errors that are merely an +/// artifact of a missing reference (for example it does not report +/// `MapKeyNotPrimitive` for a key that is itself a dangling reference), so no +/// suppression is needed here. +fn map_schema_errors( + command: String, + position: String, + errors: Vec, +) -> Vec { + // A single position can reference the same broken target id from several + // spots (for example two record fields aliasing the same dangling type, or + // two members of one record naming the same recursive alias). Those are a + // single fact about that target id at this position, so collapse repeated + // alias-chain failures (`DanglingRef` / `RecursiveAlias`) that share a + // target id. Structural errors carry no shared target and are never merged: + // two distinct ill-formed spots remain two facts. + let mut seen_chain_targets: HashSet = HashSet::new(); + let mut mapped = Vec::with_capacity(errors.len()); + for error in errors { + match error { + SchemaError::DanglingRef(id) => { + if seen_chain_targets.insert(id.clone()) { + mapped.push(ToolValidationError::UnresolvedTypeRef { + command: command.clone(), + position: position.clone(), + id: id.to_string(), + }); + } + } + SchemaError::RecursiveAlias(id) => { + if seen_chain_targets.insert(id.clone()) { + mapped.push(ToolValidationError::IllFormedSchema { + command: command.clone(), + position: position.clone(), + detail: SchemaError::RecursiveAlias(id).to_string(), + }); + } + } + other => mapped.push(ToolValidationError::IllFormedSchema { + command: command.clone(), + position: position.clone(), + detail: other.to_string(), + }), + } + } + mapped +} + +/// Push every [`SchemaType::Ref`] id written structurally in `ty` (descending +/// through all inline constructor children, but not following the refs into +/// definition bodies) into `out`. This mirrors the set of refs the use-site +/// well-formedness check walks, so it can seed pure-alias suppression. +fn collect_structural_ref_ids(ty: &SchemaType, out: &mut HashSet) { match ty { SchemaType::Ref { id, .. } => { - if graph.lookup(id).is_none() { - out.push(id.to_string()); - } + out.insert(id.clone()); } SchemaType::Record { fields, .. } => { - for f in fields { - collect_dangling_refs(graph, &f.body, out); + for field in fields { + collect_structural_ref_ids(&field.body, out); } } SchemaType::Variant { cases, .. } => { - for c in cases { - if let Some(payload) = &c.payload { - collect_dangling_refs(graph, payload, out); + for case in cases { + if let Some(payload) = &case.payload { + collect_structural_ref_ids(payload, out); } } } + SchemaType::Tuple { elements, .. } => { + for element in elements { + collect_structural_ref_ids(element, out); + } + } SchemaType::List { element, .. } | SchemaType::FixedList { element, .. } => { - collect_dangling_refs(graph, element, out); + collect_structural_ref_ids(element, out); } - SchemaType::Option { inner, .. } => collect_dangling_refs(graph, inner, out), SchemaType::Map { key, value, .. } => { - collect_dangling_refs(graph, key, out); - collect_dangling_refs(graph, value, out); - } - SchemaType::Tuple { elements, .. } => { - for e in elements { - collect_dangling_refs(graph, e, out); - } + collect_structural_ref_ids(key, out); + collect_structural_ref_ids(value, out); } + SchemaType::Option { inner, .. } => collect_structural_ref_ids(inner, out), SchemaType::Result { spec, .. } => { if let Some(ok) = &spec.ok { - collect_dangling_refs(graph, ok, out); + collect_structural_ref_ids(ok, out); } if let Some(err) = &spec.err { - collect_dangling_refs(graph, err, out); + collect_structural_ref_ids(err, out); } } SchemaType::Union { spec, .. } => { - for b in &spec.branches { - collect_dangling_refs(graph, &b.body, out); + for branch in &spec.branches { + collect_structural_ref_ids(&branch.body, out); } } - SchemaType::Future { inner: Some(t), .. } | SchemaType::Stream { inner: Some(t), .. } => { - collect_dangling_refs(graph, t, out); + SchemaType::Future { inner, .. } | SchemaType::Stream { inner, .. } => { + if let Some(inner) = inner { + collect_structural_ref_ids(inner, out); + } } _ => {} } } +/// The set of pure-alias definitions (a bare [`SchemaType::Ref`] body) reachable +/// from `seeds` by following only pure-alias edges. A use-site `resolve_ref` +/// walks exactly these chains, so any dangling/recursive-alias failure they +/// carry is already reported at the use site and must not be reported again +/// while validating these definitions' own bodies. The walk marks each +/// pure-alias definition it visits, stops at constructor bodies and missing +/// definitions (which are not marked, so they are still validated), and guards +/// against cycles. +fn pure_alias_closure(graph: &SchemaGraph, seeds: &HashSet) -> HashSet { + let mut covered = HashSet::new(); + for seed in seeds { + let mut current = seed.clone(); + while let Some(def) = graph.lookup(¤t) { + let SchemaType::Ref { id, .. } = &def.body else { + break; + }; + if !covered.insert(current.clone()) { + break; + } + current = id.clone(); + } + } + covered +} + /// Flatten every [`Ref`] referenced by a constraint, regardless of nesting. fn collect_refs(constraint: &Constraint) -> Vec<&Ref> { match constraint { diff --git a/golem-common/src/schema/tool/wit.rs b/golem-common/src/schema/tool/wit.rs index e4098d0b7b..1f19a453a8 100644 --- a/golem-common/src/schema/tool/wit.rs +++ b/golem-common/src/schema/tool/wit.rs @@ -201,6 +201,24 @@ impl From<&wire::Repetition> for Repetition { } } +impl From<&DuplicateKeyPolicy> for wire::DuplicateKeyPolicy { + fn from(p: &DuplicateKeyPolicy) -> Self { + match p { + DuplicateKeyPolicy::Reject => wire::DuplicateKeyPolicy::Reject, + DuplicateKeyPolicy::LastWins => wire::DuplicateKeyPolicy::LastWins, + } + } +} + +impl From<&wire::DuplicateKeyPolicy> for DuplicateKeyPolicy { + fn from(p: &wire::DuplicateKeyPolicy) -> Self { + match p { + wire::DuplicateKeyPolicy::Reject => DuplicateKeyPolicy::Reject, + wire::DuplicateKeyPolicy::LastWins => DuplicateKeyPolicy::LastWins, + } + } +} + impl From<&Quantifier> for wire::Quantifier { fn from(q: &Quantifier) -> Self { match q { @@ -474,6 +492,7 @@ fn encode_positional( type_: enc.encode_type(&p.type_)?, default: p.default.as_ref().map(encode_value).transpose()?, required: p.required, + accepts_stdio: p.accepts_stdio, }) } @@ -490,6 +509,7 @@ fn encode_tail_positional( max: t.max, separator: t.separator.clone(), verbatim: t.verbatim, + accepts_stdio: t.accepts_stdio, }) } @@ -517,10 +537,19 @@ fn encode_option_shape( Ok(match s { OptionShape::Scalar(ty) => wire::OptionShape::Scalar(enc.encode_type(ty)?), OptionShape::OptionalScalar(ty) => wire::OptionShape::OptionalScalar(enc.encode_type(ty)?), - OptionShape::Repeatable(r) => wire::OptionShape::Repeatable(wire::RepeatableShape { - repetition: wire::Repetition::from(&r.repetition), - type_: enc.encode_type(&r.type_)?, - }), + OptionShape::RepeatableList(r) => { + wire::OptionShape::RepeatableList(wire::RepeatableListShape { + repetition: wire::Repetition::from(&r.repetition), + item_type: enc.encode_type(&r.item_type)?, + }) + } + OptionShape::RepeatableMap(r) => { + wire::OptionShape::RepeatableMap(wire::RepeatableMapShape { + repetition: wire::Repetition::from(&r.repetition), + map_type: enc.encode_type(&r.map_type)?, + duplicate_key_policy: wire::DuplicateKeyPolicy::from(&r.duplicate_key_policy), + }) + } }) } @@ -668,6 +697,7 @@ fn decode_positional(dec: &GraphDecoder, p: &wire::Positional) -> Result { OptionShape::OptionalScalar(dec.decode_type_at(*ty)?) } - wire::OptionShape::Repeatable(r) => OptionShape::Repeatable(RepeatableShape { + wire::OptionShape::RepeatableList(r) => OptionShape::RepeatableList(RepeatableListShape { + repetition: Repetition::from(&r.repetition), + item_type: dec.decode_type_at(r.item_type)?, + }), + wire::OptionShape::RepeatableMap(r) => OptionShape::RepeatableMap(RepeatableMapShape { repetition: Repetition::from(&r.repetition), - type_: dec.decode_type_at(r.type_)?, + map_type: dec.decode_type_at(r.map_type)?, + duplicate_key_policy: DuplicateKeyPolicy::from(&r.duplicate_key_policy), }), }) } diff --git a/golem-common/src/schema/validation/mod.rs b/golem-common/src/schema/validation/mod.rs index e6b89fdfdc..3300d7fd0d 100644 --- a/golem-common/src/schema/validation/mod.rs +++ b/golem-common/src/schema/validation/mod.rs @@ -27,4 +27,4 @@ pub use placement::{ }; pub use subtyping::{is_assignable, is_equivalent_cross_graph}; pub use value::{ValueError, ValuePath, ValuePathSegment, validate_value}; -pub use well_formedness::{SchemaError, validate_graph}; +pub use well_formedness::{SchemaError, validate_graph, validate_root_type}; diff --git a/golem-common/src/schema/validation/tests/wellformed_strategy.rs b/golem-common/src/schema/validation/tests/wellformed_strategy.rs index 0b8110347a..8f5dfe28a1 100644 --- a/golem-common/src/schema/validation/tests/wellformed_strategy.rs +++ b/golem-common/src/schema/validation/tests/wellformed_strategy.rs @@ -21,7 +21,7 @@ //! union branches are filtered to ones whose body satisfies their //! discriminator rule. -use crate::schema::graph::{SchemaGraph, SchemaTypeDef}; +use crate::schema::graph::{RefResolutionError, SchemaGraph, SchemaTypeDef}; use crate::schema::metadata::TypeId; use crate::schema::proptest_strategies::schema_graph_strategy; use crate::schema::schema_type::{ @@ -49,6 +49,26 @@ pub fn wellformed_schema_graph_strategy() -> impl Strategy .collect(); g.defs = new_defs; g.root = sanitise_type(&g.root, &known); + // Break pure alias cycles: a def/root whose top-level ref chain loops + // without ever reaching a concrete type (`A -> ref B`, `B -> ref A`) is + // ill-formed, so replace such bodies with a harmless primitive. Only + // pure alias chains are affected; recursion through a value-shrinking + // constructor (record/list/...) resolves to that constructor. + let alias_snapshot = g.clone(); + for def in &mut g.defs { + if matches!( + alias_snapshot.resolve_ref(&def.body), + Err(RefResolutionError::RecursiveRef(_)) + ) { + def.body = SchemaType::bool(); + } + } + if matches!( + alias_snapshot.resolve_ref(&g.root), + Err(RefResolutionError::RecursiveRef(_)) + ) { + g.root = SchemaType::bool(); + } // Second pass: now that the full def set is known, walk every type // and wrap option whose X (after ref resolution) is nullable. The // first sanitise_type pass treats `Ref(id)` conservatively because diff --git a/golem-common/wit/deps/golem-core-v2/golem-core-v2.wit b/golem-common/wit/deps/golem-core-v2/golem-core-v2.wit index 950c5c843b..c2a4bd4b4d 100644 --- a/golem-common/wit/deps/golem-core-v2/golem-core-v2.wit +++ b/golem-common/wit/deps/golem-core-v2/golem-core-v2.wit @@ -221,16 +221,16 @@ interface types { // --- Primitives --- bool-type, - s8-type, - s16-type, - s32-type, - s64-type, - u8-type, - u16-type, - u32-type, - u64-type, - f32-type, - f64-type, + s8-type(option), + s16-type(option), + s32-type(option), + s64-type(option), + u8-type(option), + u16-type(option), + u32-type(option), + u64-type(option), + f32-type(option), + f64-type(option), char-type, string-type, @@ -296,6 +296,27 @@ interface types { err: option, } + // --- Numeric restrictions --- + + /// A numeric bound usable across every numeric representation. Float bounds + /// carry canonical IEEE-754 `f64` bits (NaN/inf rejected, -0.0 normalized); + /// comparisons decode the bits to `f64` and compare numerically. + variant numeric-bound { + signed(s64), + unsigned(u64), + float-bits(u64), + } + + /// Inline numeric refinement. `none` on a numeric type means unconstrained + /// (the common case). The empty restriction set is never encoded as `some`: + /// producers normalize it to `none`, decoders normalize a decoded empty to + /// `none`. `unit` is schema/help metadata only. + record numeric-restrictions { + min: option, + max: option, + unit: option, + } + // --- Text / Binary restrictions --- record text-restrictions { diff --git a/golem-common/wit/deps/golem-tool/common.wit b/golem-common/wit/deps/golem-tool/common.wit index 2d28cd96df..f28d894d44 100644 --- a/golem-common/wit/deps/golem-tool/common.wit +++ b/golem-common/wit/deps/golem-tool/common.wit @@ -57,11 +57,15 @@ package golem:tool@0.1.0; /// no items, is valid). /// • A `positional` / `option` / `result` / `error` `type-node-index` /// resolves to a node in `tool.schema`. -/// • A `repeatable` option's `default`, if present, is a list whose -/// elements are values of the `repeatable-shape.%type` node. -/// • A `value-is` ref naming a repeatable option, tail positional, or -/// otherwise list-shaped target means "any occurrence / element -/// equals this literal"; the literal is a value of the element type. +/// • A `repeatable-list` option's `default`, if present, is a `list` +/// whose elements are values of the `repeatable-list-shape.item-type` +/// node. A `repeatable-map` option's `default`, if present, is a `map` +/// value of the `repeatable-map-shape.map-type` node. +/// • A `value-is` ref naming a `repeatable-list` option, tail positional, +/// or otherwise list-shaped target means "any occurrence / element +/// equals this literal"; the literal is a value of the element type. For +/// a `repeatable-map` option the literal is a value of the map's value +/// type (any entry's value equals this literal). /// • The tool's identity is its root command name /// (`commands.nodes[0].name`); `get-tool(name)` and /// `guest.invoke(tool-name, …)` match against it. `commands.nodes` @@ -160,6 +164,9 @@ interface common { /// Default value, interpreted against `%type` in `tool.schema`. default: option, required: bool, + /// If true, the positional's value may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } record tail-positional { @@ -175,6 +182,9 @@ interface common { /// If true, tokens after `separator` are not flag-parsed (for /// `kubectl exec -- CMD ARGS...`). verbatim: bool, + /// If true, the tail items may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } // Options and flags @@ -199,14 +209,35 @@ interface common { /// (--decorate, --signed[=mode], --force-with-lease[=ref]). Index into /// `tool.schema`. optional-scalar(type-node-index), - /// Repeatable; value type in the derived signature is list-of-scalar. - repeatable(repeatable-shape), + /// Repeatable scalar option (`-e a -e b`); the collected value is a + /// `list` of the element type. + repeatable-list(repeatable-list-shape), + /// Repeatable key-value option (`-c a=1 -c b=2`); the collected value is a + /// `golem:core` `map` node, never a `list`. + repeatable-map(repeatable-map-shape), } - record repeatable-shape { + record repeatable-list-shape { repetition: repetition, - /// Index into `tool.schema`. - %type: type-node-index, + /// Index into `tool.schema`; the element type of the collected `list`. + item-type: type-node-index, + } + + record repeatable-map-shape { + repetition: repetition, + /// Index into `tool.schema`; a `golem:core` `map` (key + value) node. The + /// collected value is this map. + map-type: type-node-index, + /// What happens when the same key is supplied more than once. + duplicate-key-policy: duplicate-key-policy, + } + + /// Resolution policy for a repeated key in a `repeatable-map` option. + enum duplicate-key-policy { + /// A repeated key is a usage error. + reject, + /// A repeated key takes the last supplied value. + last-wins, } variant repetition { diff --git a/golem-schema-derive/src/codegen/poem.rs b/golem-schema-derive/src/codegen/poem.rs index 290806ab87..01b9210817 100644 --- a/golem-schema-derive/src/codegen/poem.rs +++ b/golem-schema-derive/src/codegen/poem.rs @@ -935,8 +935,10 @@ fn parse_serde_field_attrs(attrs: &[Attribute]) -> syn::Result let _: LitStr = meta.value()?.parse()?; } } - // Parsed but irrelevant to the schema shape this derive models. - "skip_serializing_if" => { + // Parsed but irrelevant to the schema shape this derive models: + // both customize (de)serialization behavior, not the field type + // exposed in the generated OpenAPI schema. + "skip_serializing_if" | "deserialize_with" => { let _: LitStr = meta.value()?.parse()?; } other => { diff --git a/golem-schema/src/schema/protobuf.rs b/golem-schema/src/schema/protobuf.rs index 0f1366e593..049e63226a 100644 --- a/golem-schema/src/schema/protobuf.rs +++ b/golem-schema/src/schema/protobuf.rs @@ -19,9 +19,10 @@ use crate::model::EnvironmentId; use crate::schema::graph::{SchemaGraph, SchemaTypeDef, TypedSchemaValue}; use crate::schema::metadata::{MetadataEnvelope, Role, TypeId}; use crate::schema::schema_type::{ - BinaryRestrictions, DiscriminatorRule, FieldDiscriminator, NamedFieldType, PathDirection, - PathKind, PathSpec, QuantitySpec, QuantityValue, QuotaTokenSpec, ResultSpec, SchemaType, - SecretSpec, TextRestrictions, UnionBranch, UnionSpec, UrlRestrictions, VariantCaseType, + BinaryRestrictions, DiscriminatorRule, FieldDiscriminator, NamedFieldType, NumericBound, + NumericRestrictions, PathDirection, PathKind, PathSpec, QuantitySpec, QuantityValue, + QuotaTokenSpec, ResultSpec, SchemaType, SecretSpec, TextRestrictions, UnionBranch, UnionSpec, + UrlRestrictions, VariantCaseType, }; use crate::schema::schema_value::{ BinaryValuePayload, DurationValuePayload, QuotaTokenValuePayload, ResultValuePayload, @@ -209,16 +210,16 @@ impl From for proto::SchemaType { let body = match value { SchemaType::Ref { id, .. } => Body::RefType(id.0), SchemaType::Bool { .. } => Body::BoolType(ProtoEmpty {}), - SchemaType::S8 { .. } => Body::S8Type(ProtoEmpty {}), - SchemaType::S16 { .. } => Body::S16Type(ProtoEmpty {}), - SchemaType::S32 { .. } => Body::S32Type(ProtoEmpty {}), - SchemaType::S64 { .. } => Body::S64Type(ProtoEmpty {}), - SchemaType::U8 { .. } => Body::U8Type(ProtoEmpty {}), - SchemaType::U16 { .. } => Body::U16Type(ProtoEmpty {}), - SchemaType::U32 { .. } => Body::U32Type(ProtoEmpty {}), - SchemaType::U64 { .. } => Body::U64Type(ProtoEmpty {}), - SchemaType::F32 { .. } => Body::F32Type(ProtoEmpty {}), - SchemaType::F64 { .. } => Body::F64Type(ProtoEmpty {}), + SchemaType::S8 { restrictions, .. } => Body::S8Type(numeric_to_proto(restrictions)), + SchemaType::S16 { restrictions, .. } => Body::S16Type(numeric_to_proto(restrictions)), + SchemaType::S32 { restrictions, .. } => Body::S32Type(numeric_to_proto(restrictions)), + SchemaType::S64 { restrictions, .. } => Body::S64Type(numeric_to_proto(restrictions)), + SchemaType::U8 { restrictions, .. } => Body::U8Type(numeric_to_proto(restrictions)), + SchemaType::U16 { restrictions, .. } => Body::U16Type(numeric_to_proto(restrictions)), + SchemaType::U32 { restrictions, .. } => Body::U32Type(numeric_to_proto(restrictions)), + SchemaType::U64 { restrictions, .. } => Body::U64Type(numeric_to_proto(restrictions)), + SchemaType::F32 { restrictions, .. } => Body::F32Type(numeric_to_proto(restrictions)), + SchemaType::F64 { restrictions, .. } => Body::F64Type(numeric_to_proto(restrictions)), SchemaType::Char { .. } => Body::CharType(ProtoEmpty {}), SchemaType::String { .. } => Body::StringType(ProtoEmpty {}), SchemaType::Record { fields, .. } => Body::RecordType(proto::RecordType { @@ -290,16 +291,46 @@ impl TryFrom for SchemaType { metadata, }, Body::BoolType(_) => SchemaType::Bool { metadata }, - Body::S8Type(_) => SchemaType::S8 { metadata }, - Body::S16Type(_) => SchemaType::S16 { metadata }, - Body::S32Type(_) => SchemaType::S32 { metadata }, - Body::S64Type(_) => SchemaType::S64 { metadata }, - Body::U8Type(_) => SchemaType::U8 { metadata }, - Body::U16Type(_) => SchemaType::U16 { metadata }, - Body::U32Type(_) => SchemaType::U32 { metadata }, - Body::U64Type(_) => SchemaType::U64 { metadata }, - Body::F32Type(_) => SchemaType::F32 { metadata }, - Body::F64Type(_) => SchemaType::F64 { metadata }, + Body::S8Type(r) => SchemaType::S8 { + restrictions: numeric_from_proto(r)?, + metadata, + }, + Body::S16Type(r) => SchemaType::S16 { + restrictions: numeric_from_proto(r)?, + metadata, + }, + Body::S32Type(r) => SchemaType::S32 { + restrictions: numeric_from_proto(r)?, + metadata, + }, + Body::S64Type(r) => SchemaType::S64 { + restrictions: numeric_from_proto(r)?, + metadata, + }, + Body::U8Type(r) => SchemaType::U8 { + restrictions: numeric_from_proto(r)?, + metadata, + }, + Body::U16Type(r) => SchemaType::U16 { + restrictions: numeric_from_proto(r)?, + metadata, + }, + Body::U32Type(r) => SchemaType::U32 { + restrictions: numeric_from_proto(r)?, + metadata, + }, + Body::U64Type(r) => SchemaType::U64 { + restrictions: numeric_from_proto(r)?, + metadata, + }, + Body::F32Type(r) => SchemaType::F32 { + restrictions: numeric_from_proto(r)?, + metadata, + }, + Body::F64Type(r) => SchemaType::F64 { + restrictions: numeric_from_proto(r)?, + metadata, + }, Body::CharType(_) => SchemaType::Char { metadata }, Body::StringType(_) => SchemaType::String { metadata }, Body::RecordType(rt) => SchemaType::Record { @@ -457,6 +488,53 @@ impl TryFrom for VariantCaseType { // --- rich scalar specs ------------------------------------------------------- +fn numeric_to_proto(r: Option) -> proto::NumericRestrictions { + match r { + Some(r) => proto::NumericRestrictions { + min: r.min.map(numeric_bound_to_proto), + max: r.max.map(numeric_bound_to_proto), + unit: r.unit, + }, + None => proto::NumericRestrictions::default(), + } +} + +fn numeric_bound_to_proto(b: NumericBound) -> proto::NumericBound { + use proto::numeric_bound::Bound; + proto::NumericBound { + bound: Some(match b { + NumericBound::Signed(v) => Bound::Signed(v), + NumericBound::Unsigned(v) => Bound::Unsigned(v), + NumericBound::FloatBits(bits) => Bound::FloatBits(bits), + }), + } +} + +/// Decode a proto numeric restriction, normalizing a decoded empty restriction +/// set to `None`. A present `NumericBound` with no `bound` arm set is an error. +fn numeric_from_proto( + r: proto::NumericRestrictions, +) -> Result, String> { + let min = r.min.map(numeric_bound_from_proto).transpose()?; + let max = r.max.map(numeric_bound_from_proto).transpose()?; + Ok(NumericRestrictions { + min, + max, + unit: r.unit, + } + .normalize()) +} + +fn numeric_bound_from_proto(b: proto::NumericBound) -> Result { + use proto::numeric_bound::Bound; + match b.bound { + Some(Bound::Signed(v)) => Ok(NumericBound::Signed(v)), + Some(Bound::Unsigned(v)) => Ok(NumericBound::Unsigned(v)), + Some(Bound::FloatBits(bits)) => Ok(NumericBound::FloatBits(bits)), + None => Err("numeric bound message has no value set".to_string()), + } +} + impl From for proto::TextRestrictions { fn from(value: TextRestrictions) -> Self { Self { diff --git a/golem-schema/src/schema/schema_type.rs b/golem-schema/src/schema/schema_type.rs index 4f3906a8a1..f1511285e1 100644 --- a/golem-schema/src/schema/schema_type.rs +++ b/golem-schema/src/schema/schema_type.rs @@ -59,42 +59,102 @@ pub enum SchemaType { metadata: MetadataEnvelope, }, S8 { + #[serde( + default, + skip_serializing_if = "Option::is_none", + deserialize_with = "deserialize_normalized_numeric_restrictions" + )] + restrictions: Option, #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] metadata: MetadataEnvelope, }, S16 { + #[serde( + default, + skip_serializing_if = "Option::is_none", + deserialize_with = "deserialize_normalized_numeric_restrictions" + )] + restrictions: Option, #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] metadata: MetadataEnvelope, }, S32 { + #[serde( + default, + skip_serializing_if = "Option::is_none", + deserialize_with = "deserialize_normalized_numeric_restrictions" + )] + restrictions: Option, #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] metadata: MetadataEnvelope, }, S64 { + #[serde( + default, + skip_serializing_if = "Option::is_none", + deserialize_with = "deserialize_normalized_numeric_restrictions" + )] + restrictions: Option, #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] metadata: MetadataEnvelope, }, U8 { + #[serde( + default, + skip_serializing_if = "Option::is_none", + deserialize_with = "deserialize_normalized_numeric_restrictions" + )] + restrictions: Option, #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] metadata: MetadataEnvelope, }, U16 { + #[serde( + default, + skip_serializing_if = "Option::is_none", + deserialize_with = "deserialize_normalized_numeric_restrictions" + )] + restrictions: Option, #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] metadata: MetadataEnvelope, }, U32 { + #[serde( + default, + skip_serializing_if = "Option::is_none", + deserialize_with = "deserialize_normalized_numeric_restrictions" + )] + restrictions: Option, #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] metadata: MetadataEnvelope, }, U64 { + #[serde( + default, + skip_serializing_if = "Option::is_none", + deserialize_with = "deserialize_normalized_numeric_restrictions" + )] + restrictions: Option, #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] metadata: MetadataEnvelope, }, F32 { + #[serde( + default, + skip_serializing_if = "Option::is_none", + deserialize_with = "deserialize_normalized_numeric_restrictions" + )] + restrictions: Option, #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] metadata: MetadataEnvelope, }, F64 { + #[serde( + default, + skip_serializing_if = "Option::is_none", + deserialize_with = "deserialize_normalized_numeric_restrictions" + )] + restrictions: Option, #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] metadata: MetadataEnvelope, }, @@ -235,16 +295,16 @@ impl SchemaType { match self { SchemaType::Ref { metadata, .. } | SchemaType::Bool { metadata } - | SchemaType::S8 { metadata } - | SchemaType::S16 { metadata } - | SchemaType::S32 { metadata } - | SchemaType::S64 { metadata } - | SchemaType::U8 { metadata } - | SchemaType::U16 { metadata } - | SchemaType::U32 { metadata } - | SchemaType::U64 { metadata } - | SchemaType::F32 { metadata } - | SchemaType::F64 { metadata } + | SchemaType::S8 { metadata, .. } + | SchemaType::S16 { metadata, .. } + | SchemaType::S32 { metadata, .. } + | SchemaType::S64 { metadata, .. } + | SchemaType::U8 { metadata, .. } + | SchemaType::U16 { metadata, .. } + | SchemaType::U32 { metadata, .. } + | SchemaType::U64 { metadata, .. } + | SchemaType::F32 { metadata, .. } + | SchemaType::F64 { metadata, .. } | SchemaType::Char { metadata } | SchemaType::String { metadata } | SchemaType::Record { metadata, .. } @@ -277,16 +337,16 @@ impl SchemaType { match self { SchemaType::Ref { metadata, .. } | SchemaType::Bool { metadata } - | SchemaType::S8 { metadata } - | SchemaType::S16 { metadata } - | SchemaType::S32 { metadata } - | SchemaType::S64 { metadata } - | SchemaType::U8 { metadata } - | SchemaType::U16 { metadata } - | SchemaType::U32 { metadata } - | SchemaType::U64 { metadata } - | SchemaType::F32 { metadata } - | SchemaType::F64 { metadata } + | SchemaType::S8 { metadata, .. } + | SchemaType::S16 { metadata, .. } + | SchemaType::S32 { metadata, .. } + | SchemaType::S64 { metadata, .. } + | SchemaType::U8 { metadata, .. } + | SchemaType::U16 { metadata, .. } + | SchemaType::U32 { metadata, .. } + | SchemaType::U64 { metadata, .. } + | SchemaType::F32 { metadata, .. } + | SchemaType::F64 { metadata, .. } | SchemaType::Char { metadata } | SchemaType::String { metadata } | SchemaType::Record { metadata, .. } @@ -320,6 +380,41 @@ impl SchemaType { self } + /// The numeric representation of this node, if it is a numeric type. + pub fn numeric_repr(&self) -> Option { + match self { + SchemaType::S8 { .. } => Some(NumericRepr::S8), + SchemaType::S16 { .. } => Some(NumericRepr::S16), + SchemaType::S32 { .. } => Some(NumericRepr::S32), + SchemaType::S64 { .. } => Some(NumericRepr::S64), + SchemaType::U8 { .. } => Some(NumericRepr::U8), + SchemaType::U16 { .. } => Some(NumericRepr::U16), + SchemaType::U32 { .. } => Some(NumericRepr::U32), + SchemaType::U64 { .. } => Some(NumericRepr::U64), + SchemaType::F32 { .. } => Some(NumericRepr::F32), + SchemaType::F64 { .. } => Some(NumericRepr::F64), + _ => None, + } + } + + /// The numeric restrictions of this node, if it is a numeric type with + /// restrictions set. + pub fn numeric_restrictions(&self) -> Option<&NumericRestrictions> { + match self { + SchemaType::S8 { restrictions, .. } + | SchemaType::S16 { restrictions, .. } + | SchemaType::S32 { restrictions, .. } + | SchemaType::S64 { restrictions, .. } + | SchemaType::U8 { restrictions, .. } + | SchemaType::U16 { restrictions, .. } + | SchemaType::U32 { restrictions, .. } + | SchemaType::U64 { restrictions, .. } + | SchemaType::F32 { restrictions, .. } + | SchemaType::F64 { restrictions, .. } => restrictions.as_ref(), + _ => None, + } + } + // --- Ergonomic constructors ------------------------------------------ // // These default the metadata envelope to empty; callers that need @@ -338,51 +433,61 @@ impl SchemaType { } pub fn s8() -> Self { Self::S8 { + restrictions: None, metadata: MetadataEnvelope::default(), } } pub fn s16() -> Self { Self::S16 { + restrictions: None, metadata: MetadataEnvelope::default(), } } pub fn s32() -> Self { Self::S32 { + restrictions: None, metadata: MetadataEnvelope::default(), } } pub fn s64() -> Self { Self::S64 { + restrictions: None, metadata: MetadataEnvelope::default(), } } pub fn u8() -> Self { Self::U8 { + restrictions: None, metadata: MetadataEnvelope::default(), } } pub fn u16() -> Self { Self::U16 { + restrictions: None, metadata: MetadataEnvelope::default(), } } pub fn u32() -> Self { Self::U32 { + restrictions: None, metadata: MetadataEnvelope::default(), } } pub fn u64() -> Self { Self::U64 { + restrictions: None, metadata: MetadataEnvelope::default(), } } pub fn f32() -> Self { Self::F32 { + restrictions: None, metadata: MetadataEnvelope::default(), } } pub fn f64() -> Self { Self::F64 { + restrictions: None, metadata: MetadataEnvelope::default(), } } @@ -567,6 +672,331 @@ pub struct ResultSpec { pub err: Option>, } +// --- Numeric --- + +/// A numeric bound usable across every numeric representation. +/// +/// `SchemaType` derives `Eq`, and an `i64` mantissa cannot represent +/// `u64::MAX`, so the bound is a three-family sum. Float bounds store canonical +/// IEEE-754 `f64` bits (`NaN`/`inf` rejected at construction, `-0.0` normalized +/// to `+0.0`) so the type stays `Eq`; comparisons always decode the bits back to +/// `f64` and compare numerically, never by bit order. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, IntoSchema, FromSchema)] +#[cfg_attr(feature = "full", derive(desert_rust::BinaryCodec))] +#[cfg_attr(feature = "full", desert(evolution()))] +#[serde(tag = "kind", content = "value", rename_all = "kebab-case")] +#[cfg_attr(feature = "full", derive(golem_schema_derive::PoemSchema))] +pub enum NumericBound { + Signed(i64), + Unsigned(u64), + FloatBits(u64), +} + +/// Error returned when constructing a numeric bound from an invalid value. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NumericBoundError { + /// The float value was `NaN` or infinite. + NonFinite, +} + +impl std::fmt::Display for NumericBoundError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + NumericBoundError::NonFinite => write!(f, "numeric float bound must be finite"), + } + } +} + +impl std::error::Error for NumericBoundError {} + +impl NumericBound { + /// Construct a float bound from an `f64`, rejecting `NaN`/`inf` and + /// normalizing `-0.0` to `+0.0`. + pub fn float(value: f64) -> Result { + if !value.is_finite() { + return Err(NumericBoundError::NonFinite); + } + // Normalize -0.0 to +0.0 so canonical bits are stable for `Eq`. + let normalized = value + 0.0; + Ok(NumericBound::FloatBits(normalized.to_bits())) + } + + /// The float value of a `FloatBits` bound (decoded from canonical bits). + pub fn as_f64(&self) -> Option { + match self { + NumericBound::FloatBits(bits) => Some(f64::from_bits(*bits)), + _ => None, + } + } +} + +/// Inline numeric refinement carried by the numeric `SchemaType` variants. +/// +/// `None` on the variant means "unconstrained" — the common, hot-path case, a +/// single tag rather than three carried inner `Option`s. The empty restriction +/// set is never stored as `Some`: smart constructors and decoders collapse it to +/// `None` via [`NumericRestrictions::normalize`], and well-formedness rejects a +/// stored `Some(empty)`. +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize, IntoSchema, FromSchema)] +#[cfg_attr(feature = "full", derive(desert_rust::BinaryCodec))] +#[cfg_attr(feature = "full", desert(evolution()))] +#[serde(rename_all = "camelCase")] +#[cfg_attr(feature = "full", derive(golem_schema_derive::PoemSchema))] +pub struct NumericRestrictions { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub min: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub max: Option, + /// Free-form unit annotation. Schema/help metadata only: numeric + /// `SchemaValue`s carry no unit, so value validation never checks it; + /// equivalence/subtyping require the normalized unit to match exactly. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub unit: Option, +} + +impl NumericRestrictions { + /// True when there is nothing to constrain (no bounds and no non-empty unit). + pub fn is_empty(&self) -> bool { + self.min.is_none() + && self.max.is_none() + && self.unit.as_ref().map(|u| u.is_empty()).unwrap_or(true) + } + + /// Collapse the empty restriction set to `None`, dropping an empty `unit` + /// and canonicalizing float bounds (so a decoded `-0.0` becomes `+0.0`). + /// This enforces the canonicalization invariants that `Some(empty)` is never + /// constructed and that two restriction sets which differ only by float zero + /// sign compare equal (`SchemaType` derives `Eq` and feeds byte-equivalence). + pub fn normalize(mut self) -> Option { + self.min = self.min.map(canonicalize_bound); + self.max = self.max.map(canonicalize_bound); + if self.unit.as_ref().map(|u| u.is_empty()).unwrap_or(false) { + self.unit = None; + } + if self.is_empty() { None } else { Some(self) } + } + + /// Repr-aware well-formedness check, shared by every validation entry point + /// (well-formedness, subtyping, value validation, macro refinement) so no + /// path assumes a prior well-formedness pass. + /// + /// Rejects: a stored empty set (`Some(empty)` must never exist), a bound + /// whose family does not match the repr, an integer repr carrying a float + /// bound, a bound that does not fit the repr's range, an `F32` bound that + /// does not round-trip through `f32`, and `min > max` (compared numerically). + pub fn validate_for_repr(&self, repr: NumericRepr) -> Result<(), NumericRestrictionError> { + if self.is_empty() { + return Err(NumericRestrictionError::EmptyStored); + } + if let Some(min) = self.min { + check_bound_repr(min, repr)?; + } + if let Some(max) = self.max { + check_bound_repr(max, repr)?; + } + if let (Some(min), Some(max)) = (self.min, self.max) { + match numeric_bound_cmp(min, max) { + Some(std::cmp::Ordering::Greater) => { + return Err(NumericRestrictionError::MinGreaterThanMax); + } + Some(_) => {} + None => return Err(NumericRestrictionError::FamilyMismatch), + } + } + Ok(()) + } +} + +/// The concrete numeric representation of a numeric `SchemaType` variant. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NumericRepr { + S8, + S16, + S32, + S64, + U8, + U16, + U32, + U64, + F32, + F64, +} + +impl NumericRepr { + /// True for the integer reprs (`S*`/`U*`); false for `F32`/`F64`. + pub fn is_integer(self) -> bool { + !matches!(self, NumericRepr::F32 | NumericRepr::F64) + } + + fn family(self) -> NumericFamily { + match self { + NumericRepr::S8 | NumericRepr::S16 | NumericRepr::S32 | NumericRepr::S64 => { + NumericFamily::Signed + } + NumericRepr::U8 | NumericRepr::U16 | NumericRepr::U32 | NumericRepr::U64 => { + NumericFamily::Unsigned + } + NumericRepr::F32 | NumericRepr::F64 => NumericFamily::Float, + } + } + + fn signed_range(self) -> Option<(i64, i64)> { + match self { + NumericRepr::S8 => Some((i8::MIN as i64, i8::MAX as i64)), + NumericRepr::S16 => Some((i16::MIN as i64, i16::MAX as i64)), + NumericRepr::S32 => Some((i32::MIN as i64, i32::MAX as i64)), + NumericRepr::S64 => Some((i64::MIN, i64::MAX)), + _ => None, + } + } + + fn unsigned_max(self) -> Option { + match self { + NumericRepr::U8 => Some(u8::MAX as u64), + NumericRepr::U16 => Some(u16::MAX as u64), + NumericRepr::U32 => Some(u32::MAX as u64), + NumericRepr::U64 => Some(u64::MAX), + _ => None, + } + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum NumericFamily { + Signed, + Unsigned, + Float, +} + +impl NumericBound { + fn family(self) -> NumericFamily { + match self { + NumericBound::Signed(_) => NumericFamily::Signed, + NumericBound::Unsigned(_) => NumericFamily::Unsigned, + NumericBound::FloatBits(_) => NumericFamily::Float, + } + } +} + +/// Canonicalize a numeric bound so equal values have equal bits. Currently this +/// only affects float bounds: a `-0.0` (which compares equal to `+0.0` +/// numerically but has different bits) is rewritten to canonical `+0.0` so the +/// `Eq`/byte-equivalence invariants hold for decoded bounds. `NaN`/`inf` bits +/// are left untouched (well-formedness rejects them). +fn canonicalize_bound(b: NumericBound) -> NumericBound { + match b { + NumericBound::FloatBits(bits) => { + if f64::from_bits(bits) == 0.0 { + NumericBound::FloatBits(0) + } else { + b + } + } + other => other, + } +} + +/// serde helper: deserialize an `Option` field on a numeric +/// `SchemaType` variant, applying the same empty→`None` and float canonicalization +/// normalization the WIT/protobuf decoders use, so JSON is a faithful decode +/// boundary (`restrictions: {}` or `unit: ""` collapse to `None`). +fn deserialize_normalized_numeric_restrictions<'de, D>( + deserializer: D, +) -> Result, D::Error> +where + D: serde::Deserializer<'de>, +{ + let raw = Option::::deserialize(deserializer)?; + Ok(raw.and_then(NumericRestrictions::normalize)) +} + +/// Numeric comparison of two bounds of the same family. Returns `None` when the +/// families differ (which callers treat as a family mismatch / "not a subtype"). +pub fn numeric_bound_cmp(a: NumericBound, b: NumericBound) -> Option { + match (a, b) { + (NumericBound::Signed(x), NumericBound::Signed(y)) => Some(x.cmp(&y)), + (NumericBound::Unsigned(x), NumericBound::Unsigned(y)) => Some(x.cmp(&y)), + (NumericBound::FloatBits(x), NumericBound::FloatBits(y)) => { + // Both are finite by construction, so partial_cmp is total here. + f64::from_bits(x).partial_cmp(&f64::from_bits(y)) + } + _ => None, + } +} + +fn check_bound_repr(bound: NumericBound, repr: NumericRepr) -> Result<(), NumericRestrictionError> { + if bound.family() != repr.family() { + return Err(NumericRestrictionError::FamilyMismatch); + } + match bound { + NumericBound::Signed(v) => { + let (lo, hi) = repr.signed_range().expect("signed family => signed range"); + if v < lo || v > hi { + return Err(NumericRestrictionError::BoundOutOfRange); + } + } + NumericBound::Unsigned(v) => { + let hi = repr + .unsigned_max() + .expect("unsigned family => unsigned max"); + if v > hi { + return Err(NumericRestrictionError::BoundOutOfRange); + } + } + NumericBound::FloatBits(bits) => { + let v = f64::from_bits(bits); + if !v.is_finite() { + return Err(NumericRestrictionError::NonFiniteFloat); + } + if repr == NumericRepr::F32 && (v as f32) as f64 != v { + return Err(NumericRestrictionError::FloatNotRoundTrippable); + } + } + } + Ok(()) +} + +/// Reasons a numeric restriction set is not well-formed for a given repr. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NumericRestrictionError { + /// An empty restriction set was stored as `Some` (must be `None`). + EmptyStored, + /// A bound's family does not match the repr (e.g. signed bound on `U32`). + FamilyMismatch, + /// A bound value does not fit the repr's range. + BoundOutOfRange, + /// A float bound was `NaN`/infinite. + NonFiniteFloat, + /// An `F32` bound does not round-trip through `f32`. + FloatNotRoundTrippable, + /// `min` is numerically greater than `max`. + MinGreaterThanMax, +} + +impl std::fmt::Display for NumericRestrictionError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let msg = match self { + NumericRestrictionError::EmptyStored => { + "numeric restriction set is empty (must be None)" + } + NumericRestrictionError::FamilyMismatch => { + "numeric bound family does not match the numeric type" + } + NumericRestrictionError::BoundOutOfRange => { + "numeric bound does not fit the numeric type's range" + } + NumericRestrictionError::NonFiniteFloat => "numeric float bound must be finite", + NumericRestrictionError::FloatNotRoundTrippable => { + "f32 numeric bound does not round-trip through f32" + } + NumericRestrictionError::MinGreaterThanMax => { + "numeric min bound is greater than max bound" + } + }; + write!(f, "{msg}") + } +} + // --- Text / Binary --- #[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize, IntoSchema, FromSchema)] @@ -793,3 +1223,107 @@ pub struct QuotaTokenSpec { #[serde(default, skip_serializing_if = "Option::is_none")] pub resource_name: Option, } + +#[cfg(test)] +mod numeric_restriction_tests { + use super::*; + use test_r::test; + + #[test] + fn normalize_drops_empty_to_none() { + assert_eq!(NumericRestrictions::default().normalize(), None); + assert_eq!( + NumericRestrictions { + min: None, + max: None, + unit: Some(String::new()), + } + .normalize(), + None + ); + } + + #[test] + fn normalize_canonicalizes_negative_zero_float_bound() { + let neg_zero = NumericBound::FloatBits((-0.0f64).to_bits()); + let r = NumericRestrictions { + min: Some(neg_zero), + max: None, + unit: None, + } + .normalize() + .expect("non-empty restriction"); + assert_eq!(r.min, Some(NumericBound::FloatBits(0))); + // Canonical +0.0 has bits 0, so it now equals a freshly-constructed +0.0. + assert_eq!(r.min, Some(NumericBound::float(0.0).unwrap())); + } + + #[test] + fn serde_empty_restrictions_object_deserializes_to_none() { + let json = serde_json::json!({ "kind": "u32", "value": { "restrictions": {} } }); + let ty: SchemaType = serde_json::from_value(json).expect("deserialize"); + assert_eq!(ty.numeric_restrictions(), None); + } + + #[test] + fn serde_empty_unit_deserializes_to_none() { + let json = + serde_json::json!({ "kind": "u32", "value": { "restrictions": { "unit": "" } } }); + let ty: SchemaType = serde_json::from_value(json).expect("deserialize"); + assert_eq!(ty.numeric_restrictions(), None); + } + + #[test] + fn serde_empty_unit_with_bound_drops_only_the_unit() { + // An empty `unit` is non-canonical and must normalize to `None`, but a + // present bound keeps the restriction set alive (it is not empty). + let json = serde_json::json!({ + "kind": "u32", + "value": { + "restrictions": { + "min": { "kind": "unsigned", "value": 1 }, + "unit": "" + } + } + }); + let ty: SchemaType = serde_json::from_value(json).expect("deserialize"); + assert_eq!( + ty.numeric_restrictions(), + Some(&NumericRestrictions { + min: Some(NumericBound::Unsigned(1)), + max: None, + unit: None, + }) + ); + } + + #[test] + fn serde_canonicalizes_negative_zero_float_bound() { + let neg_zero_bits = (-0.0f64).to_bits(); + let json = serde_json::json!({ + "kind": "f64", + "value": { "restrictions": { "min": { "kind": "float-bits", "value": neg_zero_bits } } } + }); + let ty: SchemaType = serde_json::from_value(json).expect("deserialize"); + assert_eq!( + ty.numeric_restrictions().and_then(|r| r.min), + Some(NumericBound::FloatBits(0)) + ); + } + + #[test] + fn serde_present_restrictions_round_trip() { + let original = SchemaType::U32 { + restrictions: NumericRestrictions { + min: Some(NumericBound::Unsigned(1)), + max: Some(NumericBound::Unsigned(100)), + unit: Some("items".to_string()), + } + .normalize(), + metadata: MetadataEnvelope::default(), + }; + let json = serde_json::to_value(&original).expect("serialize"); + let back: SchemaType = serde_json::from_value(json).expect("deserialize"); + assert_eq!(original, back); + } +} diff --git a/golem-schema/src/schema/validation/mod.rs b/golem-schema/src/schema/validation/mod.rs index 4cb8f5d8c7..8e9e011814 100644 --- a/golem-schema/src/schema/validation/mod.rs +++ b/golem-schema/src/schema/validation/mod.rs @@ -36,4 +36,4 @@ mod tests; pub use subtyping::{is_assignable, is_equivalent_cross_graph}; pub use value::{ValueError, ValuePath, ValuePathSegment, validate_value}; -pub use well_formedness::{SchemaError, validate_graph}; +pub use well_formedness::{SchemaError, validate_graph, validate_root_type}; diff --git a/golem-schema/src/schema/validation/subtyping.rs b/golem-schema/src/schema/validation/subtyping.rs index f5adcc8613..fd98cd71c5 100644 --- a/golem-schema/src/schema/validation/subtyping.rs +++ b/golem-schema/src/schema/validation/subtyping.rs @@ -32,9 +32,10 @@ use crate::schema::graph::SchemaGraph; use crate::schema::metadata::TypeId; use crate::schema::schema_type::{ - BinaryRestrictions, PathSpec, QuantitySpec, QuantityValue, SchemaType, TextRestrictions, - UrlRestrictions, + BinaryRestrictions, NumericRepr, NumericRestrictions, PathSpec, QuantitySpec, QuantityValue, + SchemaType, TextRestrictions, UrlRestrictions, numeric_bound_cmp, }; +use std::cmp::Ordering; use std::collections::HashSet; /// Is `sub` assignable to `sup` inside `graph`? @@ -68,21 +69,100 @@ fn assignable( match (sub_resolved, sup_resolved) { // Primitives must match exactly. (SchemaType::Bool { .. }, SchemaType::Bool { .. }) - | (SchemaType::S8 { .. }, SchemaType::S8 { .. }) - | (SchemaType::S16 { .. }, SchemaType::S16 { .. }) - | (SchemaType::S32 { .. }, SchemaType::S32 { .. }) - | (SchemaType::S64 { .. }, SchemaType::S64 { .. }) - | (SchemaType::U8 { .. }, SchemaType::U8 { .. }) - | (SchemaType::U16 { .. }, SchemaType::U16 { .. }) - | (SchemaType::U32 { .. }, SchemaType::U32 { .. }) - | (SchemaType::U64 { .. }, SchemaType::U64 { .. }) - | (SchemaType::F32 { .. }, SchemaType::F32 { .. }) - | (SchemaType::F64 { .. }, SchemaType::F64 { .. }) | (SchemaType::Char { .. }, SchemaType::Char { .. }) | (SchemaType::String { .. }, SchemaType::String { .. }) | (SchemaType::Datetime { .. }, SchemaType::Datetime { .. }) | (SchemaType::Duration { .. }, SchemaType::Duration { .. }) => true, + // Numerics narrow within the same repr: sub's bounds must be inside + // sup's bounds (None = unbounded), and the unit must match exactly. + ( + SchemaType::S8 { + restrictions: a, .. + }, + SchemaType::S8 { + restrictions: b, .. + }, + ) + | ( + SchemaType::S16 { + restrictions: a, .. + }, + SchemaType::S16 { + restrictions: b, .. + }, + ) + | ( + SchemaType::S32 { + restrictions: a, .. + }, + SchemaType::S32 { + restrictions: b, .. + }, + ) + | ( + SchemaType::S64 { + restrictions: a, .. + }, + SchemaType::S64 { + restrictions: b, .. + }, + ) + | ( + SchemaType::U8 { + restrictions: a, .. + }, + SchemaType::U8 { + restrictions: b, .. + }, + ) + | ( + SchemaType::U16 { + restrictions: a, .. + }, + SchemaType::U16 { + restrictions: b, .. + }, + ) + | ( + SchemaType::U32 { + restrictions: a, .. + }, + SchemaType::U32 { + restrictions: b, .. + }, + ) + | ( + SchemaType::U64 { + restrictions: a, .. + }, + SchemaType::U64 { + restrictions: b, .. + }, + ) + | ( + SchemaType::F32 { + restrictions: a, .. + }, + SchemaType::F32 { + restrictions: b, .. + }, + ) + | ( + SchemaType::F64 { + restrictions: a, .. + }, + SchemaType::F64 { + restrictions: b, .. + }, + ) => numeric_narrows( + sub_resolved + .numeric_repr() + .expect("matched numeric variant has a numeric repr"), + a, + b, + ), + ( SchemaType::Text { restrictions: a, .. @@ -287,21 +367,93 @@ fn equivalent( match (a_resolved, b_resolved) { // Primitives must match exactly. (SchemaType::Bool { .. }, SchemaType::Bool { .. }) - | (SchemaType::S8 { .. }, SchemaType::S8 { .. }) - | (SchemaType::S16 { .. }, SchemaType::S16 { .. }) - | (SchemaType::S32 { .. }, SchemaType::S32 { .. }) - | (SchemaType::S64 { .. }, SchemaType::S64 { .. }) - | (SchemaType::U8 { .. }, SchemaType::U8 { .. }) - | (SchemaType::U16 { .. }, SchemaType::U16 { .. }) - | (SchemaType::U32 { .. }, SchemaType::U32 { .. }) - | (SchemaType::U64 { .. }, SchemaType::U64 { .. }) - | (SchemaType::F32 { .. }, SchemaType::F32 { .. }) - | (SchemaType::F64 { .. }, SchemaType::F64 { .. }) | (SchemaType::Char { .. }, SchemaType::Char { .. }) | (SchemaType::String { .. }, SchemaType::String { .. }) | (SchemaType::Datetime { .. }, SchemaType::Datetime { .. }) | (SchemaType::Duration { .. }, SchemaType::Duration { .. }) => true, + // Numerics: normalized restrictions must be exactly equal (within repr). + ( + SchemaType::S8 { + restrictions: ra, .. + }, + SchemaType::S8 { + restrictions: rb, .. + }, + ) + | ( + SchemaType::S16 { + restrictions: ra, .. + }, + SchemaType::S16 { + restrictions: rb, .. + }, + ) + | ( + SchemaType::S32 { + restrictions: ra, .. + }, + SchemaType::S32 { + restrictions: rb, .. + }, + ) + | ( + SchemaType::S64 { + restrictions: ra, .. + }, + SchemaType::S64 { + restrictions: rb, .. + }, + ) + | ( + SchemaType::U8 { + restrictions: ra, .. + }, + SchemaType::U8 { + restrictions: rb, .. + }, + ) + | ( + SchemaType::U16 { + restrictions: ra, .. + }, + SchemaType::U16 { + restrictions: rb, .. + }, + ) + | ( + SchemaType::U32 { + restrictions: ra, .. + }, + SchemaType::U32 { + restrictions: rb, .. + }, + ) + | ( + SchemaType::U64 { + restrictions: ra, .. + }, + SchemaType::U64 { + restrictions: rb, .. + }, + ) + | ( + SchemaType::F32 { + restrictions: ra, .. + }, + SchemaType::F32 { + restrictions: rb, .. + }, + ) + | ( + SchemaType::F64 { + restrictions: ra, .. + }, + SchemaType::F64 { + restrictions: rb, .. + }, + ) => ra == rb, + // Rich scalars: restrictions/specs must be exactly equal. ( SchemaType::Text { @@ -476,6 +628,76 @@ fn resolve<'a>(graph: &'a SchemaGraph, mut ty: &'a SchemaType) -> (&'a SchemaTyp // --- Scalar narrowing rules --- +/// Numeric narrowing within the same repr: `sub`'s bounds must sit inside +/// `sup`'s bounds (`None` = unbounded, inclusive), and the unit must match +/// exactly (the unit changes the value's semantic interpretation and is not +/// represented in the numeric value itself, so it is compared even when the +/// other side is otherwise unconstrained). Returns `false` on bound-family +/// mismatch or a malformed stored restriction rather than assuming a prior +/// well-formedness pass. +fn numeric_narrows( + repr: NumericRepr, + sub: &Option, + sup: &Option, +) -> bool { + // Defensive: a restriction set that is not well-formed for the repr (e.g. + // family mismatch, `Some(empty)`, out-of-range) is never a valid participant + // in a subtype relationship. + if let Some(sub) = sub + && sub.validate_for_repr(repr).is_err() + { + return false; + } + if let Some(sup) = sup + && sup.validate_for_repr(repr).is_err() + { + return false; + } + + // Unit is part of the type's meaning and must match exactly, treating an + // unconstrained side as unit `None`. + let sub_unit = sub.as_ref().and_then(|s| s.unit.as_deref()); + let sup_unit = sup.as_ref().and_then(|s| s.unit.as_deref()); + if sub_unit != sup_unit { + return false; + } + + let sup = match sup { + // sup unconstrained: any sub (with the matching unit) narrows it. + None => return true, + Some(sup) => sup, + }; + let sub = match sub { + // sub unconstrained but sup constrained: sub is wider, not a subtype. + None => return false, + Some(sub) => sub, + }; + + // sub.min >= sup.min (sup.min None = -inf). + if let Some(sup_min) = sup.min { + match sub.min { + Some(sub_min) => match numeric_bound_cmp(sub_min, sup_min) { + Some(Ordering::Less) | None => return false, + _ => {} + }, + None => return false, + } + } + + // sub.max <= sup.max (sup.max None = +inf). + if let Some(sup_max) = sup.max { + match sub.max { + Some(sub_max) => match numeric_bound_cmp(sub_max, sup_max) { + Some(Ordering::Greater) | None => return false, + _ => {} + }, + None => return false, + } + } + + true +} + fn text_narrows(sub: &TextRestrictions, sup: &TextRestrictions) -> bool { // sub.min_length >= sup.min_length (sub is at least as constrained) if !u32_min_at_least(sub.min_length, sup.min_length) { diff --git a/golem-schema/src/schema/validation/tests/subtyping_tests.rs b/golem-schema/src/schema/validation/tests/subtyping_tests.rs index 16b58e2006..235aa8c0a8 100644 --- a/golem-schema/src/schema/validation/tests/subtyping_tests.rs +++ b/golem-schema/src/schema/validation/tests/subtyping_tests.rs @@ -16,8 +16,8 @@ use super::wellformed_strategy::wellformed_schema_graph_strategy; use crate::schema::graph::{SchemaGraph, SchemaTypeDef}; use crate::schema::metadata::TypeId; use crate::schema::schema_type::{ - BinaryRestrictions, NamedFieldType, QuantitySpec, QuantityValue, SchemaType, TextRestrictions, - UrlRestrictions, VariantCaseType, + BinaryRestrictions, NamedFieldType, NumericBound, NumericRestrictions, QuantitySpec, + QuantityValue, SchemaType, TextRestrictions, UrlRestrictions, VariantCaseType, }; use crate::schema::validation::subtyping::{is_assignable, is_equivalent_cross_graph}; use proptest::prelude::*; @@ -547,3 +547,94 @@ fn cross_graph_mutually_recursive_identical_accepts() { let b = mutual(); assert!(equiv(&a, &b)); } + +// --- Numeric narrowing --- + +fn u32_bounds(min: Option, max: Option, unit: Option<&str>) -> SchemaType { + SchemaType::U32 { + restrictions: NumericRestrictions { + min: min.map(NumericBound::Unsigned), + max: max.map(NumericBound::Unsigned), + unit: unit.map(|u| u.to_string()), + } + .normalize(), + metadata: Default::default(), + } +} + +#[test] +fn numeric_narrower_bounds_are_assignable() { + let graph = SchemaGraph::anonymous(SchemaType::bool()); + let sub = u32_bounds(Some(1), Some(100), None); + let sup = u32_bounds(Some(0), Some(200), None); + assert!(is_assignable(&graph, &sub, &sup)); + assert!(!is_assignable(&graph, &sup, &sub)); +} + +#[test] +fn numeric_constrained_is_assignable_to_unconstrained() { + let graph = SchemaGraph::anonymous(SchemaType::bool()); + let sub = u32_bounds(Some(1), Some(100), None); + let sup = SchemaType::u32(); + assert!(is_assignable(&graph, &sub, &sup)); + assert!(!is_assignable(&graph, &sup, &sub)); +} + +#[test] +fn numeric_unit_mismatch_is_not_assignable() { + let graph = SchemaGraph::anonymous(SchemaType::bool()); + let a = u32_bounds(Some(0), Some(100), Some("items")); + let b = u32_bounds(Some(0), Some(100), Some("bytes")); + assert!(!is_assignable(&graph, &a, &b)); + assert!(!is_assignable(&graph, &b, &a)); +} + +#[test] +fn numeric_unit_on_constrained_sub_not_assignable_to_unconstrained() { + let graph = SchemaGraph::anonymous(SchemaType::bool()); + // A unit-carrying type is not a subtype of a fully unconstrained type: + // the unit changes the value's semantic interpretation. + let sub = u32_bounds(Some(1), Some(100), Some("bytes")); + let sup = SchemaType::u32(); + assert!(!is_assignable(&graph, &sub, &sup)); + + // Even a unit-only refinement (no bounds) is not assignable to unconstrained. + let unit_only = u32_bounds(None, None, Some("bytes")); + assert!(!is_assignable(&graph, &unit_only, &SchemaType::u32())); +} + +#[test] +fn numeric_malformed_restriction_is_not_assignable() { + let graph = SchemaGraph::anonymous(SchemaType::bool()); + // A signed bound on U32 is malformed (family mismatch); it is never a valid + // participant in a subtype relationship, even against an unconstrained sup. + let sub = SchemaType::U32 { + restrictions: Some(NumericRestrictions { + min: Some(NumericBound::Signed(-1)), + max: None, + unit: None, + }), + metadata: Default::default(), + }; + let sup = SchemaType::u32(); + assert!(!is_assignable(&graph, &sub, &sup)); + assert!(!is_assignable(&graph, &sup, &sub)); +} + +#[test] +fn numeric_equal_restrictions_are_mutually_assignable() { + let graph = SchemaGraph::anonymous(SchemaType::bool()); + let a = u32_bounds(Some(0), Some(100), Some("items")); + let b = u32_bounds(Some(0), Some(100), Some("items")); + assert!(is_assignable(&graph, &a, &b)); + assert!(is_assignable(&graph, &b, &a)); +} + +#[test] +fn numeric_different_repr_is_not_assignable() { + let graph = SchemaGraph::anonymous(SchemaType::bool()); + let u = SchemaType::u32(); + let s = SchemaType::s32(); + assert!(!is_assignable(&graph, &u, &s)); + assert!(!is_assignable(&graph, &s, &u)); +} diff --git a/golem-schema/src/schema/validation/tests/value_tests.rs b/golem-schema/src/schema/validation/tests/value_tests.rs index ff8477e410..92b5186ef2 100644 --- a/golem-schema/src/schema/validation/tests/value_tests.rs +++ b/golem-schema/src/schema/validation/tests/value_tests.rs @@ -16,9 +16,10 @@ use crate::model::EnvironmentId; use crate::schema::graph::{SchemaGraph, SchemaTypeDef}; use crate::schema::metadata::TypeId; use crate::schema::schema_type::{ - BinaryRestrictions, DiscriminatorRule, NamedFieldType, PathDirection, PathKind, PathSpec, - QuantitySpec, QuantityValue, QuotaTokenSpec, ResultSpec, SchemaType, SecretSpec, - TextRestrictions, UnionBranch, UnionSpec, UrlRestrictions, VariantCaseType, + BinaryRestrictions, DiscriminatorRule, NamedFieldType, NumericBound, NumericRestrictions, + PathDirection, PathKind, PathSpec, QuantitySpec, QuantityValue, QuotaTokenSpec, ResultSpec, + SchemaType, SecretSpec, TextRestrictions, UnionBranch, UnionSpec, UrlRestrictions, + VariantCaseType, }; use crate::schema::schema_value::{ BinaryValuePayload, DurationValuePayload, QuotaTokenValuePayload, ResultValuePayload, @@ -1101,3 +1102,146 @@ fn dangling_ref_is_reported() { "expected DanglingRef, got {errors:?}" ); } + +// --- Numeric restrictions (value range) --- + +fn u32_with(min: Option, max: Option) -> SchemaType { + SchemaType::U32 { + restrictions: NumericRestrictions { + min: min.map(NumericBound::Unsigned), + max: max.map(NumericBound::Unsigned), + unit: None, + } + .normalize(), + metadata: Default::default(), + } +} + +#[test] +fn numeric_unconstrained_accepts_any_value() { + let ty = SchemaType::u32(); + let graph = SchemaGraph::anonymous(ty.clone()); + validate_value(&graph, &ty, &SchemaValue::U32(0)).expect("0 is valid"); + validate_value(&graph, &ty, &SchemaValue::U32(u32::MAX)).expect("max is valid"); +} + +#[test] +fn numeric_in_range_is_accepted() { + let ty = u32_with(Some(1), Some(100)); + let graph = SchemaGraph::anonymous(ty.clone()); + validate_value(&graph, &ty, &SchemaValue::U32(1)).expect("min boundary is inclusive"); + validate_value(&graph, &ty, &SchemaValue::U32(50)).expect("mid is valid"); + validate_value(&graph, &ty, &SchemaValue::U32(100)).expect("max boundary is inclusive"); +} + +#[test] +fn numeric_below_min_is_rejected() { + let ty = u32_with(Some(1), None); + let graph = SchemaGraph::anonymous(ty.clone()); + let errors = validate_value(&graph, &ty, &SchemaValue::U32(0)).expect_err("should fail"); + assert!( + errors + .iter() + .any(|e| matches!(e, ValueError::NumericOutOfRange { .. })), + "expected NumericOutOfRange, got {errors:?}" + ); +} + +#[test] +fn numeric_above_max_is_rejected() { + let ty = u32_with(None, Some(100)); + let graph = SchemaGraph::anonymous(ty.clone()); + let errors = validate_value(&graph, &ty, &SchemaValue::U32(101)).expect_err("should fail"); + assert!( + errors + .iter() + .any(|e| matches!(e, ValueError::NumericOutOfRange { .. })), + "expected NumericOutOfRange, got {errors:?}" + ); +} + +#[test] +fn numeric_u64_near_max_bound_is_enforced() { + let ty = SchemaType::U64 { + restrictions: NumericRestrictions { + min: Some(NumericBound::Unsigned(u64::MAX - 1)), + max: Some(NumericBound::Unsigned(u64::MAX)), + unit: None, + } + .normalize(), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty.clone()); + validate_value(&graph, &ty, &SchemaValue::U64(u64::MAX)).expect("u64::MAX is in range"); + let errors = + validate_value(&graph, &ty, &SchemaValue::U64(u64::MAX - 2)).expect_err("should fail"); + assert!( + errors + .iter() + .any(|e| matches!(e, ValueError::NumericOutOfRange { .. })), + "expected NumericOutOfRange, got {errors:?}" + ); +} + +#[test] +fn numeric_f64_min_is_enforced() { + let ty = SchemaType::F64 { + restrictions: NumericRestrictions { + min: Some(NumericBound::float(0.0).unwrap()), + max: None, + unit: Some("seconds".to_string()), + } + .normalize(), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty.clone()); + validate_value(&graph, &ty, &SchemaValue::F64(0.0)).expect("0.0 is inclusive"); + validate_value(&graph, &ty, &SchemaValue::F64(3.5)).expect("positive is valid"); + let errors = validate_value(&graph, &ty, &SchemaValue::F64(-0.5)).expect_err("should fail"); + assert!( + errors + .iter() + .any(|e| matches!(e, ValueError::NumericOutOfRange { .. })), + "expected NumericOutOfRange, got {errors:?}" + ); +} + +#[test] +fn numeric_unit_is_not_checked_at_value_level() { + // `unit` is schema metadata only; a value carrying no unit must still pass + // an in-range check against a unit-annotated numeric type. + let ty = SchemaType::U32 { + restrictions: NumericRestrictions { + min: Some(NumericBound::Unsigned(0)), + max: Some(NumericBound::Unsigned(10)), + unit: Some("items".to_string()), + } + .normalize(), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty.clone()); + validate_value(&graph, &ty, &SchemaValue::U32(5)).expect("unit is not a value-level check"); +} + +#[test] +fn numeric_inverted_min_max_is_rejected() { + // An inverted (unsatisfiable) `min > max` is comparable to the repr, so the + // value validator must enforce it rather than silently skipping, matching the + // behavior of the text/binary range validators. + let ty = SchemaType::U32 { + restrictions: Some(NumericRestrictions { + min: Some(NumericBound::Unsigned(10)), + max: Some(NumericBound::Unsigned(1)), + unit: None, + }), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty.clone()); + let errors = validate_value(&graph, &ty, &SchemaValue::U32(5)).expect_err("should fail"); + assert!( + errors + .iter() + .any(|e| matches!(e, ValueError::NumericOutOfRange { .. })), + "expected NumericOutOfRange, got {errors:?}" + ); +} diff --git a/golem-schema/src/schema/validation/tests/well_formedness_tests.rs b/golem-schema/src/schema/validation/tests/well_formedness_tests.rs index 7d3c66dc8c..11e187c520 100644 --- a/golem-schema/src/schema/validation/tests/well_formedness_tests.rs +++ b/golem-schema/src/schema/validation/tests/well_formedness_tests.rs @@ -16,10 +16,11 @@ use super::wellformed_strategy::wellformed_schema_graph_strategy; use crate::schema::graph::{SchemaGraph, SchemaTypeDef}; use crate::schema::metadata::TypeId; use crate::schema::schema_type::{ - BinaryRestrictions, DiscriminatorRule, FieldDiscriminator, NamedFieldType, QuantitySpec, - QuantityValue, SchemaType, TextRestrictions, UnionBranch, UnionSpec, VariantCaseType, + BinaryRestrictions, DiscriminatorRule, FieldDiscriminator, NamedFieldType, NumericBound, + NumericRestrictionError, NumericRestrictions, QuantitySpec, QuantityValue, SchemaType, + TextRestrictions, UnionBranch, UnionSpec, VariantCaseType, }; -use crate::schema::validation::well_formedness::{SchemaError, validate_graph}; +use crate::schema::validation::well_formedness::{SchemaError, validate_graph, validate_root_type}; use proptest::prelude::*; use test_r::test; @@ -68,6 +69,99 @@ fn dangling_ref_is_reported() { assert!(errors.contains(&SchemaError::DanglingRef(TypeId::new("missing")))); } +#[test] +fn validate_root_type_reports_dangling_ref_through_alias_chain() { + let alias = TypeId::new("alias"); + let missing = TypeId::new("missing"); + let graph = SchemaGraph { + defs: vec![SchemaTypeDef { + id: alias.clone(), + name: None, + body: SchemaType::ref_to(missing.clone()), + }], + root: SchemaType::bool(), + }; + + let errors = validate_root_type(&graph, &SchemaType::ref_to(alias)) + .expect_err("a root alias chain ending in a missing definition is ill-formed"); + assert!( + errors.contains(&SchemaError::DanglingRef(missing)), + "expected the dangling target to be reported, got {errors:?}" + ); +} + +#[test] +fn pure_recursive_alias_root_is_rejected() { + let id = TypeId::new("Cycle"); + let graph = SchemaGraph { + defs: vec![SchemaTypeDef { + id: id.clone(), + name: None, + body: SchemaType::ref_to(id.clone()), + }], + root: SchemaType::ref_to(id), + }; + + assert!( + validate_graph(&graph).is_err(), + "a pure recursive alias never resolves to a concrete schema type and must be rejected" + ); +} + +#[test] +fn mutual_pure_alias_cycle_is_rejected() { + // A -> ref B, B -> ref A: a two-step pure alias cycle that never bottoms + // out in a concrete type. + let a = TypeId::new("A"); + let b = TypeId::new("B"); + let graph = SchemaGraph { + defs: vec![ + SchemaTypeDef { + id: a.clone(), + name: None, + body: SchemaType::ref_to(b.clone()), + }, + SchemaTypeDef { + id: b, + name: None, + body: SchemaType::ref_to(a.clone()), + }, + ], + root: SchemaType::ref_to(a), + }; + let errors = validate_graph(&graph).expect_err("mutual pure alias cycle must be rejected"); + assert!( + errors + .iter() + .any(|e| matches!(e, SchemaError::RecursiveAlias(_))), + "expected a RecursiveAlias error, got {errors:?}" + ); +} + +#[test] +fn legitimate_recursive_type_through_constructor_is_accepted() { + // tree -> record { children: list }: the cycle passes through + // value-shrinking constructors (record/list), so it resolves to a concrete + // type and is valid. + let id = TypeId::new("tree"); + let graph = SchemaGraph { + defs: vec![SchemaTypeDef { + id: id.clone(), + name: None, + body: SchemaType::record(vec![NamedFieldType { + name: "children".to_string(), + body: SchemaType::list(SchemaType::ref_to(id.clone())), + metadata: Default::default(), + }]), + }], + root: SchemaType::ref_to(id), + }; + assert!( + validate_graph(&graph).is_ok(), + "a recursive type whose cycle passes through a constructor is well-formed" + ); +} + #[test] fn empty_variant_is_reported() { let graph = SchemaGraph::anonymous(SchemaType::Variant { @@ -130,6 +224,31 @@ fn map_key_not_primitive_is_reported() { assert!(errors.contains(&SchemaError::MapKeyNotPrimitive)); } +#[test] +fn recursive_alias_map_key_reports_only_recursive_alias() { + let key = TypeId::new("key"); + let graph = SchemaGraph { + defs: vec![SchemaTypeDef { + id: key.clone(), + name: None, + body: SchemaType::ref_to(key.clone()), + }], + root: SchemaType::bool(), + }; + + let errors = validate_root_type( + &graph, + &SchemaType::map(SchemaType::ref_to(key.clone()), SchemaType::string()), + ) + .expect_err("recursive alias map key must be rejected"); + + assert_eq!( + errors, + vec![SchemaError::RecursiveAlias(key)], + "a recursive alias map key should not also cascade into MapKeyNotPrimitive" + ); +} + #[test] fn fixed_list_zero_length_is_reported() { let graph = SchemaGraph::anonymous(SchemaType::FixedList { @@ -492,6 +611,46 @@ fn union_discriminator_overlap_prefix_is_reported() { ); } +// Deferred: `discriminators_overlap` is intentionally conservative and only +// detects same-kind nesting/empties (regex overlap is undecidable). Detecting +// cross-kind overlaps such as prefix-vs-suffix is a separate union-ambiguity +// completeness effort that also requires redesigning the well-formed property +// generator (which deliberately relies on the conservative checker), so it is +// out of scope for the tool dangling/duplicate-detection work and tracked +// separately. +#[test] +#[ignore = "deferred: cross-kind discriminator overlap detection is a separate effort"] +fn union_discriminator_overlap_prefix_suffix_is_reported() { + let graph = SchemaGraph::anonymous(SchemaType::union(UnionSpec { + branches: vec![ + UnionBranch { + tag: "prefix".to_string(), + body: SchemaType::string(), + discriminator: DiscriminatorRule::Prefix { + prefix: "a".to_string(), + }, + metadata: Default::default(), + }, + UnionBranch { + tag: "suffix".to_string(), + body: SchemaType::string(), + discriminator: DiscriminatorRule::Suffix { + suffix: "b".to_string(), + }, + metadata: Default::default(), + }, + ], + })); + + let errors = validate_graph(&graph).expect_err("value `ab` matches both branches"); + assert!( + errors + .iter() + .any(|e| matches!(e, SchemaError::UnionAmbiguousDiscriminators { .. })), + "expected an ambiguous-discriminator error, got {errors:?}" + ); +} + #[test] fn invalid_regex_on_union_branch_is_reported() { let graph = SchemaGraph::anonymous(SchemaType::union(UnionSpec { @@ -666,3 +825,131 @@ fn option_of_self_recursive_ref_terminates() { }; let _ = validate_graph(&graph); } + +// --- Numeric restrictions --- + +#[test] +fn numeric_valid_restrictions_pass() { + let ty = SchemaType::U32 { + restrictions: NumericRestrictions { + min: Some(NumericBound::Unsigned(0)), + max: Some(NumericBound::Unsigned(100)), + unit: Some("items".to_string()), + } + .normalize(), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty); + validate_graph(&graph).expect("valid numeric restrictions must pass"); +} + +#[test] +fn numeric_min_greater_than_max_is_reported() { + let ty = SchemaType::U32 { + restrictions: Some(NumericRestrictions { + min: Some(NumericBound::Unsigned(10)), + max: Some(NumericBound::Unsigned(1)), + unit: None, + }), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty); + let errors = validate_graph(&graph).expect_err("should fail"); + assert!(errors.contains(&SchemaError::InvalidNumericRestriction { + error: NumericRestrictionError::MinGreaterThanMax, + })); +} + +#[test] +fn numeric_bound_family_mismatch_is_reported() { + // A signed bound on an unsigned repr. + let ty = SchemaType::U32 { + restrictions: Some(NumericRestrictions { + min: Some(NumericBound::Signed(5)), + max: None, + unit: None, + }), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty); + let errors = validate_graph(&graph).expect_err("should fail"); + assert!(errors.contains(&SchemaError::InvalidNumericRestriction { + error: NumericRestrictionError::FamilyMismatch, + })); +} + +#[test] +fn numeric_bound_out_of_range_is_reported() { + // 300 does not fit in u8. + let ty = SchemaType::U8 { + restrictions: Some(NumericRestrictions { + min: None, + max: Some(NumericBound::Unsigned(300)), + unit: None, + }), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty); + let errors = validate_graph(&graph).expect_err("should fail"); + assert!(errors.contains(&SchemaError::InvalidNumericRestriction { + error: NumericRestrictionError::BoundOutOfRange, + })); +} + +#[test] +fn numeric_f32_bound_not_round_trippable_is_reported() { + // 0.1 cannot be represented exactly in f32, so it does not round-trip. + let ty = SchemaType::F32 { + restrictions: Some(NumericRestrictions { + min: Some(NumericBound::float(0.1).unwrap()), + max: None, + unit: None, + }), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty); + let errors = validate_graph(&graph).expect_err("should fail"); + assert!(errors.contains(&SchemaError::InvalidNumericRestriction { + error: NumericRestrictionError::FloatNotRoundTrippable, + })); +} + +#[test] +fn numeric_stored_empty_restriction_is_reported() { + // `Some(empty)` must never be stored; well-formedness rejects it even + // though smart constructors/decoders normalize it away. + let ty = SchemaType::U32 { + restrictions: Some(NumericRestrictions::default()), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty); + let errors = validate_graph(&graph).expect_err("should fail"); + assert!(errors.contains(&SchemaError::InvalidNumericRestriction { + error: NumericRestrictionError::EmptyStored, + })); +} + +#[test] +fn numeric_empty_unit_with_bound_is_accepted() { + // An empty `unit` is *non-canonical* (the codecs normalize `Some("")` to + // `None` on decode, see `serde_empty_unit_with_bound_drops_only_the_unit`), + // but it is not *structurally invalid*: the restriction still carries a + // meaningful bound. Well-formedness validates structural validity, not + // canonical spelling — enforcing empty-unit canonicality through + // `validate_for_repr` would make value validation skip numeric range checks + // for such a type, which is worse than accepting the non-canonical unit. + let ty = SchemaType::U32 { + restrictions: Some(NumericRestrictions { + min: Some(NumericBound::Unsigned(1)), + max: None, + unit: Some(String::new()), + }), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty); + + assert!( + validate_graph(&graph).is_ok(), + "a non-canonical empty unit alongside a real bound is structurally valid" + ); +} diff --git a/golem-schema/src/schema/validation/tests/wellformed_strategy.rs b/golem-schema/src/schema/validation/tests/wellformed_strategy.rs index 0b8110347a..8f5dfe28a1 100644 --- a/golem-schema/src/schema/validation/tests/wellformed_strategy.rs +++ b/golem-schema/src/schema/validation/tests/wellformed_strategy.rs @@ -21,7 +21,7 @@ //! union branches are filtered to ones whose body satisfies their //! discriminator rule. -use crate::schema::graph::{SchemaGraph, SchemaTypeDef}; +use crate::schema::graph::{RefResolutionError, SchemaGraph, SchemaTypeDef}; use crate::schema::metadata::TypeId; use crate::schema::proptest_strategies::schema_graph_strategy; use crate::schema::schema_type::{ @@ -49,6 +49,26 @@ pub fn wellformed_schema_graph_strategy() -> impl Strategy .collect(); g.defs = new_defs; g.root = sanitise_type(&g.root, &known); + // Break pure alias cycles: a def/root whose top-level ref chain loops + // without ever reaching a concrete type (`A -> ref B`, `B -> ref A`) is + // ill-formed, so replace such bodies with a harmless primitive. Only + // pure alias chains are affected; recursion through a value-shrinking + // constructor (record/list/...) resolves to that constructor. + let alias_snapshot = g.clone(); + for def in &mut g.defs { + if matches!( + alias_snapshot.resolve_ref(&def.body), + Err(RefResolutionError::RecursiveRef(_)) + ) { + def.body = SchemaType::bool(); + } + } + if matches!( + alias_snapshot.resolve_ref(&g.root), + Err(RefResolutionError::RecursiveRef(_)) + ) { + g.root = SchemaType::bool(); + } // Second pass: now that the full def set is known, walk every type // and wrap option whose X (after ref resolution) is nullable. The // first sanitise_type pass treats `Ref(id)` conservatively because diff --git a/golem-schema/src/schema/validation/value.rs b/golem-schema/src/schema/validation/value.rs index ef8e641380..ae5f1237f1 100644 --- a/golem-schema/src/schema/validation/value.rs +++ b/golem-schema/src/schema/validation/value.rs @@ -18,8 +18,9 @@ use crate::schema::graph::{GraphIndex, SchemaGraph}; use crate::schema::metadata::TypeId; use crate::schema::schema_type::{ - BinaryRestrictions, DiscriminatorRule, PathSpec, QuantitySpec, QuantityValue, SchemaType, - SecretSpec, TextRestrictions, UnionBranch, UrlRestrictions, + BinaryRestrictions, DiscriminatorRule, NumericBound, NumericRepr, NumericRestrictionError, + NumericRestrictions, PathSpec, QuantitySpec, QuantityValue, SchemaType, SecretSpec, + TextRestrictions, UnionBranch, UrlRestrictions, numeric_bound_cmp, }; use crate::schema::schema_value::{ BinaryValuePayload, ResultValuePayload, SchemaValue, SecretValuePayload, TextValuePayload, @@ -30,6 +31,7 @@ use crate::schema::schema_value::{ use crate::schema::schema_type::QuotaTokenSpec; #[cfg(not(all(feature = "guest", not(feature = "host"))))] use crate::schema::schema_value::QuotaTokenValuePayload; +use std::cmp::Ordering; use std::error::Error; use std::fmt::{self, Display, Formatter, Write}; @@ -238,6 +240,10 @@ pub enum ValueError { path: ValuePath, reason: String, }, + NumericOutOfRange { + path: ValuePath, + reason: String, + }, SecretRefEmpty { path: ValuePath, }, @@ -420,6 +426,9 @@ impl Display for ValueError { ValueError::QuantityOutOfRange { path, reason } => { write!(f, "quantity value at {path} is out of range ({reason})") } + ValueError::NumericOutOfRange { path, reason } => { + write!(f, "numeric value at {path} is out of range ({reason})") + } ValueError::SecretRefEmpty { path } => { write!(f, "secret value at {path} has an empty `secret_ref`") } @@ -666,16 +675,96 @@ fn check<'a>( match (ty, value) { (SchemaType::Bool { .. }, SchemaValue::Bool(_)) => {} - (SchemaType::S8 { .. }, SchemaValue::S8(_)) => {} - (SchemaType::S16 { .. }, SchemaValue::S16(_)) => {} - (SchemaType::S32 { .. }, SchemaValue::S32(_)) => {} - (SchemaType::S64 { .. }, SchemaValue::S64(_)) => {} - (SchemaType::U8 { .. }, SchemaValue::U8(_)) => {} - (SchemaType::U16 { .. }, SchemaValue::U16(_)) => {} - (SchemaType::U32 { .. }, SchemaValue::U32(_)) => {} - (SchemaType::U64 { .. }, SchemaValue::U64(_)) => {} - (SchemaType::F32 { .. }, SchemaValue::F32(_)) => {} - (SchemaType::F64 { .. }, SchemaValue::F64(_)) => {} + (SchemaType::S8 { restrictions, .. }, SchemaValue::S8(v)) => { + check_numeric( + NumericRepr::S8, + restrictions, + NumericBound::Signed(*v as i64), + path, + errors, + ); + } + (SchemaType::S16 { restrictions, .. }, SchemaValue::S16(v)) => { + check_numeric( + NumericRepr::S16, + restrictions, + NumericBound::Signed(*v as i64), + path, + errors, + ); + } + (SchemaType::S32 { restrictions, .. }, SchemaValue::S32(v)) => { + check_numeric( + NumericRepr::S32, + restrictions, + NumericBound::Signed(*v as i64), + path, + errors, + ); + } + (SchemaType::S64 { restrictions, .. }, SchemaValue::S64(v)) => { + check_numeric( + NumericRepr::S64, + restrictions, + NumericBound::Signed(*v), + path, + errors, + ); + } + (SchemaType::U8 { restrictions, .. }, SchemaValue::U8(v)) => { + check_numeric( + NumericRepr::U8, + restrictions, + NumericBound::Unsigned(*v as u64), + path, + errors, + ); + } + (SchemaType::U16 { restrictions, .. }, SchemaValue::U16(v)) => { + check_numeric( + NumericRepr::U16, + restrictions, + NumericBound::Unsigned(*v as u64), + path, + errors, + ); + } + (SchemaType::U32 { restrictions, .. }, SchemaValue::U32(v)) => { + check_numeric( + NumericRepr::U32, + restrictions, + NumericBound::Unsigned(*v as u64), + path, + errors, + ); + } + (SchemaType::U64 { restrictions, .. }, SchemaValue::U64(v)) => { + check_numeric( + NumericRepr::U64, + restrictions, + NumericBound::Unsigned(*v), + path, + errors, + ); + } + (SchemaType::F32 { restrictions, .. }, SchemaValue::F32(v)) => { + check_numeric( + NumericRepr::F32, + restrictions, + NumericBound::FloatBits((*v as f64).to_bits()), + path, + errors, + ); + } + (SchemaType::F64 { restrictions, .. }, SchemaValue::F64(v)) => { + check_numeric( + NumericRepr::F64, + restrictions, + NumericBound::FloatBits(v.to_bits()), + path, + errors, + ); + } (SchemaType::Char { .. }, SchemaValue::Char(_)) => {} (SchemaType::String { .. }, SchemaValue::String(_)) => {} @@ -909,6 +998,66 @@ fn check<'a>( } } +/// Validate a numeric value against the node's optional restrictions. +/// +/// Only the value range is checked here (the `unit` is schema-level metadata, +/// never carried by a `SchemaValue`). A malformed restriction set is a +/// well-formedness concern reported elsewhere, so when the stored restrictions +/// are not well-formed for the repr this check is skipped rather than producing +/// a misleading value error. `value` is the numeric value reinterpreted as a +/// same-family `NumericBound` (floats widened to `f64` bits). +fn check_numeric( + repr: NumericRepr, + restrictions: &Option, + value: NumericBound, + path: &mut ValuePath, + errors: &mut Vec, +) { + let Some(restrictions) = restrictions else { + return; + }; + // Skip value-level range checking only when the bounds are incomparable to + // this repr (family/range/float mismatches), since comparing against them + // would produce misleading errors. An inverted `min > max` is still a pair + // of comparable bounds, so it is enforced here (the constraint is simply + // unsatisfiable), consistent with the text/binary range validators. + if let Err(err) = restrictions.validate_for_repr(repr) + && !matches!(err, NumericRestrictionError::MinGreaterThanMax) + { + return; + } + if let Some(min) = restrictions.min + && !matches!( + numeric_bound_cmp(value, min), + Some(Ordering::Greater | Ordering::Equal) + ) + { + errors.push(ValueError::NumericOutOfRange { + path: path.snapshot(), + reason: format!("below minimum {}", describe_numeric_bound(min)), + }); + } + if let Some(max) = restrictions.max + && !matches!( + numeric_bound_cmp(value, max), + Some(Ordering::Less | Ordering::Equal) + ) + { + errors.push(ValueError::NumericOutOfRange { + path: path.snapshot(), + reason: format!("above maximum {}", describe_numeric_bound(max)), + }); + } +} + +fn describe_numeric_bound(bound: NumericBound) -> String { + match bound { + NumericBound::Signed(v) => v.to_string(), + NumericBound::Unsigned(v) => v.to_string(), + NumericBound::FloatBits(bits) => f64::from_bits(bits).to_string(), + } +} + fn check_text( restrictions: &TextRestrictions, payload: &TextValuePayload, diff --git a/golem-schema/src/schema/validation/well_formedness.rs b/golem-schema/src/schema/validation/well_formedness.rs index a59eff0fb7..e891002c45 100644 --- a/golem-schema/src/schema/validation/well_formedness.rs +++ b/golem-schema/src/schema/validation/well_formedness.rs @@ -14,11 +14,11 @@ //! Structural well-formedness checks for a [`SchemaGraph`]. -use crate::schema::graph::SchemaGraph; +use crate::schema::graph::{RefResolutionError, SchemaGraph}; use crate::schema::metadata::TypeId; use crate::schema::schema_type::{ - BinaryRestrictions, DiscriminatorRule, PathSpec, QuantitySpec, QuantityValue, SchemaType, - TextRestrictions, UnionBranch, UnionSpec, UrlRestrictions, + BinaryRestrictions, DiscriminatorRule, NumericRestrictionError, PathSpec, QuantitySpec, + QuantityValue, SchemaType, TextRestrictions, UnionBranch, UnionSpec, UrlRestrictions, }; use std::collections::HashSet; use std::error::Error; @@ -29,6 +29,10 @@ use std::fmt::{self, Display, Formatter}; pub enum SchemaError { DuplicateTypeId(TypeId), DanglingRef(TypeId), + /// A named reference whose alias chain is a pure cycle + /// (`A -> B -> ... -> A`) that never bottoms out in a concrete type, so it + /// can never resolve to a usable `SchemaType`. + RecursiveAlias(TypeId), EmptyVariant, EmptyEnum, EmptyUnion, @@ -86,6 +90,10 @@ pub enum SchemaError { }, TextLengthRangeInverted, BinaryByteRangeInverted, + /// A numeric type's inline restrictions are not well-formed. + InvalidNumericRestriction { + error: NumericRestrictionError, + }, /// An `Option` was declared where `X` is itself nullable on the /// canonical JSON wire (option-of-option, option-of-union-with-nullable- /// branch, option-of-ref-resolving-to-nullable). The canonical JSON @@ -101,6 +109,12 @@ impl Display for SchemaError { match self { SchemaError::DuplicateTypeId(id) => write!(f, "duplicate type id `{id}`"), SchemaError::DanglingRef(id) => write!(f, "dangling type reference `{id}`"), + SchemaError::RecursiveAlias(id) => { + write!( + f, + "type reference `{id}` forms a reference cycle with no concrete type" + ) + } SchemaError::EmptyVariant => write!(f, "variant has no cases"), SchemaError::EmptyEnum => write!(f, "enum has no cases"), SchemaError::EmptyUnion => write!(f, "union has no branches"), @@ -181,6 +195,9 @@ impl Display for SchemaError { SchemaError::TextLengthRangeInverted => { write!(f, "text min-length is greater than max-length") } + SchemaError::InvalidNumericRestriction { error } => { + write!(f, "invalid numeric restriction: {error}") + } SchemaError::BinaryByteRangeInverted => { write!(f, "binary min-bytes is greater than max-bytes") } @@ -224,6 +241,27 @@ pub fn validate_graph(graph: &SchemaGraph) -> Result<(), Vec> { } } +/// Validate a single [`SchemaType`] as a root against an existing graph's +/// definitions for structural well-formedness. +/// +/// Unlike [`validate_graph`], this does not validate the graph's own +/// [`SchemaGraph::root`] or its definition bodies; only `ty` is walked, with +/// [`SchemaType::Ref`]s resolved against `graph.defs`. This is for callers (such +/// as the tool validator) that embed many bare `SchemaType` roots which share a +/// single definitions carrier whose own `root` is an unused placeholder. +/// +/// Errors are returned in deterministic discovery order. +pub fn validate_root_type(graph: &SchemaGraph, ty: &SchemaType) -> Result<(), Vec> { + let known_ids: HashSet = graph.defs.iter().map(|d| d.id.clone()).collect(); + let mut errors = Vec::new(); + check_type(graph, ty, &known_ids, &mut errors); + if errors.is_empty() { + Ok(()) + } else { + Err(errors) + } +} + fn check_type( graph: &SchemaGraph, ty: &SchemaType, @@ -234,6 +272,25 @@ fn check_type( SchemaType::Ref { id, .. } => { if !known.contains(id) { errors.push(SchemaError::DanglingRef(id.clone())); + } else { + match graph.resolve_ref(ty) { + Ok(_) => {} + // The id exists, but its alias chain is a pure cycle that + // never resolves to a concrete type. A legitimate recursive + // type (whose cycle passes through a value-shrinking + // constructor such as `list`/`record`) resolves to that + // constructor at the top-level alias step and is unaffected. + Err(RefResolutionError::RecursiveRef(cycle_id)) => { + errors.push(SchemaError::RecursiveAlias(cycle_id)); + } + // The id exists, but following its alias chain reaches a + // reference to a definition that is absent from the graph. + // Report the dangling target so a root alias chain ending in + // a missing definition is rejected at the chain's tail. + Err(RefResolutionError::DanglingRef(target)) => { + errors.push(SchemaError::DanglingRef(target)); + } + } } } @@ -301,7 +358,13 @@ fn check_type( check_type(graph, element, known, errors); } SchemaType::Map { key, value, .. } => { - if !is_primitive_key_resolved(graph, key) { + // A key that resolves to a concrete non-primitive type is rejected. + // A key that does not resolve to a concrete type (a dangling + // reference or a pure alias cycle) is *not* reported here: that + // failure is reported by the `check_type(key, ...)` recursion below, + // and a `MapKeyNotPrimitive` on top of it would be misleading cascade + // noise. + if let MapKeyKind::NonPrimitive = classify_map_key(graph, key) { errors.push(SchemaError::MapKeyNotPrimitive); } check_type(graph, key, known, errors); @@ -346,17 +409,25 @@ fn check_type( } } + SchemaType::S8 { restrictions, .. } + | SchemaType::S16 { restrictions, .. } + | SchemaType::S32 { restrictions, .. } + | SchemaType::S64 { restrictions, .. } + | SchemaType::U8 { restrictions, .. } + | SchemaType::U16 { restrictions, .. } + | SchemaType::U32 { restrictions, .. } + | SchemaType::U64 { restrictions, .. } + | SchemaType::F32 { restrictions, .. } + | SchemaType::F64 { restrictions, .. } => { + if let Some(restrictions) = restrictions { + let repr = ty.numeric_repr().expect("numeric variant => numeric repr"); + if let Err(error) = restrictions.validate_for_repr(repr) { + errors.push(SchemaError::InvalidNumericRestriction { error }); + } + } + } + SchemaType::Bool { .. } - | SchemaType::S8 { .. } - | SchemaType::S16 { .. } - | SchemaType::S32 { .. } - | SchemaType::S64 { .. } - | SchemaType::U8 { .. } - | SchemaType::U16 { .. } - | SchemaType::U32 { .. } - | SchemaType::U64 { .. } - | SchemaType::F32 { .. } - | SchemaType::F64 { .. } | SchemaType::Char { .. } | SchemaType::String { .. } | SchemaType::Datetime { .. } @@ -366,23 +437,46 @@ fn check_type( } } -/// Whether `ty` is one of the primitive types accepted as a map key. Refs are -/// resolved through one chain (with cycle detection) before deciding. -fn is_primitive_key_resolved(graph: &SchemaGraph, ty: &SchemaType) -> bool { +/// Classification of a map key type after resolving named references (with +/// cycle detection). +enum MapKeyKind { + /// The key resolves to a primitive type and is valid. + Primitive, + /// The key resolves to a concrete non-primitive type (or a reference + /// cycle, which can never be primitive) and is invalid. + NonPrimitive, + /// The key is (or resolves through) a dangling reference, so its + /// primitiveness cannot be determined; the dangling reference is reported + /// separately. + Unresolved, +} + +fn classify_map_key(graph: &SchemaGraph, ty: &SchemaType) -> MapKeyKind { let mut visited: HashSet = HashSet::new(); let mut current = ty; loop { match current { SchemaType::Ref { id, .. } => { if !visited.insert(id.clone()) { - return false; + // A pure alias cycle never resolves to a concrete type, so + // its primitiveness is unknown. It is reported as a + // `RecursiveAlias` by the `check_type(key, ...)` recursion; a + // `MapKeyNotPrimitive` on top of that would be misleading + // cascade noise. + return MapKeyKind::Unresolved; } match graph.lookup(id) { Some(def) => current = &def.body, - None => return false, + None => return MapKeyKind::Unresolved, } } - other => return is_primitive_key(other), + other => { + return if is_primitive_key(other) { + MapKeyKind::Primitive + } else { + MapKeyKind::NonPrimitive + }; + } } } } @@ -524,18 +618,23 @@ fn validate_union( fn check_union_branch(graph: &SchemaGraph, branch: &UnionBranch, errors: &mut Vec) { let shape = resolved_shape(graph, &branch.body, &mut HashSet::new()); + // The branch body is a dangling/recursive ref: its shape is unknown, so any + // shape-vs-discriminator mismatch would be misleading noise on top of the + // unresolved-reference error `check_type` already reports. Body-shape- + // independent problems (an invalid regex) are still checked below. + let shape_known = !matches!(shape, BodyShape::Unresolved); match &branch.discriminator { DiscriminatorRule::Prefix { .. } | DiscriminatorRule::Suffix { .. } | DiscriminatorRule::Contains { .. } => { - if !matches!(shape, BodyShape::String) { + if shape_known && !matches!(shape, BodyShape::String) { errors.push(SchemaError::UnionStringRuleOnNonStringBody { tag: branch.tag.clone(), }); } } DiscriminatorRule::Regex { regex } => { - if !matches!(shape, BodyShape::String) { + if shape_known && !matches!(shape, BodyShape::String) { errors.push(SchemaError::UnionStringRuleOnNonStringBody { tag: branch.tag.clone(), }); @@ -562,11 +661,9 @@ fn check_union_branch(graph: &SchemaGraph, branch: &UnionBranch, errors: &mut Ve field_name: field_disc.field_name.clone(), }), Some((_, ty)) => { + let field_shape = resolved_shape(graph, ty, &mut HashSet::new()); if field_disc.literal.is_some() - && !matches!( - resolved_shape(graph, ty, &mut HashSet::new()), - BodyShape::String - ) + && !matches!(field_shape, BodyShape::String | BodyShape::Unresolved) { errors.push(SchemaError::UnionFieldEqualsLiteralOnNonStringField { tag: branch.tag.clone(), @@ -576,6 +673,7 @@ fn check_union_branch(graph: &SchemaGraph, branch: &UnionBranch, errors: &mut Ve } } } + BodyShape::Unresolved => {} _ => errors.push(SchemaError::UnionFieldRuleOnNonRecordBody { tag: branch.tag.clone(), }), @@ -589,6 +687,7 @@ fn check_union_branch(graph: &SchemaGraph, branch: &UnionBranch, errors: &mut Ve }); } } + BodyShape::Unresolved => {} _ => errors.push(SchemaError::UnionFieldRuleOnNonRecordBody { tag: branch.tag.clone(), }), @@ -738,6 +837,11 @@ enum BodyShape<'a> { String, Record(Vec<(String, &'a SchemaType)>), Other, + /// The body is a [`SchemaType::Ref`] that does not resolve to a concrete + /// type (a dangling reference or a pure alias cycle). The shape is unknown, + /// so shape-dependent discriminator checks are skipped; the unresolved + /// reference itself is reported separately by [`check_type`]. + Unresolved, } fn resolved_shape<'a>( @@ -748,11 +852,11 @@ fn resolved_shape<'a>( match ty { SchemaType::Ref { id, .. } => { if !visited.insert(id.clone()) { - return BodyShape::Other; + return BodyShape::Unresolved; } match graph.lookup(id) { Some(def) => resolved_shape(graph, &def.body, visited), - None => BodyShape::Other, + None => BodyShape::Unresolved, } } SchemaType::String { .. } diff --git a/golem-schema/src/schema/wit/decode.rs b/golem-schema/src/schema/wit/decode.rs index 8986ba93a2..d43bae00f0 100644 --- a/golem-schema/src/schema/wit/decode.rs +++ b/golem-schema/src/schema/wit/decode.rs @@ -16,9 +16,10 @@ use super::wire; use crate::schema::graph::{SchemaGraph, SchemaTypeDef, TypedSchemaValue}; use crate::schema::metadata::{MetadataEnvelope, Role, TypeId}; use crate::schema::schema_type::{ - BinaryRestrictions, DiscriminatorRule, FieldDiscriminator, NamedFieldType, PathDirection, - PathKind, PathSpec, QuantitySpec, QuantityValue, QuotaTokenSpec, ResultSpec, SchemaType, - SecretSpec, TextRestrictions, UnionBranch, UnionSpec, UrlRestrictions, VariantCaseType, + BinaryRestrictions, DiscriminatorRule, FieldDiscriminator, NamedFieldType, NumericBound, + NumericRestrictions, PathDirection, PathKind, PathSpec, QuantitySpec, QuantityValue, + QuotaTokenSpec, ResultSpec, SchemaType, SecretSpec, TextRestrictions, UnionBranch, UnionSpec, + UrlRestrictions, VariantCaseType, }; use crate::schema::schema_value::{ BinaryValuePayload, DurationValuePayload, QuotaTokenVariantValue, ResultValuePayload, @@ -294,16 +295,46 @@ impl<'a> GraphCtx<'a> { } } wire::SchemaTypeBody::BoolType => SchemaType::Bool { metadata }, - wire::SchemaTypeBody::S8Type => SchemaType::S8 { metadata }, - wire::SchemaTypeBody::S16Type => SchemaType::S16 { metadata }, - wire::SchemaTypeBody::S32Type => SchemaType::S32 { metadata }, - wire::SchemaTypeBody::S64Type => SchemaType::S64 { metadata }, - wire::SchemaTypeBody::U8Type => SchemaType::U8 { metadata }, - wire::SchemaTypeBody::U16Type => SchemaType::U16 { metadata }, - wire::SchemaTypeBody::U32Type => SchemaType::U32 { metadata }, - wire::SchemaTypeBody::U64Type => SchemaType::U64 { metadata }, - wire::SchemaTypeBody::F32Type => SchemaType::F32 { metadata }, - wire::SchemaTypeBody::F64Type => SchemaType::F64 { metadata }, + wire::SchemaTypeBody::S8Type(r) => SchemaType::S8 { + restrictions: decode_numeric(r), + metadata, + }, + wire::SchemaTypeBody::S16Type(r) => SchemaType::S16 { + restrictions: decode_numeric(r), + metadata, + }, + wire::SchemaTypeBody::S32Type(r) => SchemaType::S32 { + restrictions: decode_numeric(r), + metadata, + }, + wire::SchemaTypeBody::S64Type(r) => SchemaType::S64 { + restrictions: decode_numeric(r), + metadata, + }, + wire::SchemaTypeBody::U8Type(r) => SchemaType::U8 { + restrictions: decode_numeric(r), + metadata, + }, + wire::SchemaTypeBody::U16Type(r) => SchemaType::U16 { + restrictions: decode_numeric(r), + metadata, + }, + wire::SchemaTypeBody::U32Type(r) => SchemaType::U32 { + restrictions: decode_numeric(r), + metadata, + }, + wire::SchemaTypeBody::U64Type(r) => SchemaType::U64 { + restrictions: decode_numeric(r), + metadata, + }, + wire::SchemaTypeBody::F32Type(r) => SchemaType::F32 { + restrictions: decode_numeric(r), + metadata, + }, + wire::SchemaTypeBody::F64Type(r) => SchemaType::F64 { + restrictions: decode_numeric(r), + metadata, + }, wire::SchemaTypeBody::CharType => SchemaType::Char { metadata }, wire::SchemaTypeBody::StringType => SchemaType::String { metadata }, wire::SchemaTypeBody::RecordType(fields) => { @@ -1039,6 +1070,27 @@ fn decode_quantity_value(q: &wire::QuantityValue) -> QuantityValue { } } +/// Decode a wire numeric restriction, normalizing a decoded empty restriction +/// set to `None` (the canonicalization invariant: `Some(empty)` is never kept). +fn decode_numeric(r: &Option) -> Option { + r.as_ref().and_then(|r| { + NumericRestrictions { + min: r.min.as_ref().map(decode_numeric_bound), + max: r.max.as_ref().map(decode_numeric_bound), + unit: r.unit.clone(), + } + .normalize() + }) +} + +fn decode_numeric_bound(b: &wire::NumericBound) -> NumericBound { + match b { + wire::NumericBound::Signed(v) => NumericBound::Signed(*v), + wire::NumericBound::Unsigned(v) => NumericBound::Unsigned(*v), + wire::NumericBound::FloatBits(bits) => NumericBound::FloatBits(*bits), + } +} + fn decode_discriminator(d: &wire::DiscriminatorRule) -> DiscriminatorRule { match d { wire::DiscriminatorRule::Prefix(s) => DiscriminatorRule::Prefix { prefix: s.clone() }, diff --git a/golem-schema/src/schema/wit/encode.rs b/golem-schema/src/schema/wit/encode.rs index a8af2dea56..839e5deea6 100644 --- a/golem-schema/src/schema/wit/encode.rs +++ b/golem-schema/src/schema/wit/encode.rs @@ -16,9 +16,9 @@ use super::wire; use crate::schema::graph::{SchemaGraph, SchemaTypeDef, TypedSchemaValue}; use crate::schema::metadata::{MetadataEnvelope, Role, TypeId}; use crate::schema::schema_type::{ - BinaryRestrictions, DiscriminatorRule, NamedFieldType, PathDirection, PathKind, PathSpec, - QuantitySpec, QuantityValue, SchemaType, TextRestrictions, UnionBranch, UrlRestrictions, - VariantCaseType, + BinaryRestrictions, DiscriminatorRule, NamedFieldType, NumericBound, NumericRestrictions, + PathDirection, PathKind, PathSpec, QuantitySpec, QuantityValue, SchemaType, TextRestrictions, + UnionBranch, UrlRestrictions, VariantCaseType, }; use crate::schema::schema_value::{QuotaTokenVariantValue, ResultValuePayload, SchemaValue}; use std::collections::HashMap; @@ -360,16 +360,36 @@ impl GraphCtx { wire::SchemaTypeBody::RefType(def_idx) } SchemaType::Bool { .. } => wire::SchemaTypeBody::BoolType, - SchemaType::S8 { .. } => wire::SchemaTypeBody::S8Type, - SchemaType::S16 { .. } => wire::SchemaTypeBody::S16Type, - SchemaType::S32 { .. } => wire::SchemaTypeBody::S32Type, - SchemaType::S64 { .. } => wire::SchemaTypeBody::S64Type, - SchemaType::U8 { .. } => wire::SchemaTypeBody::U8Type, - SchemaType::U16 { .. } => wire::SchemaTypeBody::U16Type, - SchemaType::U32 { .. } => wire::SchemaTypeBody::U32Type, - SchemaType::U64 { .. } => wire::SchemaTypeBody::U64Type, - SchemaType::F32 { .. } => wire::SchemaTypeBody::F32Type, - SchemaType::F64 { .. } => wire::SchemaTypeBody::F64Type, + SchemaType::S8 { restrictions, .. } => { + wire::SchemaTypeBody::S8Type(encode_numeric(restrictions)) + } + SchemaType::S16 { restrictions, .. } => { + wire::SchemaTypeBody::S16Type(encode_numeric(restrictions)) + } + SchemaType::S32 { restrictions, .. } => { + wire::SchemaTypeBody::S32Type(encode_numeric(restrictions)) + } + SchemaType::S64 { restrictions, .. } => { + wire::SchemaTypeBody::S64Type(encode_numeric(restrictions)) + } + SchemaType::U8 { restrictions, .. } => { + wire::SchemaTypeBody::U8Type(encode_numeric(restrictions)) + } + SchemaType::U16 { restrictions, .. } => { + wire::SchemaTypeBody::U16Type(encode_numeric(restrictions)) + } + SchemaType::U32 { restrictions, .. } => { + wire::SchemaTypeBody::U32Type(encode_numeric(restrictions)) + } + SchemaType::U64 { restrictions, .. } => { + wire::SchemaTypeBody::U64Type(encode_numeric(restrictions)) + } + SchemaType::F32 { restrictions, .. } => { + wire::SchemaTypeBody::F32Type(encode_numeric(restrictions)) + } + SchemaType::F64 { restrictions, .. } => { + wire::SchemaTypeBody::F64Type(encode_numeric(restrictions)) + } SchemaType::Char { .. } => wire::SchemaTypeBody::CharType, SchemaType::String { .. } => wire::SchemaTypeBody::StringType, SchemaType::Record { fields, .. } => { @@ -530,6 +550,22 @@ pub fn encode_metadata(m: &MetadataEnvelope) -> wire::MetadataEnvelope { } } +fn encode_numeric(r: &Option) -> Option { + r.as_ref().map(|r| wire::NumericRestrictions { + min: r.min.map(encode_numeric_bound), + max: r.max.map(encode_numeric_bound), + unit: r.unit.clone(), + }) +} + +fn encode_numeric_bound(b: NumericBound) -> wire::NumericBound { + match b { + NumericBound::Signed(v) => wire::NumericBound::Signed(v), + NumericBound::Unsigned(v) => wire::NumericBound::Unsigned(v), + NumericBound::FloatBits(bits) => wire::NumericBound::FloatBits(bits), + } +} + fn encode_text(r: &TextRestrictions) -> wire::TextRestrictions { wire::TextRestrictions { languages: r.languages.clone(), diff --git a/golem-schema/wit/deps/golem-core-v2/golem-core-v2.wit b/golem-schema/wit/deps/golem-core-v2/golem-core-v2.wit index 898c36ed52..26df815f2c 100644 --- a/golem-schema/wit/deps/golem-core-v2/golem-core-v2.wit +++ b/golem-schema/wit/deps/golem-core-v2/golem-core-v2.wit @@ -221,16 +221,16 @@ interface types { // --- Primitives --- bool-type, - s8-type, - s16-type, - s32-type, - s64-type, - u8-type, - u16-type, - u32-type, - u64-type, - f32-type, - f64-type, + s8-type(option), + s16-type(option), + s32-type(option), + s64-type(option), + u8-type(option), + u16-type(option), + u32-type(option), + u64-type(option), + f32-type(option), + f64-type(option), char-type, string-type, @@ -296,6 +296,27 @@ interface types { err: option, } + // --- Numeric restrictions --- + + /// A numeric bound usable across every numeric representation. Float bounds + /// carry canonical IEEE-754 `f64` bits (NaN/inf rejected, -0.0 normalized); + /// comparisons decode the bits to `f64` and compare numerically. + variant numeric-bound { + signed(s64), + unsigned(u64), + float-bits(u64), + } + + /// Inline numeric refinement. `none` on a numeric type means unconstrained + /// (the common case). The empty restriction set is never encoded as `some`: + /// producers normalize it to `none`, decoders normalize a decoded empty to + /// `none`. `unit` is schema/help metadata only. + record numeric-restrictions { + min: option, + max: option, + unit: option, + } + // --- Text / Binary restrictions --- record text-restrictions { diff --git a/sdks/moonbit/golem_sdk/wit/deps/golem-core-v2/golem-core-v2.wit b/sdks/moonbit/golem_sdk/wit/deps/golem-core-v2/golem-core-v2.wit index 950c5c843b..c2a4bd4b4d 100644 --- a/sdks/moonbit/golem_sdk/wit/deps/golem-core-v2/golem-core-v2.wit +++ b/sdks/moonbit/golem_sdk/wit/deps/golem-core-v2/golem-core-v2.wit @@ -221,16 +221,16 @@ interface types { // --- Primitives --- bool-type, - s8-type, - s16-type, - s32-type, - s64-type, - u8-type, - u16-type, - u32-type, - u64-type, - f32-type, - f64-type, + s8-type(option), + s16-type(option), + s32-type(option), + s64-type(option), + u8-type(option), + u16-type(option), + u32-type(option), + u64-type(option), + f32-type(option), + f64-type(option), char-type, string-type, @@ -296,6 +296,27 @@ interface types { err: option, } + // --- Numeric restrictions --- + + /// A numeric bound usable across every numeric representation. Float bounds + /// carry canonical IEEE-754 `f64` bits (NaN/inf rejected, -0.0 normalized); + /// comparisons decode the bits to `f64` and compare numerically. + variant numeric-bound { + signed(s64), + unsigned(u64), + float-bits(u64), + } + + /// Inline numeric refinement. `none` on a numeric type means unconstrained + /// (the common case). The empty restriction set is never encoded as `some`: + /// producers normalize it to `none`, decoders normalize a decoded empty to + /// `none`. `unit` is schema/help metadata only. + record numeric-restrictions { + min: option, + max: option, + unit: option, + } + // --- Text / Binary restrictions --- record text-restrictions { diff --git a/sdks/moonbit/golem_sdk/wit/deps/golem-tool/common.wit b/sdks/moonbit/golem_sdk/wit/deps/golem-tool/common.wit index 2d28cd96df..f28d894d44 100644 --- a/sdks/moonbit/golem_sdk/wit/deps/golem-tool/common.wit +++ b/sdks/moonbit/golem_sdk/wit/deps/golem-tool/common.wit @@ -57,11 +57,15 @@ package golem:tool@0.1.0; /// no items, is valid). /// • A `positional` / `option` / `result` / `error` `type-node-index` /// resolves to a node in `tool.schema`. -/// • A `repeatable` option's `default`, if present, is a list whose -/// elements are values of the `repeatable-shape.%type` node. -/// • A `value-is` ref naming a repeatable option, tail positional, or -/// otherwise list-shaped target means "any occurrence / element -/// equals this literal"; the literal is a value of the element type. +/// • A `repeatable-list` option's `default`, if present, is a `list` +/// whose elements are values of the `repeatable-list-shape.item-type` +/// node. A `repeatable-map` option's `default`, if present, is a `map` +/// value of the `repeatable-map-shape.map-type` node. +/// • A `value-is` ref naming a `repeatable-list` option, tail positional, +/// or otherwise list-shaped target means "any occurrence / element +/// equals this literal"; the literal is a value of the element type. For +/// a `repeatable-map` option the literal is a value of the map's value +/// type (any entry's value equals this literal). /// • The tool's identity is its root command name /// (`commands.nodes[0].name`); `get-tool(name)` and /// `guest.invoke(tool-name, …)` match against it. `commands.nodes` @@ -160,6 +164,9 @@ interface common { /// Default value, interpreted against `%type` in `tool.schema`. default: option, required: bool, + /// If true, the positional's value may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } record tail-positional { @@ -175,6 +182,9 @@ interface common { /// If true, tokens after `separator` are not flag-parsed (for /// `kubectl exec -- CMD ARGS...`). verbatim: bool, + /// If true, the tail items may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } // Options and flags @@ -199,14 +209,35 @@ interface common { /// (--decorate, --signed[=mode], --force-with-lease[=ref]). Index into /// `tool.schema`. optional-scalar(type-node-index), - /// Repeatable; value type in the derived signature is list-of-scalar. - repeatable(repeatable-shape), + /// Repeatable scalar option (`-e a -e b`); the collected value is a + /// `list` of the element type. + repeatable-list(repeatable-list-shape), + /// Repeatable key-value option (`-c a=1 -c b=2`); the collected value is a + /// `golem:core` `map` node, never a `list`. + repeatable-map(repeatable-map-shape), } - record repeatable-shape { + record repeatable-list-shape { repetition: repetition, - /// Index into `tool.schema`. - %type: type-node-index, + /// Index into `tool.schema`; the element type of the collected `list`. + item-type: type-node-index, + } + + record repeatable-map-shape { + repetition: repetition, + /// Index into `tool.schema`; a `golem:core` `map` (key + value) node. The + /// collected value is this map. + map-type: type-node-index, + /// What happens when the same key is supplied more than once. + duplicate-key-policy: duplicate-key-policy, + } + + /// Resolution policy for a repeated key in a `repeatable-map` option. + enum duplicate-key-policy { + /// A repeated key is a usage error. + reject, + /// A repeated key takes the last supplied value. + last-wins, } variant repetition { diff --git a/sdks/rust/golem-rust/src/agentic/errors.rs b/sdks/rust/golem-rust/src/agentic/errors.rs index ad219c4342..688abc3ba8 100644 --- a/sdks/rust/golem-rust/src/agentic/errors.rs +++ b/sdks/rust/golem-rust/src/agentic/errors.rs @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +use crate::golem_agentic::exports::golem::tool::guest::ToolError; use crate::golem_agentic::golem::agent::common::AgentError; use crate::schema::IntoTypedSchemaValue; @@ -36,3 +37,32 @@ pub fn invalid_input_error(msg: impl ToString) -> AgentError { pub fn invalid_method_error(method_name: impl ToString) -> AgentError { AgentError::InvalidMethod(method_name.to_string()) } + +pub fn invalid_tool_name(tool_name: impl ToString) -> ToolError { + ToolError::InvalidToolName(tool_name.to_string()) +} + +pub fn invalid_command_path(path: Vec) -> ToolError { + ToolError::InvalidCommandPath(path) +} + +pub fn invalid_input(msg: impl ToString) -> ToolError { + ToolError::InvalidInput(msg.to_string()) +} + +pub fn constraint_violation(msg: impl ToString) -> ToolError { + ToolError::ConstraintViolation(msg.to_string()) +} + +pub fn invalid_result(msg: impl ToString) -> ToolError { + ToolError::InvalidResult(msg.to_string()) +} + +pub fn custom_tool_error(value: T) -> ToolError { + let typed = value + .into_typed_schema_value() + .expect("failed to encode custom tool error"); + ToolError::CustomError( + crate::encode_typed_schema_value(&typed).expect("failed to encode custom tool error"), + ) +} diff --git a/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs new file mode 100644 index 0000000000..c8005bf968 --- /dev/null +++ b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs @@ -0,0 +1,2458 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::agentic::schema_graph_root; +use crate::golem_agentic::golem::tool::common as wire; +use crate::schema::validation::validate_value; +use crate::schema::wit::GraphEncoder; +use crate::schema::{SchemaGraph, SchemaType, SchemaValue, merge_agent_graphs}; +use std::collections::{BTreeMap, BTreeSet}; +use std::fmt::Display; + +pub type Tool = wire::Tool; + +#[derive(Clone, Debug)] +pub struct ExtendedToolType { + pub version: String, + pub commands: Vec, +} + +#[derive(Clone, Debug)] +pub struct ExtendedCommandNode { + pub name: String, + pub aliases: Vec, + pub doc: Doc, + pub globals: ExtendedGlobals, + pub subcommands: Vec, + pub body: Option, +} + +#[derive(Clone, Debug, Default)] +pub struct ExtendedGlobals { + pub options: Vec, + pub flags: Vec, +} + +#[derive(Clone, Debug)] +pub struct ExtendedCommandBody { + pub positionals: ExtendedPositionals, + pub options: Vec, + pub flags: Vec, + pub constraints: Vec, + pub stdin: Option, + pub stdout: Option, + pub result: Option, + pub errors: Vec, + pub annotations: Option, +} + +#[derive(Clone, Debug, Default)] +pub struct ExtendedPositionals { + pub fixed: Vec, + pub tail: Option, +} + +#[derive(Clone, Debug)] +pub struct ExtendedPositional { + pub name: String, + pub doc: Doc, + pub value_name: Option, + pub type_: SchemaGraph, + pub default: Option, + pub required: bool, + pub accepts_stdio: bool, +} + +#[derive(Clone, Debug)] +pub struct ExtendedTailPositional { + pub name: String, + pub doc: Doc, + pub value_name: Option, + pub item_type: SchemaGraph, + pub min: u32, + pub max: Option, + pub separator: Option, + pub verbatim: bool, + pub accepts_stdio: bool, +} + +#[derive(Clone, Debug)] +pub struct ExtendedOptionSpec { + pub long: String, + pub short: Option, + pub aliases: Vec, + pub doc: Doc, + pub value_name: Option, + pub shape: ExtendedOptionShape, + pub default: Option, + pub required: bool, + pub env_var: Option, +} + +#[derive(Clone, Debug)] +pub enum ExtendedOptionShape { + Scalar(SchemaGraph), + OptionalScalar(SchemaGraph), + RepeatableList(ExtendedRepeatableListShape), + RepeatableMap(ExtendedRepeatableMapShape), +} + +#[derive(Clone, Debug)] +pub struct ExtendedRepeatableListShape { + pub repetition: wire::Repetition, + pub item_type: SchemaGraph, +} + +#[derive(Clone, Debug)] +pub struct ExtendedRepeatableMapShape { + pub repetition: wire::Repetition, + pub map_type: SchemaGraph, + pub duplicate_key_policy: wire::DuplicateKeyPolicy, +} + +pub type FlagSpec = wire::FlagSpec; +pub type CommandAnnotations = wire::CommandAnnotations; +pub type StreamSpec = wire::StreamSpec; +pub type ToolFormatter = wire::Formatter; +pub type Doc = wire::Doc; +pub type Example = wire::Example; + +#[derive(Clone, Debug)] +pub struct ExtendedResultSpec { + pub type_: SchemaGraph, + pub doc: Doc, + pub formatters: Vec, + pub default_formatter: String, +} + +#[derive(Clone, Debug)] +pub struct ExtendedErrorCase { + pub name: String, + pub doc: Doc, + pub kind: wire::ErrorKind, + pub exit_code: u8, + pub payload: Option, +} + +#[derive(Clone, Debug)] +pub enum ExtendedRef { + Present(String), + ValueIs(ExtendedValueIsRef), +} + +#[derive(Clone, Debug)] +pub struct ExtendedValueIsRef { + pub name: String, + pub value: SchemaValue, +} + +#[derive(Clone, Debug)] +pub enum ExtendedConstraint { + RequiresAll(Vec), + AllOrNone(Vec), + RequiresAny(Vec), + MutexGroups(Vec), + Implies(ExtendedImpliesC), + Forbids(ExtendedForbidsC), +} + +#[derive(Clone, Debug)] +pub struct ExtendedRefGroup { + pub refs: Vec, +} +#[derive(Clone, Debug)] +pub struct ExtendedImpliesC { + pub lhs_quant: wire::Quantifier, + pub lhs: Vec, + pub rhs_quant: wire::Quantifier, + pub rhs: Vec, +} +#[derive(Clone, Debug)] +pub struct ExtendedForbidsC { + pub lhs_quant: wire::Quantifier, + pub lhs: Vec, + pub rhs: Vec, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum ToolBuildError { + EmptyCommandTree, + CommandIndexOutOfBounds { index: i32, len: usize }, + UnreachableCommandNode(i32), + CommandTreeCycle(i32), + DuplicateCommandParent(i32), + InvalidIdentifier { kind: &'static str, value: String }, + SubtreeCycle(String), + SubtreeRootHasBody(String), + SubtreeRootNameMismatch { expected: String, actual: String }, + SubtreeAnnotationsUnsupported(String), + DuplicateName(String), + DuplicateShort(char), + UnresolvedTypeRef { position: String, id: String }, + IllFormedSchema { position: String, detail: String }, + EncodeError(String), + DefaultTypeMismatch(String), + ValueIsTypeMismatch(String), + RepeatableMapTypeNotMap(String), + UnresolvedDefaultFormatter(String), + VerbatimWithoutSeparator(String), + VariantInInputPosition(String), + CommandNotFound(String), + UnresolvedConstraintRef(String), +} + +impl Display for ToolBuildError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + ToolBuildError::EmptyCommandTree => write!(f, "the command tree is empty"), + ToolBuildError::CommandIndexOutOfBounds { index, len } => write!( + f, + "command index {index} is out of bounds (tree has {len} nodes)" + ), + ToolBuildError::UnreachableCommandNode(i) => { + write!(f, "command node {i} is not reachable from the root") + } + ToolBuildError::CommandTreeCycle(i) => { + write!(f, "the command tree contains a cycle at node {i}") + } + ToolBuildError::DuplicateCommandParent(i) => { + write!(f, "command node {i} has more than one parent") + } + ToolBuildError::InvalidIdentifier { kind, value } => { + write!(f, "invalid {kind}: {value:?}") + } + ToolBuildError::SubtreeCycle(s) => write!(f, "subtree cycle detected: {s}"), + ToolBuildError::SubtreeRootHasBody(s) => write!(f, "subtree root has a body: {s}"), + ToolBuildError::SubtreeRootNameMismatch { expected, actual } => write!( + f, + "subtree root name {actual:?} does not match the parent command name {expected:?}" + ), + ToolBuildError::SubtreeAnnotationsUnsupported(s) => write!( + f, + "annotations are not supported on the pure-dispatcher subtree command {s:?} (the model places command-annotations on a command body)" + ), + ToolBuildError::DuplicateName(s) => write!(f, "duplicate tool metadata name: {s}"), + ToolBuildError::DuplicateShort(c) => write!(f, "duplicate short form: {c:?}"), + ToolBuildError::UnresolvedTypeRef { position, id } => write!( + f, + "type reference {id:?} at {position} does not resolve within its schema graph" + ), + ToolBuildError::IllFormedSchema { position, detail } => { + write!(f, "schema at {position} is not well-formed: {detail}") + } + ToolBuildError::EncodeError(s) => write!(f, "tool metadata encode error: {s}"), + ToolBuildError::DefaultTypeMismatch(s) => { + write!(f, "default value does not match schema: {s}") + } + ToolBuildError::ValueIsTypeMismatch(s) => { + write!(f, "value-is literal does not match the argument type: {s}") + } + ToolBuildError::RepeatableMapTypeNotMap(s) => { + write!(f, "repeatable-map option does not collect into a map: {s}") + } + ToolBuildError::UnresolvedDefaultFormatter(s) => { + write!(f, "default-formatter is not declared: {s}") + } + ToolBuildError::VerbatimWithoutSeparator(s) => { + write!(f, "verbatim tail positional has no separator: {s}") + } + ToolBuildError::VariantInInputPosition(s) => { + write!(f, "a variant type is reachable from input position: {s}") + } + ToolBuildError::CommandNotFound(s) => write!(f, "command not found: {s}"), + ToolBuildError::UnresolvedConstraintRef(s) => { + write!(f, "constraint references an unknown argument: {s}") + } + } + } +} +impl std::error::Error for ToolBuildError {} + +#[derive(Clone, Debug)] +#[allow(clippy::large_enum_variant)] +pub enum EffectiveCommandField { + Option(ExtendedOptionSpec), + Flag(FlagSpec), +} + +#[derive(Clone, Debug)] +pub struct EffectiveCommandBody { + pub globals: Vec, + pub body: Option, +} + +#[derive(Clone, Debug)] +pub struct CanonicalInputField { + pub name: String, + pub schema: SchemaGraph, +} + +impl ExtendedToolType { + pub fn tool_name(&self) -> &str { + self.commands.first().map(|c| c.name.as_str()).unwrap_or("") + } + + pub fn to_tool(&self) -> Tool { + self.try_to_tool().expect("failed to build tool metadata") + } + + pub fn try_to_tool(&self) -> Result { + validate_tool(self)?; + let graph = merge_agent_graphs(collect_schema_graphs(self)) + .map_err(|e| ToolBuildError::EncodeError(e.to_string()))?; + let mut encoder = GraphEncoder::new(&graph.defs) + .map_err(|e| ToolBuildError::EncodeError(e.to_string()))?; + let nodes = self + .commands + .iter() + .map(|n| encode_node(n, &mut encoder)) + .collect::, _>>()?; + Ok(Tool { + version: self.version.clone(), + commands: wire::CommandTree { nodes }, + schema: encoder.finish(), + }) + } + + pub fn effective_globals(&self, command_index: usize) -> Vec { + let path = self.path_to(command_index).unwrap_or_default(); + let mut result = Vec::new(); + for idx in path { + let Some(node) = self.commands.get(idx) else { + continue; + }; + let globals = &node.globals; + result.extend( + globals + .options + .iter() + .cloned() + .map(EffectiveCommandField::Option), + ); + result.extend( + globals + .flags + .iter() + .cloned() + .map(EffectiveCommandField::Flag), + ); + } + result + } + + pub fn canonical_input_fields(&self, command_index: usize) -> Vec { + let mut fields = Vec::new(); + for global in self.effective_globals(command_index) { + match global { + EffectiveCommandField::Option(o) => fields.push(CanonicalInputField { + name: o.long.clone(), + schema: option_collected_graph(&o.shape), + }), + EffectiveCommandField::Flag(f) => fields.push(CanonicalInputField { + name: f.long.clone(), + schema: flag_graph(&f), + }), + } + } + if let Some(body) = self + .commands + .get(command_index) + .and_then(|c| c.body.as_ref()) + { + fields.extend(body.positionals.fixed.iter().map(|p| CanonicalInputField { + name: p.name.clone(), + schema: p.type_.clone(), + })); + if let Some(t) = &body.positionals.tail { + fields.push(CanonicalInputField { + name: t.name.clone(), + schema: list_wrapper_graph(&t.item_type), + }); + } + fields.extend(body.options.iter().map(|o| CanonicalInputField { + name: o.long.clone(), + schema: option_collected_graph(&o.shape), + })); + fields.extend(body.flags.iter().map(|f| CanonicalInputField { + name: f.long.clone(), + schema: flag_graph(f), + })); + } + fields + } + + fn path_to(&self, command_index: usize) -> Option> { + fn visit( + nodes: &[ExtendedCommandNode], + cur: usize, + target: usize, + path: &mut Vec, + on_stack: &mut BTreeSet, + ) -> bool { + // Guards against malformed (cyclic) command trees so this helper is + // safe to call before [`validate_tool`] proves the tree acyclic. + if !on_stack.insert(cur) { + return false; + } + path.push(cur); + if cur == target { + return true; + } + for child in &nodes[cur].subcommands { + if let Ok(child) = usize::try_from(*child) + && child < nodes.len() + && visit(nodes, child, target, path, on_stack) + { + return true; + } + } + path.pop(); + on_stack.remove(&cur); + false + } + let mut path = Vec::new(); + let mut on_stack = BTreeSet::new(); + if !self.commands.is_empty() + && visit(&self.commands, 0, command_index, &mut path, &mut on_stack) + { + Some(path) + } else { + None + } + } +} + +/// Encodes a metadata-time literal (option/positional default, `value-is` +/// literal) into its self-contained `schema-value-tree` wire form. Type +/// conformance of these literals against their referenced type node is checked +/// separately by [`validate_tool`], which has the per-command field context +/// needed to resolve `value-is` references. +pub fn encode_schema_value_default( + value: &SchemaValue, +) -> Result { + crate::schema::wit::encode_value(value).map_err(|e| ToolBuildError::EncodeError(e.to_string())) +} + +fn encode_node( + node: &ExtendedCommandNode, + encoder: &mut GraphEncoder, +) -> Result { + Ok(wire::CommandNode { + name: node.name.clone(), + aliases: node.aliases.clone(), + doc: node.doc.clone(), + globals: encode_globals(&node.globals, encoder)?, + subcommands: node.subcommands.clone(), + body: node + .body + .as_ref() + .map(|b| encode_body(b, encoder)) + .transpose()?, + }) +} +fn encode_globals( + g: &ExtendedGlobals, + e: &mut GraphEncoder, +) -> Result { + Ok(wire::Globals { + options: g + .options + .iter() + .map(|o| encode_option(o, e)) + .collect::>()?, + flags: g.flags.clone(), + }) +} +fn encode_body( + b: &ExtendedCommandBody, + e: &mut GraphEncoder, +) -> Result { + Ok(wire::CommandBody { + positionals: wire::Positionals { + fixed: b + .positionals + .fixed + .iter() + .map(|p| encode_positional(p, e)) + .collect::>()?, + tail: b + .positionals + .tail + .as_ref() + .map(|t| encode_tail(t, e)) + .transpose()?, + }, + options: b + .options + .iter() + .map(|o| encode_option(o, e)) + .collect::>()?, + flags: b.flags.clone(), + constraints: b + .constraints + .iter() + .map(encode_constraint) + .collect::>()?, + stdin: b.stdin.clone(), + stdout: b.stdout.clone(), + result: b.result.as_ref().map(|r| encode_result(r, e)).transpose()?, + errors: b + .errors + .iter() + .map(|x| encode_error(x, e)) + .collect::>()?, + annotations: b.annotations, + }) +} +fn encode_positional( + p: &ExtendedPositional, + e: &mut GraphEncoder, +) -> Result { + Ok(wire::Positional { + name: p.name.clone(), + doc: p.doc.clone(), + value_name: p.value_name.clone(), + type_: e + .encode_type(&schema_graph_root(&p.type_)) + .map_err(|e| ToolBuildError::EncodeError(e.to_string()))?, + default: p + .default + .as_ref() + .map(encode_schema_value_default) + .transpose()?, + required: p.required, + accepts_stdio: p.accepts_stdio, + }) +} +fn encode_tail( + t: &ExtendedTailPositional, + e: &mut GraphEncoder, +) -> Result { + Ok(wire::TailPositional { + name: t.name.clone(), + doc: t.doc.clone(), + value_name: t.value_name.clone(), + item_type: e + .encode_type(&schema_graph_root(&t.item_type)) + .map_err(|e| ToolBuildError::EncodeError(e.to_string()))?, + min: t.min, + max: t.max, + separator: t.separator.clone(), + verbatim: t.verbatim, + accepts_stdio: t.accepts_stdio, + }) +} +fn encode_option( + o: &ExtendedOptionSpec, + e: &mut GraphEncoder, +) -> Result { + Ok(wire::OptionSpec { + long: o.long.clone(), + short: o.short, + aliases: o.aliases.clone(), + doc: o.doc.clone(), + value_name: o.value_name.clone(), + shape: encode_option_shape(&o.shape, e)?, + default: o + .default + .as_ref() + .map(encode_schema_value_default) + .transpose()?, + required: o.required, + env_var: o.env_var.clone(), + }) +} +fn encode_option_shape( + s: &ExtendedOptionShape, + e: &mut GraphEncoder, +) -> Result { + Ok(match s { + ExtendedOptionShape::Scalar(g) => wire::OptionShape::Scalar( + e.encode_type(&schema_graph_root(g)) + .map_err(|e| ToolBuildError::EncodeError(e.to_string()))?, + ), + ExtendedOptionShape::OptionalScalar(g) => wire::OptionShape::OptionalScalar( + e.encode_type(&schema_graph_root(g)) + .map_err(|e| ToolBuildError::EncodeError(e.to_string()))?, + ), + ExtendedOptionShape::RepeatableList(r) => { + wire::OptionShape::RepeatableList(wire::RepeatableListShape { + repetition: r.repetition, + item_type: e + .encode_type(&schema_graph_root(&r.item_type)) + .map_err(|e| ToolBuildError::EncodeError(e.to_string()))?, + }) + } + ExtendedOptionShape::RepeatableMap(r) => { + wire::OptionShape::RepeatableMap(wire::RepeatableMapShape { + repetition: r.repetition, + map_type: e + .encode_type(&schema_graph_root(&r.map_type)) + .map_err(|e| ToolBuildError::EncodeError(e.to_string()))?, + duplicate_key_policy: r.duplicate_key_policy, + }) + } + }) +} +fn encode_result( + r: &ExtendedResultSpec, + e: &mut GraphEncoder, +) -> Result { + Ok(wire::ResultSpec { + type_: e + .encode_type(&schema_graph_root(&r.type_)) + .map_err(|e| ToolBuildError::EncodeError(e.to_string()))?, + doc: r.doc.clone(), + formatters: r.formatters.clone(), + default_formatter: r.default_formatter.clone(), + }) +} +fn encode_error( + err: &ExtendedErrorCase, + e: &mut GraphEncoder, +) -> Result { + Ok(wire::ErrorCase { + name: err.name.clone(), + doc: err.doc.clone(), + kind: err.kind, + exit_code: err.exit_code, + payload: err + .payload + .as_ref() + .map(|g| { + e.encode_type(&schema_graph_root(g)) + .map_err(|e| ToolBuildError::EncodeError(e.to_string())) + }) + .transpose()?, + }) +} +fn encode_constraint(c: &ExtendedConstraint) -> Result { + Ok(match c { + ExtendedConstraint::RequiresAll(v) => wire::Constraint::RequiresAll(encode_refs(v)?), + ExtendedConstraint::AllOrNone(v) => wire::Constraint::AllOrNone(encode_refs(v)?), + ExtendedConstraint::RequiresAny(v) => wire::Constraint::RequiresAny(encode_refs(v)?), + ExtendedConstraint::MutexGroups(g) => wire::Constraint::MutexGroups( + g.iter() + .map(|g| { + Ok(wire::RefGroup { + refs: encode_refs(&g.refs)?, + }) + }) + .collect::>()?, + ), + ExtendedConstraint::Implies(i) => wire::Constraint::Implies(wire::ImpliesC { + lhs_quant: i.lhs_quant, + lhs: encode_refs(&i.lhs)?, + rhs_quant: i.rhs_quant, + rhs: encode_refs(&i.rhs)?, + }), + ExtendedConstraint::Forbids(f) => wire::Constraint::Forbids(wire::ForbidsC { + lhs_quant: f.lhs_quant, + lhs: encode_refs(&f.lhs)?, + rhs: encode_refs(&f.rhs)?, + }), + }) +} +fn encode_refs(r: &[ExtendedRef]) -> Result, ToolBuildError> { + r.iter() + .map(|r| { + Ok(match r { + ExtendedRef::Present(n) => wire::Ref::Present(n.clone()), + ExtendedRef::ValueIs(v) => wire::Ref::ValueIs(wire::ValueIsRef { + name: v.name.clone(), + value: encode_schema_value_default(&v.value)?, + }), + }) + }) + .collect() +} + +fn collect_schema_graphs(tool: &ExtendedToolType) -> Vec { + let mut v = Vec::new(); + for c in &tool.commands { + collect_globals(&c.globals, &mut v); + if let Some(b) = &c.body { + for p in &b.positionals.fixed { + v.push(p.type_.clone()); + } + if let Some(t) = &b.positionals.tail { + v.push(t.item_type.clone()); + } + for o in &b.options { + collect_option(&o.shape, &mut v); + } + for r in b.result.iter() { + v.push(r.type_.clone()); + } + for e in &b.errors { + if let Some(p) = &e.payload { + v.push(p.clone()); + } + } + } + } + v +} +fn collect_globals(g: &ExtendedGlobals, v: &mut Vec) { + for o in &g.options { + collect_option(&o.shape, v); + } +} +fn collect_option(s: &ExtendedOptionShape, v: &mut Vec) { + match s { + ExtendedOptionShape::Scalar(g) | ExtendedOptionShape::OptionalScalar(g) => { + v.push(g.clone()) + } + ExtendedOptionShape::RepeatableList(r) => v.push(r.item_type.clone()), + ExtendedOptionShape::RepeatableMap(r) => v.push(r.map_type.clone()), + } +} +/// The whole collected value type of an option (used to validate an option's +/// `default`): a `repeatable-list` collects into `list`, a +/// `repeatable-map` into its map node; scalar/optional-scalar use the value +/// type directly. Definition graphs are preserved so refs still resolve. +fn option_collected_graph(s: &ExtendedOptionShape) -> SchemaGraph { + match s { + ExtendedOptionShape::Scalar(g) | ExtendedOptionShape::OptionalScalar(g) => g.clone(), + ExtendedOptionShape::RepeatableList(r) => list_wrapper_graph(&r.item_type), + ExtendedOptionShape::RepeatableMap(r) => r.map_type.clone(), + } +} + +/// The full input value type of an option (used for the "no variant in input +/// position" check). A `repeatable-list` stores its element type; a +/// `repeatable-map` stores the whole map node so both key and value are reached. +fn option_input_graph(s: &ExtendedOptionShape) -> SchemaGraph { + match s { + ExtendedOptionShape::Scalar(g) | ExtendedOptionShape::OptionalScalar(g) => g.clone(), + ExtendedOptionShape::RepeatableList(r) => r.item_type.clone(), + ExtendedOptionShape::RepeatableMap(r) => r.map_type.clone(), + } +} + +/// Wrap a graph's root in a `list`, preserving the original definitions so any +/// `Ref` in the element type still resolves. +fn list_wrapper_graph(item: &SchemaGraph) -> SchemaGraph { + SchemaGraph { + defs: item.defs.clone(), + root: SchemaType::list(item.root.clone()), + } +} + +/// The derived input-record field type for a flag (`bool` for a bool-flag, +/// `u32` for a count-flag). Flags carry no author-supplied value type, so this +/// is used only by [`ExtendedToolType::canonical_input_fields`]; a `value-is` +/// literal against a flag is rejected rather than checked against this type. +fn flag_graph(f: &FlagSpec) -> SchemaGraph { + let ty = match f.shape { + wire::FlagShape::BoolFlag(_) => SchemaType::bool(), + wire::FlagShape::CountFlag(_) => SchemaType::u32(), + }; + SchemaGraph::anonymous(ty) +} + +/// The comparand graph a `value-is` literal for an option is checked against, +/// per the WIT "any occurrence / entry equals this literal" rule: a scalar +/// option uses its value type, a `repeatable-list` its element type, and a +/// `repeatable-map` its map value type. Definition graphs are preserved. +fn value_is_comparand_graph(shape: &ExtendedOptionShape) -> SchemaGraph { + match shape { + ExtendedOptionShape::Scalar(g) | ExtendedOptionShape::OptionalScalar(g) => g.clone(), + ExtendedOptionShape::RepeatableList(r) => r.item_type.clone(), + ExtendedOptionShape::RepeatableMap(r) => map_value_graph(&r.map_type), + } +} + +/// The value type of a `Map` graph (resolving the root through any `Ref`s), +/// preserving definitions. Falls back to the map's own root when it is not a +/// map (the repeatable-map shape check reports that case separately). +fn map_value_graph(map: &SchemaGraph) -> SchemaGraph { + let root = match map.resolve_ref(&map.root) { + Ok(SchemaType::Map { value, .. }) => (**value).clone(), + _ => map.root.clone(), + }; + SchemaGraph { + defs: map.defs.clone(), + root, + } +} + +/// Returns true if the graph's root resolves (through any `Ref`s) to a `Map`. +fn resolves_to_map(map: &SchemaGraph) -> bool { + matches!(map.resolve_ref(&map.root), Ok(SchemaType::Map { .. })) +} + +/// The authored, self-contained [`SchemaGraph`] backing an option's value +/// type, regardless of how the option collects on the command line. +fn option_authored_graph(shape: &ExtendedOptionShape) -> &SchemaGraph { + match shape { + ExtendedOptionShape::Scalar(g) | ExtendedOptionShape::OptionalScalar(g) => g, + ExtendedOptionShape::RepeatableList(s) => &s.item_type, + ExtendedOptionShape::RepeatableMap(s) => &s.map_type, + } +} + +/// Validate a self-contained per-argument [`SchemaGraph`] for structural +/// well-formedness via [`validate_graph`]: every embedded type (root and every +/// definition body) is well-formed, every [`SchemaType::Ref`] resolves within +/// the graph's own `defs`, and inline restrictions (numeric bounds, text/binary +/// ranges, union discriminators, ...) are valid. A dangling reference is +/// surfaced as a position-aware [`ToolBuildError::UnresolvedTypeRef`]; any other +/// well-formedness failure becomes [`ToolBuildError::IllFormedSchema`]. +/// +/// Closedness (no dangling refs) is also what makes per-argument validation +/// equivalent to validation against the merged tool schema: [`merge_agent_graphs`] +/// only unions defs (rejecting id collisions with conflicting bodies), so once +/// each embedded graph is well-formed and closed, resolving a ref / validating a +/// default or `value-is` literal against the local graph yields the same result +/// as against the merged graph. +fn check_graph_closed(graph: &SchemaGraph, position: &str) -> Result<(), ToolBuildError> { + let errors = match crate::schema::validation::validate_graph(graph) { + Ok(()) => return Ok(()), + Err(errors) => errors, + }; + // Report the first error deterministically (validate_graph collects in a + // stable discovery order), preferring the precise dangling-ref variant. + let first = errors + .iter() + .find(|e| matches!(e, crate::schema::validation::SchemaError::DanglingRef(_))) + .or_else(|| errors.first()); + match first { + Some(crate::schema::validation::SchemaError::DanglingRef(id)) => { + Err(ToolBuildError::UnresolvedTypeRef { + position: position.to_string(), + id: id.to_string(), + }) + } + Some(other) => Err(ToolBuildError::IllFormedSchema { + position: position.to_string(), + detail: other.to_string(), + }), + None => Ok(()), + } +} + +fn validate_default(value: &SchemaValue, graph: &SchemaGraph) -> Result<(), ToolBuildError> { + validate_value(graph, &graph.root, value) + .map_err(|e| ToolBuildError::DefaultTypeMismatch(format!("{e:?}"))) +} + +/// A `value-is` literal is compatible if it is a valid value for the comparand +/// type, or — for the "any element/occurrence" relaxation — for the element +/// type of a list-shaped (optionally `option`-wrapped) comparand. +fn value_is_compatible(graph: &SchemaGraph, value: &SchemaValue) -> bool { + if validate_value(graph, &graph.root, value).is_ok() { + return true; + } + let Ok(mut peeled) = graph.resolve_ref(&graph.root) else { + return false; + }; + while let SchemaType::Option { inner, .. } = peeled { + match graph.resolve_ref(inner) { + Ok(next) => peeled = next, + Err(_) => return false, + } + } + if let SchemaType::List { element, .. } | SchemaType::FixedList { element, .. } = peeled { + return validate_value(graph, element, value).is_ok(); + } + false +} + +/// `^[a-z][a-z0-9]*(-[a-z0-9]+)*$`: lowercase kebab-case starting with a letter, +/// no leading/trailing or doubled dashes. Hand-rolled to avoid a `regex` +/// dependency in the guest SDK. +fn is_valid_identifier(s: &str) -> bool { + let mut prev_dash = false; + !s.is_empty() + && s.chars().enumerate().all(|(i, c)| { + let ok = if i == 0 { + c.is_ascii_lowercase() + } else { + c.is_ascii_lowercase() || c.is_ascii_digit() || c == '-' + }; + let dash_ok = !(c == '-' && prev_dash); + prev_dash = c == '-'; + ok && dash_ok + }) + && !s.ends_with('-') +} + +fn check_identifier(kind: &'static str, value: &str) -> Result<(), ToolBuildError> { + if is_valid_identifier(value) { + Ok(()) + } else { + Err(ToolBuildError::InvalidIdentifier { + kind, + value: value.to_string(), + }) + } +} + +fn insert_unique(set: &mut BTreeSet, name: &str) -> Result<(), ToolBuildError> { + if set.insert(name.to_string()) { + Ok(()) + } else { + Err(ToolBuildError::DuplicateName(name.to_string())) + } +} + +fn insert_unique_short(set: &mut BTreeSet, short: char) -> Result<(), ToolBuildError> { + if set.insert(short) { + Ok(()) + } else { + Err(ToolBuildError::DuplicateShort(short)) + } +} + +/// Validate a [`Tool`] against the producer-side construction invariants +/// documented in `golem:tool/common`. Mirrors the canonical host-side +/// validator (`golem-common`'s `validate_tool`), adapted to the SDK's +/// per-argument [`SchemaGraph`] representation. Type/value well-formedness of +/// embedded schemas is delegated to [`validate_value`]; each embedded graph is +/// validated for structural well-formedness — including dangling +/// [`SchemaType::Ref`]s and ill-formed inline restrictions (e.g. numeric +/// `min > max`) — by [`check_graph_closed`] (the closedness that also makes +/// per-argument validation equivalent to validating against the merged tool +/// schema). Cross-graph id collisions with conflicting bodies surface later +/// during graph merge in [`ExtendedToolType::try_to_tool`]. +/// +/// Runs the structural command-tree check first so the subsequent recursive +/// traversal can index the tree without bounds/cycle hazards. +pub fn validate_tool(tool: &ExtendedToolType) -> Result<(), ToolBuildError> { + check_command_tree_structure(tool)?; + visit_command(tool, 0, &[]) +} + +/// Structural integrity of the command tree: non-empty, every subcommand index +/// in bounds, acyclic, single-rooted tree (no shared subcommands), all nodes +/// reachable from the root. +fn check_command_tree_structure(tool: &ExtendedToolType) -> Result<(), ToolBuildError> { + let len = tool.commands.len(); + if len == 0 { + return Err(ToolBuildError::EmptyCommandTree); + } + for node in &tool.commands { + for sub in &node.subcommands { + if *sub < 0 || (*sub as usize) >= len { + return Err(ToolBuildError::CommandIndexOutOfBounds { index: *sub, len }); + } + } + } + let mut visited = vec![false; len]; + let mut on_stack = vec![false; len]; + dfs_command_tree(tool, 0, &mut visited, &mut on_stack)?; + for (i, seen) in visited.iter().enumerate() { + if !seen { + return Err(ToolBuildError::UnreachableCommandNode(i as i32)); + } + } + Ok(()) +} + +fn dfs_command_tree( + tool: &ExtendedToolType, + idx: usize, + visited: &mut [bool], + on_stack: &mut [bool], +) -> Result<(), ToolBuildError> { + if on_stack[idx] { + return Err(ToolBuildError::CommandTreeCycle(idx as i32)); + } + if visited[idx] { + return Err(ToolBuildError::DuplicateCommandParent(idx as i32)); + } + visited[idx] = true; + on_stack[idx] = true; + for sub in &tool.commands[idx].subcommands { + // Bounds were validated in check_command_tree_structure. + dfs_command_tree(tool, *sub as usize, visited, on_stack)?; + } + on_stack[idx] = false; + Ok(()) +} + +/// Recursive, scope-aware traversal mirroring the canonical validator. +/// `ancestor_globals` are the globals of strict ancestors (root excluded only +/// at the root call); the current node's own globals are appended to form the +/// in-scope set for its body and children. +fn visit_command( + tool: &ExtendedToolType, + index: usize, + ancestor_globals: &[&ExtendedGlobals], +) -> Result<(), ToolBuildError> { + let node = &tool.commands[index]; + check_identifier("command name", &node.name)?; + for alias in &node.aliases { + check_identifier("command alias", alias)?; + } + check_globals_decls(&node.globals)?; + check_global_scope_uniqueness(ancestor_globals, &node.globals)?; + + let mut in_scope: Vec<&ExtendedGlobals> = ancestor_globals.to_vec(); + in_scope.push(&node.globals); + + if let Some(body) = &node.body { + check_body(body, &in_scope)?; + } + check_subcommand_uniqueness(tool, node)?; + + for sub in &node.subcommands { + visit_command(tool, *sub as usize, &in_scope)?; + } + Ok(()) +} + +/// Identifier, repeatable-map, default, and variant-in-input checks for the +/// declarations within one command's `globals` (uniqueness is handled by +/// [`check_global_scope_uniqueness`]). +fn check_globals_decls(globals: &ExtendedGlobals) -> Result<(), ToolBuildError> { + for opt in &globals.options { + check_option_decl(opt)?; + } + for flag in &globals.flags { + check_flag_identifiers(flag)?; + } + Ok(()) +} + +fn check_option_decl(opt: &ExtendedOptionSpec) -> Result<(), ToolBuildError> { + check_identifier("option long name", &opt.long)?; + for alias in &opt.aliases { + check_identifier("option alias", alias)?; + } + check_graph_closed( + option_authored_graph(&opt.shape), + &format!("option --{}", opt.long), + )?; + if let ExtendedOptionShape::RepeatableMap(shape) = &opt.shape + && !resolves_to_map(&shape.map_type) + { + return Err(ToolBuildError::RepeatableMapTypeNotMap(opt.long.clone())); + } + if let Some(default) = &opt.default { + validate_default(default, &option_collected_graph(&opt.shape))?; + } + let input = option_input_graph(&opt.shape); + if graph_reaches_variant(&input) { + return Err(ToolBuildError::VariantInInputPosition(opt.long.clone())); + } + Ok(()) +} + +fn check_flag_identifiers(flag: &FlagSpec) -> Result<(), ToolBuildError> { + check_identifier("flag long name", &flag.long)?; + for alias in &flag.aliases { + check_identifier("flag alias", alias)?; + } + Ok(()) +} + +/// The current command's own globals must be unique among themselves and +/// against every ancestor global (long names, aliases, and short forms). +fn check_global_scope_uniqueness( + ancestors: &[&ExtendedGlobals], + own: &ExtendedGlobals, +) -> Result<(), ToolBuildError> { + let mut names: BTreeSet = BTreeSet::new(); + let mut shorts: BTreeSet = BTreeSet::new(); + for globals in ancestors { + seed_global_tokens(globals, &mut names, &mut shorts); + } + for opt in &own.options { + insert_unique(&mut names, &opt.long)?; + for alias in &opt.aliases { + insert_unique(&mut names, alias)?; + } + if let Some(short) = opt.short { + insert_unique_short(&mut shorts, short)?; + } + } + for flag in &own.flags { + insert_unique(&mut names, &flag.long)?; + for alias in &flag.aliases { + insert_unique(&mut names, alias)?; + } + if let Some(short) = flag.short { + insert_unique_short(&mut shorts, short)?; + } + } + Ok(()) +} + +fn seed_global_tokens( + globals: &ExtendedGlobals, + names: &mut BTreeSet, + shorts: &mut BTreeSet, +) { + for opt in &globals.options { + names.insert(opt.long.clone()); + names.extend(opt.aliases.iter().cloned()); + if let Some(short) = opt.short { + shorts.insert(short); + } + } + for flag in &globals.flags { + names.insert(flag.long.clone()); + names.extend(flag.aliases.iter().cloned()); + if let Some(short) = flag.short { + shorts.insert(short); + } + } +} + +/// Per-name comparand graph for `value-is` resolution (only value-typed names). +#[derive(Default)] +struct NameScope { + names: BTreeSet, + typed: BTreeMap, +} + +fn check_body( + body: &ExtendedCommandBody, + in_scope: &[&ExtendedGlobals], +) -> Result<(), ToolBuildError> { + // In-scope global tokens (for uniqueness) and resolution scope (for refs). + let mut names: BTreeSet = BTreeSet::new(); + let mut shorts: BTreeSet = BTreeSet::new(); + let mut scope = NameScope::default(); + for globals in in_scope { + seed_global_tokens(globals, &mut names, &mut shorts); + for opt in &globals.options { + register_option_scope(&mut scope, opt); + } + for flag in &globals.flags { + scope.names.insert(flag.long.clone()); + scope.names.extend(flag.aliases.iter().cloned()); + } + } + + for opt in &body.options { + check_option_decl(opt)?; + insert_unique(&mut names, &opt.long)?; + for alias in &opt.aliases { + insert_unique(&mut names, alias)?; + } + if let Some(short) = opt.short { + insert_unique_short(&mut shorts, short)?; + } + register_option_scope(&mut scope, opt); + } + + for flag in &body.flags { + check_flag_identifiers(flag)?; + insert_unique(&mut names, &flag.long)?; + for alias in &flag.aliases { + insert_unique(&mut names, alias)?; + } + if let Some(short) = flag.short { + insert_unique_short(&mut shorts, short)?; + } + scope.names.insert(flag.long.clone()); + scope.names.extend(flag.aliases.iter().cloned()); + } + + for positional in &body.positionals.fixed { + check_identifier("positional name", &positional.name)?; + check_graph_closed( + &positional.type_, + &format!("positional {}", positional.name), + )?; + insert_unique(&mut names, &positional.name)?; + scope.names.insert(positional.name.clone()); + scope + .typed + .insert(positional.name.clone(), positional.type_.clone()); + if let Some(default) = &positional.default { + validate_default(default, &positional.type_)?; + } + if graph_reaches_variant(&positional.type_) { + return Err(ToolBuildError::VariantInInputPosition( + positional.name.clone(), + )); + } + } + + if let Some(tail) = &body.positionals.tail { + check_identifier("positional name", &tail.name)?; + check_graph_closed(&tail.item_type, &format!("tail {}", tail.name))?; + insert_unique(&mut names, &tail.name)?; + scope.names.insert(tail.name.clone()); + // A tail positional is list-like; a value-is literal matches an item. + scope + .typed + .insert(tail.name.clone(), tail.item_type.clone()); + if graph_reaches_variant(&tail.item_type) { + return Err(ToolBuildError::VariantInInputPosition(tail.name.clone())); + } + if tail.verbatim && tail.separator.is_none() { + return Err(ToolBuildError::VerbatimWithoutSeparator(tail.name.clone())); + } + } + + for constraint in &body.constraints { + check_constraint(constraint, &scope)?; + } + + if let Some(result) = &body.result { + check_graph_closed(&result.type_, "result")?; + for formatter in &result.formatters { + check_identifier("formatter name", &formatter.name)?; + } + if !result + .formatters + .iter() + .any(|f| f.name == result.default_formatter) + { + return Err(ToolBuildError::UnresolvedDefaultFormatter( + result.default_formatter.clone(), + )); + } + } + + for error_case in &body.errors { + check_identifier("error-case name", &error_case.name)?; + if let Some(payload) = &error_case.payload { + check_graph_closed(payload, &format!("error {}", error_case.name))?; + } + } + + Ok(()) +} + +fn register_option_scope(scope: &mut NameScope, opt: &ExtendedOptionSpec) { + scope.names.insert(opt.long.clone()); + scope.names.extend(opt.aliases.iter().cloned()); + let comparand = value_is_comparand_graph(&opt.shape); + scope.typed.insert(opt.long.clone(), comparand.clone()); + for alias in &opt.aliases { + scope.typed.insert(alias.clone(), comparand.clone()); + } +} + +fn check_subcommand_uniqueness( + tool: &ExtendedToolType, + node: &ExtendedCommandNode, +) -> Result<(), ToolBuildError> { + let mut seen = BTreeSet::new(); + for sub in &node.subcommands { + let child = &tool.commands[*sub as usize]; + insert_unique(&mut seen, &child.name)?; + for alias in &child.aliases { + insert_unique(&mut seen, alias)?; + } + } + Ok(()) +} + +fn check_constraint(c: &ExtendedConstraint, scope: &NameScope) -> Result<(), ToolBuildError> { + match c { + ExtendedConstraint::RequiresAll(v) + | ExtendedConstraint::AllOrNone(v) + | ExtendedConstraint::RequiresAny(v) => check_refs(v, scope), + ExtendedConstraint::MutexGroups(groups) => { + for g in groups { + check_refs(&g.refs, scope)?; + } + Ok(()) + } + ExtendedConstraint::Implies(i) => { + check_refs(&i.lhs, scope)?; + check_refs(&i.rhs, scope) + } + ExtendedConstraint::Forbids(f) => { + check_refs(&f.lhs, scope)?; + check_refs(&f.rhs, scope) + } + } +} + +fn check_refs(refs: &[ExtendedRef], scope: &NameScope) -> Result<(), ToolBuildError> { + for r in refs { + match r { + ExtendedRef::Present(name) => { + if !scope.names.contains(name) { + return Err(ToolBuildError::UnresolvedConstraintRef(name.clone())); + } + } + ExtendedRef::ValueIs(v) => { + if !scope.names.contains(&v.name) { + return Err(ToolBuildError::UnresolvedConstraintRef(v.name.clone())); + } + // A name with no value type (a flag) cannot carry a value-is. + let graph = scope + .typed + .get(&v.name) + .ok_or_else(|| ToolBuildError::ValueIsTypeMismatch(v.name.clone()))?; + if !value_is_compatible(graph, &v.value) { + return Err(ToolBuildError::ValueIsTypeMismatch(v.name.clone())); + } + } + } + } + Ok(()) +} + +fn graph_reaches_variant(graph: &SchemaGraph) -> bool { + let mut visited = BTreeSet::new(); + type_reaches_variant(graph, &graph.root, &mut visited) +} + +/// Returns true if `ty` (resolving named references against `graph`) reaches a +/// [`SchemaType::Variant`]; `visited` guards recursive graphs. +fn type_reaches_variant( + graph: &SchemaGraph, + ty: &SchemaType, + visited: &mut BTreeSet, +) -> bool { + if let SchemaType::Ref { id, .. } = ty + && !visited.insert(id.to_string()) + { + return false; + } + let Ok(resolved) = graph.resolve_ref(ty) else { + return false; + }; + match resolved { + SchemaType::Variant { .. } => true, + SchemaType::Record { fields, .. } => fields + .iter() + .any(|f| type_reaches_variant(graph, &f.body, visited)), + SchemaType::List { element, .. } | SchemaType::FixedList { element, .. } => { + type_reaches_variant(graph, element, visited) + } + SchemaType::Option { inner, .. } => type_reaches_variant(graph, inner, visited), + SchemaType::Map { key, value, .. } => { + type_reaches_variant(graph, key, visited) || type_reaches_variant(graph, value, visited) + } + SchemaType::Tuple { elements, .. } => elements + .iter() + .any(|e| type_reaches_variant(graph, e, visited)), + SchemaType::Result { spec, .. } => { + spec.ok + .as_deref() + .is_some_and(|t| type_reaches_variant(graph, t, visited)) + || spec + .err + .as_deref() + .is_some_and(|t| type_reaches_variant(graph, t, visited)) + } + SchemaType::Union { spec, .. } => spec + .branches + .iter() + .any(|b| type_reaches_variant(graph, &b.body, visited)), + SchemaType::Future { inner: Some(t), .. } | SchemaType::Stream { inner: Some(t), .. } => { + type_reaches_variant(graph, t, visited) + } + _ => false, + } +} + +/// Resolve a command path (names or aliases) to a command-tree index using +/// checked lookups, so a malformed tree cannot panic. +fn resolve_command_path( + tool: &ExtendedToolType, + command_path: &[String], +) -> Result { + let mut idx = 0usize; + if tool.commands.is_empty() { + return Err(ToolBuildError::EmptyCommandTree); + } + for part in command_path { + let node = tool + .commands + .get(idx) + .ok_or_else(|| ToolBuildError::CommandNotFound(part.clone()))?; + let next = node.subcommands.iter().find_map(|i| { + let child_idx = usize::try_from(*i).ok()?; + let child = tool.commands.get(child_idx)?; + if &child.name == part || child.aliases.iter().any(|a| a == part) { + Some(child_idx) + } else { + None + } + }); + idx = next.ok_or_else(|| ToolBuildError::CommandNotFound(part.clone()))?; + } + Ok(idx) +} + +/// Render help text for a command node addressed by `command_path` (empty path +/// = root). Lists inherited globals, the body's positionals/options/flags, and +/// subcommands. +pub fn render_help( + tool: &ExtendedToolType, + command_path: &[String], +) -> Result { + let idx = resolve_command_path(tool, command_path)?; + let n = tool + .commands + .get(idx) + .ok_or(ToolBuildError::EmptyCommandTree)?; + let mut out = format!( + "Usage: {}\n\n{}\n{}\n", + n.name, n.doc.summary, n.doc.description + ); + let globals = tool.effective_globals(idx); + if !globals.is_empty() { + out.push_str("\nGlobals:\n"); + for g in globals { + match g { + EffectiveCommandField::Option(o) => { + out.push_str(&format!(" --{}\t{}\n", o.long, o.doc.summary)) + } + EffectiveCommandField::Flag(f) => { + out.push_str(&format!(" --{}\t{}\n", f.long, f.doc.summary)) + } + } + } + } + if let Some(b) = &n.body { + if !b.positionals.fixed.is_empty() { + out.push_str("\nPositionals:\n"); + for p in &b.positionals.fixed { + out.push_str(&format!(" {}\t{}\n", p.name, p.doc.summary)); + } + } + if let Some(t) = &b.positionals.tail { + out.push_str("\nTail:\n"); + out.push_str(&format!(" {}...\t{}\n", t.name, t.doc.summary)); + } + if !b.options.is_empty() { + out.push_str("\nOptions:\n"); + for o in &b.options { + out.push_str(&format!(" --{}\t{}\n", o.long, o.doc.summary)); + } + } + if !b.flags.is_empty() { + out.push_str("\nFlags:\n"); + for f in &b.flags { + out.push_str(&format!(" --{}\t{}\n", f.long, f.doc.summary)); + } + } + } + if !n.subcommands.is_empty() { + out.push_str("\nSubcommands:\n"); + for i in &n.subcommands { + if let Some(c) = usize::try_from(*i).ok().and_then(|j| tool.commands.get(j)) { + out.push_str(&format!(" {}\t{}\n", c.name, c.doc.summary)); + } + } + } + Ok(out) +} + +/// Render help text for a single argument of the command addressed by +/// `command_path`. Searches inherited globals, then the body's positionals, +/// tail, options, and flags (in canonical order), matching the long name or an +/// alias. Returns [`ToolBuildError::CommandNotFound`] if no such argument +/// exists on that command. +pub fn render_argument_help( + tool: &ExtendedToolType, + command_path: &[String], + arg_name: &str, +) -> Result { + let idx = resolve_command_path(tool, command_path)?; + + for g in tool.effective_globals(idx) { + match g { + EffectiveCommandField::Option(o) + if o.long == arg_name || o.aliases.iter().any(|a| a == arg_name) => + { + return Ok(render_option_help(&o, true)); + } + EffectiveCommandField::Flag(f) + if f.long == arg_name || f.aliases.iter().any(|a| a == arg_name) => + { + return Ok(render_flag_help(&f, true)); + } + _ => {} + } + } + + if let Some(body) = tool.commands.get(idx).and_then(|c| c.body.as_ref()) { + for p in &body.positionals.fixed { + if p.name == arg_name { + return Ok(format!( + "{} (positional{})\n{}\n{}\n", + p.name, + if p.required { ", required" } else { "" }, + p.doc.summary, + p.doc.description + )); + } + } + if let Some(t) = &body.positionals.tail + && t.name == arg_name + { + return Ok(format!( + "{}... (tail positional)\n{}\n{}\n", + t.name, t.doc.summary, t.doc.description + )); + } + for o in &body.options { + if o.long == arg_name || o.aliases.iter().any(|a| a == arg_name) { + return Ok(render_option_help(o, false)); + } + } + for f in &body.flags { + if f.long == arg_name || f.aliases.iter().any(|a| a == arg_name) { + return Ok(render_flag_help(f, false)); + } + } + } + + Err(ToolBuildError::CommandNotFound(arg_name.to_string())) +} + +fn render_option_help(o: &ExtendedOptionSpec, global: bool) -> String { + format!( + "--{} (option{})\n{}\n{}\n", + o.long, + if global { ", global" } else { "" }, + o.doc.summary, + o.doc.description + ) +} + +fn render_flag_help(f: &FlagSpec, global: bool) -> String { + format!( + "--{} (flag{})\n{}\n{}\n", + f.long, + if global { ", global" } else { "" }, + f.doc.summary, + f.doc.description + ) +} + +#[derive(Default)] +pub struct ToolBuildCtx { + stack: Vec, + command_path: Vec, +} +impl ToolBuildCtx { + pub fn new() -> Self { + Self::default() + } + pub fn push_descriptor(&mut self, identity: impl Into) -> Result<(), ToolBuildError> { + let id = identity.into(); + if self.stack.contains(&id) { + return Err(ToolBuildError::SubtreeCycle(self.cycle_path(&id))); + } + self.stack.push(id); + Ok(()) + } + pub fn pop_descriptor(&mut self) { + self.stack.pop(); + } + /// Build a child descriptor while the given identity is pushed on the + /// recursion stack, always popping afterwards. Preferred over manual + /// [`Self::push_descriptor`] / [`Self::pop_descriptor`] so an early return + /// inside `f` cannot leak a stack entry and falsely report a later cycle. + pub fn with_descriptor( + &mut self, + identity: impl Into, + f: impl FnOnce(&mut Self) -> Result, + ) -> Result { + self.push_descriptor(identity)?; + let result = f(self); + self.pop_descriptor(); + result + } + fn cycle_path(&self, repeated: &str) -> String { + let mut chain: Vec<&str> = self.stack.iter().map(String::as_str).collect(); + chain.push(repeated); + chain.join(" -> ") + } + pub fn push_command(&mut self, name: impl Into) { + self.command_path.push(name.into()); + } + pub fn pop_command(&mut self) { + self.command_path.pop(); + } + pub fn command_path(&self) -> &[String] { + &self.command_path + } +} +pub trait ToolDefinitionDescriptor { + fn metadata(ctx: &mut ToolBuildCtx) -> Result; +} + +/// Turn a child subtree's command list into the graft-local nodes to splice +/// beneath a parent. The child root (index 0) becomes the pure-dispatcher +/// placeholder for the parent's subtree command: its `body` must be `None`, its +/// `globals` and `subcommands` are preserved (so recursive globals still apply +/// and the graft-local child indices stay valid), and its `name`/`doc`/ +/// `aliases` may be overridden by the parent's `#[command(...)]`. +/// +/// `expected_name` is the parent subtree method's command name; unless an +/// explicit `override_name` is given, the child root name must equal it +/// (`SubtreeRootNameMismatch`). Command-annotations are not supported on a pure +/// dispatcher (the model places them on a command body), so a non-`None` +/// `override_annotations` is rejected rather than silently dropped. +/// +/// Command indices are returned unchanged (graft-local); the final offset into +/// the parent's command tree is applied by [`append_grafted_subtree`]. +pub fn graft_subtree( + child: ExtendedToolType, + expected_name: &str, + override_name: Option, + override_doc: Option, + override_aliases: Option>, + override_annotations: Option, +) -> Result, ToolBuildError> { + let mut nodes = child.commands; + let root = nodes.first_mut().ok_or(ToolBuildError::EmptyCommandTree)?; + if root.body.is_some() { + return Err(ToolBuildError::SubtreeRootHasBody(root.name.clone())); + } + if override_annotations.is_some() { + return Err(ToolBuildError::SubtreeAnnotationsUnsupported( + override_name.clone().unwrap_or_else(|| root.name.clone()), + )); + } + if override_name.is_none() && root.name != expected_name { + return Err(ToolBuildError::SubtreeRootNameMismatch { + expected: expected_name.to_string(), + actual: root.name.clone(), + }); + } + if let Some(name) = override_name { + root.name = name; + } + if let Some(doc) = override_doc { + root.doc = doc; + } + if let Some(aliases) = override_aliases { + root.aliases = aliases; + } + // body stays None; globals and subcommands (graft-local indices) unchanged. + Ok(nodes) +} + +/// Append a graft (graft-local command nodes whose index 0 is the dispatcher +/// placeholder) to `parent`, offsetting every internal subcommand index, and +/// return the parent index of the placeholder. The caller links this index as a +/// subcommand of the hosting command. +pub fn append_grafted_subtree( + parent: &mut Vec, + mut graft: Vec, +) -> i32 { + let offset = parent.len() as i32; + for node in &mut graft { + node.subcommands = node.subcommands.iter().map(|i| i + offset).collect(); + } + parent.extend(graft); + offset +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::agentic::tool_refinement::{refine_numeric, refine_text, refine_url}; + use crate::schema::schema_type::{NumericBound, NumericRestrictions}; + use test_r::test; + + fn doc(summary: &str) -> Doc { + Doc { + summary: summary.to_string(), + description: String::new(), + examples: vec![], + } + } + + fn str_graph() -> SchemaGraph { + SchemaGraph::anonymous(SchemaType::string()) + } + fn u32_graph() -> SchemaGraph { + SchemaGraph::anonymous(SchemaType::u32()) + } + + fn sample_tool() -> ExtendedToolType { + ExtendedToolType { + version: "0.1.0".to_string(), + commands: vec![ + ExtendedCommandNode { + name: "root".to_string(), + aliases: vec![], + doc: doc("root"), + globals: ExtendedGlobals { + options: vec![ExtendedOptionSpec { + long: "verbose".to_string(), + short: None, + aliases: vec![], + doc: doc("global"), + value_name: None, + shape: ExtendedOptionShape::Scalar(u32_graph()), + default: None, + required: false, + env_var: None, + }], + flags: vec![], + }, + subcommands: vec![1], + body: None, + }, + ExtendedCommandNode { + name: "run".to_string(), + aliases: vec!["r".to_string()], + doc: doc("run"), + globals: ExtendedGlobals::default(), + subcommands: vec![], + body: Some(ExtendedCommandBody { + positionals: ExtendedPositionals { + fixed: vec![ExtendedPositional { + name: "input".to_string(), + doc: doc("input"), + value_name: None, + type_: str_graph(), + default: None, + required: true, + accepts_stdio: false, + }], + tail: None, + }, + options: vec![ExtendedOptionSpec { + long: "config".to_string(), + short: None, + aliases: vec![], + doc: doc("config"), + value_name: None, + shape: ExtendedOptionShape::RepeatableMap(ExtendedRepeatableMapShape { + repetition: wire::Repetition::Repeated, + map_type: SchemaGraph::anonymous(SchemaType::map( + SchemaType::string(), + SchemaType::string(), + )), + duplicate_key_policy: wire::DuplicateKeyPolicy::Reject, + }), + default: None, + required: false, + env_var: None, + }], + flags: vec![FlagSpec { + long: "force".to_string(), + short: None, + aliases: vec![], + doc: doc("force"), + shape: wire::FlagShape::BoolFlag(wire::BoolFlagShape { + default: false, + negatable: false, + }), + env_var: None, + }], + constraints: vec![], + stdin: None, + stdout: None, + result: Some(ExtendedResultSpec { + type_: str_graph(), + doc: doc("result"), + formatters: vec![ToolFormatter { + name: "human".to_string(), + doc: doc("human"), + }], + default_formatter: "human".to_string(), + }), + errors: vec![], + annotations: None, + }), + }, + ], + } + } + + #[test] + fn builds_tool_and_orders_fields() { + let tool = sample_tool(); + let wire = tool.to_tool(); + assert_eq!(wire.commands.nodes.len(), 2); + assert_eq!( + wire.commands.nodes[1].body.as_ref().unwrap().options.len(), + 1 + ); + let names: Vec<_> = tool + .canonical_input_fields(1) + .into_iter() + .map(|f| f.name) + .collect(); + assert_eq!(names, vec!["verbose", "input", "config", "force"]); + } + + #[test] + fn help_contains_names() { + let help = render_help(&sample_tool(), &["run".to_string()]).unwrap(); + assert!(help.contains("run")); + assert!(help.contains("--config")); + } + + fn dispatcher_child() -> ExtendedToolType { + ExtendedToolType { + version: "x".into(), + commands: vec![ + ExtendedCommandNode { + name: "child".into(), + aliases: vec![], + doc: doc(""), + globals: ExtendedGlobals::default(), + subcommands: vec![1], + body: None, + }, + ExtendedCommandNode { + name: "leaf".into(), + aliases: vec![], + doc: doc(""), + globals: ExtendedGlobals::default(), + subcommands: vec![], + body: None, + }, + ], + } + } + + #[test] + fn graft_rejects_root_with_body() { + let err = graft_subtree( + leaf_tool_with_body(empty_body()), + "t", + None, + None, + None, + None, + ) + .unwrap_err(); + assert!(matches!(err, ToolBuildError::SubtreeRootHasBody(_))); + } + + #[test] + fn graft_preserves_local_indices() { + // The child root stays at index 0 as a body-less placeholder; its + // graft-local subcommand index (1) is unchanged. + let graft = graft_subtree(dispatcher_child(), "child", None, None, None, None).unwrap(); + assert_eq!(graft.len(), 2); + assert!(graft[0].body.is_none()); + assert_eq!(graft[0].subcommands, vec![1]); + + // Appending at offset N shifts the internal index to N + 1. + let mut parent = vec![ExtendedCommandNode { + name: "root".into(), + aliases: vec![], + doc: doc(""), + globals: ExtendedGlobals::default(), + subcommands: vec![], + body: None, + }]; + let offset = append_grafted_subtree(&mut parent, graft); + assert_eq!(offset, 1); + assert_eq!(parent[1].subcommands, vec![2]); + assert_eq!(parent.len(), 3); + } + + #[test] + fn graft_enforces_name_rule_and_rejects_annotations() { + let mismatch = + graft_subtree(dispatcher_child(), "remote", None, None, None, None).unwrap_err(); + assert!(matches!( + mismatch, + ToolBuildError::SubtreeRootNameMismatch { .. } + )); + + // An explicit override name bypasses the match rule. + let ok = graft_subtree( + dispatcher_child(), + "remote", + Some("remote".into()), + None, + None, + None, + ) + .unwrap(); + assert_eq!(ok[0].name, "remote"); + + let ann = graft_subtree( + dispatcher_child(), + "child", + None, + None, + None, + Some(CommandAnnotations { + read_only: true, + destructive: false, + idempotent: false, + open_world: false, + }), + ) + .unwrap_err(); + assert!(matches!( + ann, + ToolBuildError::SubtreeAnnotationsUnsupported(_) + )); + } + + #[test] + fn cycle_detection_and_refinements_work() { + let mut ctx = ToolBuildCtx::new(); + ctx.push_descriptor("a").unwrap(); + assert!(matches!( + ctx.push_descriptor("a"), + Err(ToolBuildError::SubtreeCycle(_)) + )); + let text = refine_text(SchemaType::string(), Some("x+".into()), Some(1), Some(3)); + assert!(matches!(text, SchemaType::Text { .. })); + let url = refine_url( + SchemaType::url(Default::default()), + Some(vec!["https".into()]), + ); + assert!(matches!(url, SchemaType::Url { .. })); + let num = refine_numeric( + SchemaType::u32(), + Some(NumericBound::Unsigned(1)), + None, + Some("ms".into()), + ); + assert_eq!( + num.numeric_restrictions().unwrap().unit.as_deref(), + Some("ms") + ); + } + + #[test] + fn refine_numeric_overlays_existing_restrictions() { + // A type that already carries min + unit; refining only max must + // preserve the existing min and unit instead of dropping them. + let base = refine_numeric( + SchemaType::u32(), + Some(NumericBound::Unsigned(10)), + None, + Some("items".into()), + ); + let refined = refine_numeric(base, None, Some(NumericBound::Unsigned(20)), None); + let r = refined.numeric_restrictions().unwrap(); + assert_eq!(r.min, Some(NumericBound::Unsigned(10))); + assert_eq!(r.max, Some(NumericBound::Unsigned(20))); + assert_eq!(r.unit.as_deref(), Some("items")); + } + + #[test] + fn refine_numeric_preserves_unspecified_existing_restrictions() { + let base = SchemaType::U32 { + restrictions: NumericRestrictions { + min: Some(NumericBound::Unsigned(10)), + max: Some(NumericBound::Unsigned(100)), + unit: Some("items".to_string()), + } + .normalize(), + metadata: Default::default(), + }; + + let refined = refine_numeric(base, None, Some(NumericBound::Unsigned(200)), None); + + let restrictions = refined.numeric_restrictions().unwrap(); + assert_eq!(restrictions.min, Some(NumericBound::Unsigned(10))); + assert_eq!(restrictions.max, Some(NumericBound::Unsigned(200))); + assert_eq!(restrictions.unit.as_deref(), Some("items")); + } + + #[test] + fn numeric_value_validation_rejects_malformed_restrictions() { + let ty = SchemaType::U32 { + restrictions: Some(NumericRestrictions { + min: Some(NumericBound::Unsigned(10)), + max: Some(NumericBound::Unsigned(1)), + unit: None, + }), + metadata: Default::default(), + }; + let graph = SchemaGraph::anonymous(ty.clone()); + + validate_value(&graph, &ty, &SchemaValue::U32(5)) + .expect_err("malformed numeric restrictions must not be ignored"); + } + + fn leaf_tool_with_body(body: ExtendedCommandBody) -> ExtendedToolType { + ExtendedToolType { + version: "0.1.0".to_string(), + commands: vec![ExtendedCommandNode { + name: "t".to_string(), + aliases: vec![], + doc: doc(""), + globals: ExtendedGlobals::default(), + subcommands: vec![], + body: Some(body), + }], + } + } + + fn empty_body() -> ExtendedCommandBody { + ExtendedCommandBody { + positionals: ExtendedPositionals::default(), + options: vec![], + flags: vec![], + constraints: vec![], + stdin: None, + stdout: None, + result: None, + errors: vec![], + annotations: None, + } + } + + fn map_config_option(constraints: Vec) -> ExtendedCommandBody { + let mut body = empty_body(); + body.options = vec![ExtendedOptionSpec { + long: "config".to_string(), + short: None, + aliases: vec![], + doc: doc(""), + value_name: None, + shape: ExtendedOptionShape::RepeatableMap(ExtendedRepeatableMapShape { + repetition: wire::Repetition::Repeated, + map_type: SchemaGraph::anonymous(SchemaType::map( + SchemaType::string(), + SchemaType::u32(), + )), + duplicate_key_policy: wire::DuplicateKeyPolicy::Reject, + }), + default: None, + required: false, + env_var: None, + }]; + body.constraints = constraints; + body + } + + #[test] + fn default_type_mismatch_is_rejected() { + let mut body = empty_body(); + body.positionals.fixed = vec![ExtendedPositional { + name: "count".to_string(), + doc: doc(""), + value_name: None, + type_: u32_graph(), + default: Some(SchemaValue::String("not-a-number".to_string())), + required: false, + accepts_stdio: false, + }]; + let err = leaf_tool_with_body(body).try_to_tool().unwrap_err(); + assert!(matches!(err, ToolBuildError::DefaultTypeMismatch(_))); + } + + #[test] + fn value_is_resolves_to_map_value_type() { + // A `value-is` over a repeatable-map names the map's value type (u32). + let ok = leaf_tool_with_body(map_config_option(vec![ExtendedConstraint::RequiresAll( + vec![ExtendedRef::ValueIs(ExtendedValueIsRef { + name: "config".to_string(), + value: SchemaValue::U32(1), + })], + )])); + assert!(ok.try_to_tool().is_ok()); + + let bad = leaf_tool_with_body(map_config_option(vec![ExtendedConstraint::RequiresAll( + vec![ExtendedRef::ValueIs(ExtendedValueIsRef { + name: "config".to_string(), + value: SchemaValue::String("x".to_string()), + })], + )])); + assert!(matches!( + bad.try_to_tool().unwrap_err(), + ToolBuildError::ValueIsTypeMismatch(_) + )); + } + + #[test] + fn unresolved_constraint_ref_is_rejected() { + let body = map_config_option(vec![ExtendedConstraint::RequiresAll(vec![ + ExtendedRef::Present("missing".to_string()), + ])]); + assert!(matches!( + leaf_tool_with_body(body).try_to_tool().unwrap_err(), + ToolBuildError::UnresolvedConstraintRef(_) + )); + } + + fn bare_node(name: &str, subcommands: Vec) -> ExtendedCommandNode { + ExtendedCommandNode { + name: name.into(), + aliases: vec![], + doc: doc(""), + globals: ExtendedGlobals::default(), + subcommands, + body: None, + } + } + + fn tool_with_nodes(nodes: Vec) -> ExtendedToolType { + ExtendedToolType { + version: "0.1.0".into(), + commands: nodes, + } + } + + fn scalar_opt(long: &str, short: Option) -> ExtendedOptionSpec { + ExtendedOptionSpec { + long: long.into(), + short, + aliases: vec![], + doc: doc(""), + value_name: None, + shape: ExtendedOptionShape::Scalar(str_graph()), + default: None, + required: false, + env_var: None, + } + } + + fn bool_flag(long: &str, short: Option) -> FlagSpec { + FlagSpec { + long: long.into(), + short, + aliases: vec![], + doc: doc(""), + shape: wire::FlagShape::BoolFlag(wire::BoolFlagShape { + default: false, + negatable: false, + }), + env_var: None, + } + } + + fn variant_graph() -> SchemaGraph { + // A single well-formed case so the graph passes well-formedness and the + // tool-specific "variant in input position" rule is what rejects it. + SchemaGraph::anonymous(SchemaType::Variant { + cases: vec![crate::schema::schema_type::VariantCaseType { + name: "case".into(), + payload: None, + metadata: Default::default(), + }], + metadata: Default::default(), + }) + } + + #[test] + fn empty_tree_is_rejected() { + assert!(matches!( + validate_tool(&tool_with_nodes(vec![])), + Err(ToolBuildError::EmptyCommandTree) + )); + } + + #[test] + fn out_of_bounds_subcommand_is_rejected() { + assert!(matches!( + validate_tool(&tool_with_nodes(vec![bare_node("root", vec![5])])), + Err(ToolBuildError::CommandIndexOutOfBounds { .. }) + )); + assert!(matches!( + validate_tool(&tool_with_nodes(vec![bare_node("root", vec![-1])])), + Err(ToolBuildError::CommandIndexOutOfBounds { .. }) + )); + } + + #[test] + fn cyclic_tree_is_rejected_without_panicking() { + let tool = tool_with_nodes(vec![ + bare_node("root", vec![1]), + bare_node("child", vec![0]), + ]); + assert!(matches!( + validate_tool(&tool), + Err(ToolBuildError::CommandTreeCycle(_)) + )); + // Helpers must not panic / infinitely recurse on the malformed tree. + assert!(render_help(&tool, &[]).is_ok()); + let _ = tool.effective_globals(1); + } + + #[test] + fn shared_subcommand_is_rejected() { + let tool = tool_with_nodes(vec![ + bare_node("root", vec![1, 2]), + bare_node("a", vec![3]), + bare_node("b", vec![3]), + bare_node("leaf", vec![]), + ]); + assert!(matches!( + validate_tool(&tool), + Err(ToolBuildError::DuplicateCommandParent(3)) + )); + } + + #[test] + fn unreachable_node_is_rejected() { + let tool = tool_with_nodes(vec![bare_node("root", vec![]), bare_node("orphan", vec![])]); + assert!(matches!( + validate_tool(&tool), + Err(ToolBuildError::UnreachableCommandNode(1)) + )); + } + + #[test] + fn invalid_identifier_is_rejected() { + assert!(matches!( + validate_tool(&tool_with_nodes(vec![bare_node("Root", vec![])])), + Err(ToolBuildError::InvalidIdentifier { .. }) + )); + } + + #[test] + fn body_name_colliding_with_inherited_global_is_rejected() { + let mut root = bare_node("root", vec![1]); + root.globals.options = vec![scalar_opt("shared", None)]; + let mut child = bare_node("child", vec![]); + let mut body = empty_body(); + body.options = vec![scalar_opt("shared", None)]; + child.body = Some(body); + assert!(matches!( + validate_tool(&tool_with_nodes(vec![root, child])), + Err(ToolBuildError::DuplicateName(_)) + )); + } + + #[test] + fn duplicate_short_form_is_rejected() { + let mut body = empty_body(); + body.options = vec![ + scalar_opt("alpha", Some('a')), + scalar_opt("beta", Some('a')), + ]; + assert!(matches!( + validate_tool(&leaf_tool_with_body(body)), + Err(ToolBuildError::DuplicateShort('a')) + )); + } + + #[test] + fn verbatim_tail_without_separator_is_rejected() { + let mut body = empty_body(); + body.positionals.tail = Some(ExtendedTailPositional { + name: "args".into(), + doc: doc(""), + value_name: None, + item_type: str_graph(), + min: 0, + max: None, + separator: None, + verbatim: true, + accepts_stdio: false, + }); + assert!(matches!( + validate_tool(&leaf_tool_with_body(body)), + Err(ToolBuildError::VerbatimWithoutSeparator(_)) + )); + } + + #[test] + fn variant_in_input_position_is_rejected() { + let mut body = empty_body(); + body.positionals.fixed = vec![ExtendedPositional { + name: "choice".into(), + doc: doc(""), + value_name: None, + type_: variant_graph(), + default: None, + required: true, + accepts_stdio: false, + }]; + assert!(matches!( + validate_tool(&leaf_tool_with_body(body)), + Err(ToolBuildError::VariantInInputPosition(_)) + )); + } + + #[test] + fn value_is_against_flag_is_rejected() { + let mut body = empty_body(); + body.flags = vec![bool_flag("force", None)]; + body.constraints = vec![ExtendedConstraint::RequiresAll(vec![ExtendedRef::ValueIs( + ExtendedValueIsRef { + name: "force".into(), + value: SchemaValue::Bool(true), + }, + )])]; + assert!(matches!( + validate_tool(&leaf_tool_with_body(body)), + Err(ToolBuildError::ValueIsTypeMismatch(_)) + )); + } + + #[test] + fn repeatable_map_with_non_map_type_is_rejected() { + let mut body = empty_body(); + body.options = vec![ExtendedOptionSpec { + long: "config".into(), + short: None, + aliases: vec![], + doc: doc(""), + value_name: None, + shape: ExtendedOptionShape::RepeatableMap(ExtendedRepeatableMapShape { + repetition: wire::Repetition::Repeated, + map_type: str_graph(), + duplicate_key_policy: wire::DuplicateKeyPolicy::Reject, + }), + default: None, + required: false, + env_var: None, + }]; + assert!(matches!( + validate_tool(&leaf_tool_with_body(body)), + Err(ToolBuildError::RepeatableMapTypeNotMap(_)) + )); + } + + fn ref_graph(id: &str) -> SchemaGraph { + SchemaGraph::anonymous(SchemaType::Ref { + id: id.into(), + metadata: Default::default(), + }) + } + + #[test] + fn dangling_type_ref_in_positional_is_rejected() { + let mut body = empty_body(); + body.positionals.fixed = vec![ExtendedPositional { + name: "thing".into(), + doc: doc(""), + value_name: None, + type_: ref_graph("missing-type"), + default: None, + required: true, + accepts_stdio: false, + }]; + assert!(matches!( + validate_tool(&leaf_tool_with_body(body)), + Err(ToolBuildError::UnresolvedTypeRef { id, .. }) if id == "missing-type" + )); + } + + #[test] + fn dangling_type_ref_in_option_is_rejected() { + let mut body = empty_body(); + body.options = vec![scalar_opt("name", None)]; + body.options[0].shape = ExtendedOptionShape::Scalar(ref_graph("nope")); + assert!(matches!( + validate_tool(&leaf_tool_with_body(body)), + Err(ToolBuildError::UnresolvedTypeRef { position, id }) + if position == "option --name" && id == "nope" + )); + } + + #[test] + fn dangling_type_ref_in_definition_body_is_rejected() { + // The root resolves, but a definition body references a missing id. + let graph = SchemaGraph { + defs: vec![crate::schema::SchemaTypeDef { + id: "rec".into(), + name: Some("rec".into()), + body: SchemaType::List { + element: Box::new(SchemaType::Ref { + id: "gone".into(), + metadata: Default::default(), + }), + metadata: Default::default(), + }, + }], + root: SchemaType::Ref { + id: "rec".into(), + metadata: Default::default(), + }, + }; + let mut body = empty_body(); + body.positionals.fixed = vec![ExtendedPositional { + name: "thing".into(), + doc: doc(""), + value_name: None, + type_: graph, + default: None, + required: true, + accepts_stdio: false, + }]; + assert!(matches!( + validate_tool(&leaf_tool_with_body(body)), + Err(ToolBuildError::UnresolvedTypeRef { id, .. }) if id == "gone" + )); + } + + #[test] + fn ill_formed_numeric_restriction_is_rejected() { + // A u32 positional whose inline restrictions are unsatisfiable + // (min > max) must be rejected at tool-build time by well-formedness. + let mut body = empty_body(); + body.positionals.fixed = vec![ExtendedPositional { + name: "count".into(), + doc: doc(""), + value_name: None, + type_: SchemaGraph::anonymous(SchemaType::U32 { + restrictions: Some(crate::schema::schema_type::NumericRestrictions { + min: Some(NumericBound::Unsigned(10)), + max: Some(NumericBound::Unsigned(1)), + unit: None, + }), + metadata: Default::default(), + }), + default: None, + required: true, + accepts_stdio: false, + }]; + assert!(matches!( + validate_tool(&leaf_tool_with_body(body)), + Err(ToolBuildError::IllFormedSchema { position, .. }) if position == "positional count" + )); + } + + #[test] + fn resolvable_type_ref_is_accepted() { + // A self-contained graph whose root Ref resolves within its own defs + // must pass the closedness check. + let graph = SchemaGraph { + defs: vec![crate::schema::SchemaTypeDef { + id: "rec".into(), + name: Some("rec".into()), + body: SchemaType::string(), + }], + root: SchemaType::Ref { + id: "rec".into(), + metadata: Default::default(), + }, + }; + let mut body = empty_body(); + body.positionals.fixed = vec![ExtendedPositional { + name: "thing".into(), + doc: doc(""), + value_name: None, + type_: graph, + default: None, + required: true, + accepts_stdio: false, + }]; + assert!(validate_tool(&leaf_tool_with_body(body)).is_ok()); + } + + #[test] + fn argument_help_finds_global_and_body_args() { + let tool = sample_tool(); + // `verbose` is a root global visible at the `run` subcommand. + let global = render_argument_help(&tool, &["run".to_string()], "verbose").unwrap(); + assert!(global.contains("--verbose")); + assert!(global.contains("global")); + // `config` is a body option on `run`. + let body = render_argument_help(&tool, &["run".to_string()], "config").unwrap(); + assert!(body.contains("--config")); + // Unknown argument is an error, not a panic. + assert!(matches!( + render_argument_help(&tool, &["run".to_string()], "nope"), + Err(ToolBuildError::CommandNotFound(_)) + )); + } +} diff --git a/sdks/rust/golem-rust/src/agentic/mod.rs b/sdks/rust/golem-rust/src/agentic/mod.rs index 69d83040f7..881544c9f2 100644 --- a/sdks/rust/golem-rust/src/agentic/mod.rs +++ b/sdks/rust/golem-rust/src/agentic/mod.rs @@ -20,10 +20,15 @@ pub use agent_registry::*; pub use async_utils::*; pub use errors::*; pub use extended_agent_type::*; +pub use extended_tool_type::*; pub use http::*; pub use multimodal::*; pub use resolved_agent::*; pub use schema::*; +pub use tool_refinement::*; +pub use tool_registry::{ + get_all_tools, get_extended_tool_by_name, get_tool_by_name, register_tool, +}; pub use unstructured_binary::*; pub use unstructured_text::*; pub use webhook::*; @@ -36,6 +41,7 @@ mod agent_registry; mod async_utils; mod errors; mod extended_agent_type; +mod extended_tool_type; mod http; mod multimodal; mod principal_serde; @@ -43,6 +49,8 @@ mod resolved_agent; mod schema; pub mod snapshot_auto; mod tool_impl; +mod tool_refinement; +mod tool_registry; mod unstructured_binary; mod unstructured_text; mod webhook; diff --git a/sdks/rust/golem-rust/src/agentic/tool_impl.rs b/sdks/rust/golem-rust/src/agentic/tool_impl.rs index 7766b62e85..da74929749 100644 --- a/sdks/rust/golem-rust/src/agentic/tool_impl.rs +++ b/sdks/rust/golem-rust/src/agentic/tool_impl.rs @@ -12,14 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Placeholder implementation of the `golem:tool/guest@0.1.0` export. -//! -//! Every agentic component exports `golem:tool/guest` alongside -//! `golem:agent/guest`, mirroring the agent guest surface. The tool runtime is -//! not implemented yet, so this component currently exposes no tools: discovery -//! returns an empty list and lookups/invocations report the tool as unknown. - use crate::agentic::agent_impl::Component; +use crate::agentic::tool_registry::{get_all_tools, get_tool_by_name}; use crate::golem_agentic::exports::golem::tool::guest::{ Guest, InvocationResult, Tool, ToolError, TypedSchemaValue, }; @@ -28,11 +22,11 @@ use crate::golem_agentic::wasi::io::streams::InputStream; impl Guest for Component { fn discover_tools() -> Result, ToolError> { - Ok(Vec::new()) + Ok(get_all_tools()) } fn get_tool(name: String) -> Result { - Err(ToolError::InvalidToolName(name)) + get_tool_by_name(&name).ok_or(ToolError::InvalidToolName(name)) } fn invoke( @@ -42,6 +36,7 @@ impl Guest for Component { _stdin: Option, _principal: Principal, ) -> Result { + // Tool invocation dispatch is not wired yet; metadata discovery is available. Err(ToolError::InvalidToolName(tool_name)) } } diff --git a/sdks/rust/golem-rust/src/agentic/tool_refinement.rs b/sdks/rust/golem-rust/src/agentic/tool_refinement.rs new file mode 100644 index 0000000000..ca17c9c9eb --- /dev/null +++ b/sdks/rust/golem-rust/src/agentic/tool_refinement.rs @@ -0,0 +1,161 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::schema::schema_type::NumericBound; +use crate::schema::{ + MetadataEnvelope, PathDirection, PathKind, PathSpec, SchemaType, TextRestrictions, + UrlRestrictions, +}; + +pub fn refine_text( + base: SchemaType, + regex: Option, + min_len: Option, + max_len: Option, +) -> SchemaType { + let metadata = base.metadata().clone(); + let mut restrictions = match base { + SchemaType::Text { restrictions, .. } => restrictions, + _ => TextRestrictions::default(), + }; + if regex.is_some() { + restrictions.regex = regex; + } + if min_len.is_some() { + restrictions.min_length = min_len; + } + if max_len.is_some() { + restrictions.max_length = max_len; + } + SchemaType::Text { + restrictions, + metadata, + } +} + +/// Applies path refinements to a `Path` schema type. `accepts-stdio` is not a +/// property of the schema type; it lives on the positional that carries the +/// path, so it is set on the command argument rather than here. +pub fn refine_path( + base: SchemaType, + direction: Option, + kind: Option, + mime: Option>, +) -> SchemaType { + let metadata = base.metadata().clone(); + let mut spec = match base { + SchemaType::Path { spec, .. } => spec, + _ => PathSpec { + direction: PathDirection::InOut, + kind: PathKind::Any, + allowed_mime_types: None, + allowed_extensions: None, + }, + }; + if let Some(direction) = direction { + spec.direction = direction; + } + if let Some(kind) = kind { + spec.kind = kind; + } + if mime.is_some() { + spec.allowed_mime_types = mime; + } + SchemaType::Path { spec, metadata } +} + +pub fn refine_url(base: SchemaType, schemes: Option>) -> SchemaType { + let metadata = base.metadata().clone(); + let mut restrictions = match base { + SchemaType::Url { restrictions, .. } => restrictions, + _ => UrlRestrictions::default(), + }; + if schemes.is_some() { + restrictions.allowed_schemes = schemes; + } + SchemaType::Url { + restrictions, + metadata, + } +} + +pub fn refine_numeric( + base: SchemaType, + min: Option, + max: Option, + unit: Option, +) -> SchemaType { + let metadata = base.metadata().clone(); + // Overlay only the specified fields onto any restrictions the base type + // already carries (consistent with `refine_text`/`refine_path`/`refine_url`), + // so refining one field never silently drops the others. + let mut restrictions = base.numeric_restrictions().cloned().unwrap_or_default(); + if min.is_some() { + restrictions.min = min; + } + if max.is_some() { + restrictions.max = max; + } + if unit.is_some() { + restrictions.unit = unit; + } + let restrictions = restrictions.normalize(); + match base { + SchemaType::S8 { .. } => SchemaType::S8 { + restrictions, + metadata, + }, + SchemaType::S16 { .. } => SchemaType::S16 { + restrictions, + metadata, + }, + SchemaType::S32 { .. } => SchemaType::S32 { + restrictions, + metadata, + }, + SchemaType::S64 { .. } => SchemaType::S64 { + restrictions, + metadata, + }, + SchemaType::U8 { .. } => SchemaType::U8 { + restrictions, + metadata, + }, + SchemaType::U16 { .. } => SchemaType::U16 { + restrictions, + metadata, + }, + SchemaType::U32 { .. } => SchemaType::U32 { + restrictions, + metadata, + }, + SchemaType::U64 { .. } => SchemaType::U64 { + restrictions, + metadata, + }, + SchemaType::F32 { .. } => SchemaType::F32 { + restrictions, + metadata, + }, + SchemaType::F64 { .. } => SchemaType::F64 { + restrictions, + metadata, + }, + other => other.with_metadata(metadata), + } +} + +pub fn empty_metadata() -> MetadataEnvelope { + MetadataEnvelope::default() +} diff --git a/sdks/rust/golem-rust/src/agentic/tool_registry.rs b/sdks/rust/golem-rust/src/agentic/tool_registry.rs new file mode 100644 index 0000000000..f688f9ef87 --- /dev/null +++ b/sdks/rust/golem-rust/src/agentic/tool_registry.rs @@ -0,0 +1,103 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::agentic::extended_tool_type::ExtendedToolType; +use crate::golem_agentic::exports::golem::tool::guest::Tool; +use std::cell::RefCell; +use std::collections::BTreeMap; + +#[derive(Default)] +pub struct State { + pub tools: RefCell, +} +#[derive(Default)] +pub struct Tools { + pub tools: BTreeMap, +} +static mut STATE: Option = None; + +#[allow(static_mut_refs)] +pub fn get_state() -> &'static State { + unsafe { + if STATE.is_none() { + STATE = Some(State::default()); + } + STATE.as_ref().unwrap() + } +} + +pub fn register_tool(tool: ExtendedToolType) { + tool.try_to_tool().expect("tool descriptor build failed"); + let name = tool.tool_name().to_string(); + let state = get_state(); + let mut tools = state.tools.borrow_mut(); + if tools.tools.contains_key(&name) { + panic!("duplicate tool registration for tool name: {name}"); + } + tools.tools.insert(name, tool); +} + +pub fn get_all_tools() -> Vec { + get_state() + .tools + .borrow() + .tools + .values() + .map(|t| t.to_tool()) + .collect() +} +pub fn get_tool_by_name(name: &str) -> Option { + get_extended_tool_by_name(name).map(|t| t.to_tool()) +} +pub fn get_extended_tool_by_name(name: &str) -> Option { + get_state().tools.borrow().tools.get(name).cloned() +} + +#[cfg(test)] +pub(crate) fn clear_tools_for_tests() { + get_state().tools.borrow_mut().tools.clear(); +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::agentic::{Doc, ExtendedCommandNode, ExtendedGlobals, ExtendedToolType}; + use test_r::test; + + fn tool(name: &str) -> ExtendedToolType { + ExtendedToolType { + version: "0.1.0".into(), + commands: vec![ExtendedCommandNode { + name: name.into(), + aliases: vec![], + doc: Doc { + summary: String::new(), + description: String::new(), + examples: vec![], + }, + globals: ExtendedGlobals::default(), + subcommands: vec![], + body: None, + }], + } + } + + #[test] + #[should_panic] + fn duplicate_registration_panics() { + clear_tools_for_tests(); + register_tool(tool("dupe")); + register_tool(tool("dupe")); + } +} diff --git a/sdks/rust/golem-rust/tests/agent.rs b/sdks/rust/golem-rust/tests/agent.rs index c0411f638c..c6f64629db 100644 --- a/sdks/rust/golem-rust/tests/agent.rs +++ b/sdks/rust/golem-rust/tests/agent.rs @@ -1488,7 +1488,7 @@ mod tests { ( AgentConfigSource::Local, vec!["port".to_string()], - "SchemaTypeBody::U32Type".to_string() + "SchemaTypeBody::U32Type(None)".to_string() ), ( AgentConfigSource::Local, @@ -1498,7 +1498,7 @@ mod tests { ( AgentConfigSource::Local, vec!["nested".to_string(), "bar".to_string(),], - "SchemaTypeBody::S32Type".to_string() + "SchemaTypeBody::S32Type(None)".to_string() ), ( AgentConfigSource::Secret, diff --git a/sdks/rust/golem-rust/wit/deps/golem-core-v2/golem-core-v2.wit b/sdks/rust/golem-rust/wit/deps/golem-core-v2/golem-core-v2.wit index 950c5c843b..c2a4bd4b4d 100644 --- a/sdks/rust/golem-rust/wit/deps/golem-core-v2/golem-core-v2.wit +++ b/sdks/rust/golem-rust/wit/deps/golem-core-v2/golem-core-v2.wit @@ -221,16 +221,16 @@ interface types { // --- Primitives --- bool-type, - s8-type, - s16-type, - s32-type, - s64-type, - u8-type, - u16-type, - u32-type, - u64-type, - f32-type, - f64-type, + s8-type(option), + s16-type(option), + s32-type(option), + s64-type(option), + u8-type(option), + u16-type(option), + u32-type(option), + u64-type(option), + f32-type(option), + f64-type(option), char-type, string-type, @@ -296,6 +296,27 @@ interface types { err: option, } + // --- Numeric restrictions --- + + /// A numeric bound usable across every numeric representation. Float bounds + /// carry canonical IEEE-754 `f64` bits (NaN/inf rejected, -0.0 normalized); + /// comparisons decode the bits to `f64` and compare numerically. + variant numeric-bound { + signed(s64), + unsigned(u64), + float-bits(u64), + } + + /// Inline numeric refinement. `none` on a numeric type means unconstrained + /// (the common case). The empty restriction set is never encoded as `some`: + /// producers normalize it to `none`, decoders normalize a decoded empty to + /// `none`. `unit` is schema/help metadata only. + record numeric-restrictions { + min: option, + max: option, + unit: option, + } + // --- Text / Binary restrictions --- record text-restrictions { diff --git a/sdks/rust/golem-rust/wit/deps/golem-tool/common.wit b/sdks/rust/golem-rust/wit/deps/golem-tool/common.wit index 2d28cd96df..f28d894d44 100644 --- a/sdks/rust/golem-rust/wit/deps/golem-tool/common.wit +++ b/sdks/rust/golem-rust/wit/deps/golem-tool/common.wit @@ -57,11 +57,15 @@ package golem:tool@0.1.0; /// no items, is valid). /// • A `positional` / `option` / `result` / `error` `type-node-index` /// resolves to a node in `tool.schema`. -/// • A `repeatable` option's `default`, if present, is a list whose -/// elements are values of the `repeatable-shape.%type` node. -/// • A `value-is` ref naming a repeatable option, tail positional, or -/// otherwise list-shaped target means "any occurrence / element -/// equals this literal"; the literal is a value of the element type. +/// • A `repeatable-list` option's `default`, if present, is a `list` +/// whose elements are values of the `repeatable-list-shape.item-type` +/// node. A `repeatable-map` option's `default`, if present, is a `map` +/// value of the `repeatable-map-shape.map-type` node. +/// • A `value-is` ref naming a `repeatable-list` option, tail positional, +/// or otherwise list-shaped target means "any occurrence / element +/// equals this literal"; the literal is a value of the element type. For +/// a `repeatable-map` option the literal is a value of the map's value +/// type (any entry's value equals this literal). /// • The tool's identity is its root command name /// (`commands.nodes[0].name`); `get-tool(name)` and /// `guest.invoke(tool-name, …)` match against it. `commands.nodes` @@ -160,6 +164,9 @@ interface common { /// Default value, interpreted against `%type` in `tool.schema`. default: option, required: bool, + /// If true, the positional's value may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } record tail-positional { @@ -175,6 +182,9 @@ interface common { /// If true, tokens after `separator` are not flag-parsed (for /// `kubectl exec -- CMD ARGS...`). verbatim: bool, + /// If true, the tail items may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } // Options and flags @@ -199,14 +209,35 @@ interface common { /// (--decorate, --signed[=mode], --force-with-lease[=ref]). Index into /// `tool.schema`. optional-scalar(type-node-index), - /// Repeatable; value type in the derived signature is list-of-scalar. - repeatable(repeatable-shape), + /// Repeatable scalar option (`-e a -e b`); the collected value is a + /// `list` of the element type. + repeatable-list(repeatable-list-shape), + /// Repeatable key-value option (`-c a=1 -c b=2`); the collected value is a + /// `golem:core` `map` node, never a `list`. + repeatable-map(repeatable-map-shape), } - record repeatable-shape { + record repeatable-list-shape { repetition: repetition, - /// Index into `tool.schema`. - %type: type-node-index, + /// Index into `tool.schema`; the element type of the collected `list`. + item-type: type-node-index, + } + + record repeatable-map-shape { + repetition: repetition, + /// Index into `tool.schema`; a `golem:core` `map` (key + value) node. The + /// collected value is this map. + map-type: type-node-index, + /// What happens when the same key is supplied more than once. + duplicate-key-policy: duplicate-key-policy, + } + + /// Resolution policy for a repeated key in a `repeatable-map` option. + enum duplicate-key-policy { + /// A repeated key is a usage error. + reject, + /// A repeated key takes the last supplied value. + last-wins, } variant repetition { diff --git a/sdks/scala/wit/deps/golem-core-v2/golem-core-v2.wit b/sdks/scala/wit/deps/golem-core-v2/golem-core-v2.wit index 950c5c843b..c2a4bd4b4d 100644 --- a/sdks/scala/wit/deps/golem-core-v2/golem-core-v2.wit +++ b/sdks/scala/wit/deps/golem-core-v2/golem-core-v2.wit @@ -221,16 +221,16 @@ interface types { // --- Primitives --- bool-type, - s8-type, - s16-type, - s32-type, - s64-type, - u8-type, - u16-type, - u32-type, - u64-type, - f32-type, - f64-type, + s8-type(option), + s16-type(option), + s32-type(option), + s64-type(option), + u8-type(option), + u16-type(option), + u32-type(option), + u64-type(option), + f32-type(option), + f64-type(option), char-type, string-type, @@ -296,6 +296,27 @@ interface types { err: option, } + // --- Numeric restrictions --- + + /// A numeric bound usable across every numeric representation. Float bounds + /// carry canonical IEEE-754 `f64` bits (NaN/inf rejected, -0.0 normalized); + /// comparisons decode the bits to `f64` and compare numerically. + variant numeric-bound { + signed(s64), + unsigned(u64), + float-bits(u64), + } + + /// Inline numeric refinement. `none` on a numeric type means unconstrained + /// (the common case). The empty restriction set is never encoded as `some`: + /// producers normalize it to `none`, decoders normalize a decoded empty to + /// `none`. `unit` is schema/help metadata only. + record numeric-restrictions { + min: option, + max: option, + unit: option, + } + // --- Text / Binary restrictions --- record text-restrictions { diff --git a/sdks/scala/wit/deps/golem-tool/common.wit b/sdks/scala/wit/deps/golem-tool/common.wit index 2d28cd96df..f28d894d44 100644 --- a/sdks/scala/wit/deps/golem-tool/common.wit +++ b/sdks/scala/wit/deps/golem-tool/common.wit @@ -57,11 +57,15 @@ package golem:tool@0.1.0; /// no items, is valid). /// • A `positional` / `option` / `result` / `error` `type-node-index` /// resolves to a node in `tool.schema`. -/// • A `repeatable` option's `default`, if present, is a list whose -/// elements are values of the `repeatable-shape.%type` node. -/// • A `value-is` ref naming a repeatable option, tail positional, or -/// otherwise list-shaped target means "any occurrence / element -/// equals this literal"; the literal is a value of the element type. +/// • A `repeatable-list` option's `default`, if present, is a `list` +/// whose elements are values of the `repeatable-list-shape.item-type` +/// node. A `repeatable-map` option's `default`, if present, is a `map` +/// value of the `repeatable-map-shape.map-type` node. +/// • A `value-is` ref naming a `repeatable-list` option, tail positional, +/// or otherwise list-shaped target means "any occurrence / element +/// equals this literal"; the literal is a value of the element type. For +/// a `repeatable-map` option the literal is a value of the map's value +/// type (any entry's value equals this literal). /// • The tool's identity is its root command name /// (`commands.nodes[0].name`); `get-tool(name)` and /// `guest.invoke(tool-name, …)` match against it. `commands.nodes` @@ -160,6 +164,9 @@ interface common { /// Default value, interpreted against `%type` in `tool.schema`. default: option, required: bool, + /// If true, the positional's value may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } record tail-positional { @@ -175,6 +182,9 @@ interface common { /// If true, tokens after `separator` are not flag-parsed (for /// `kubectl exec -- CMD ARGS...`). verbatim: bool, + /// If true, the tail items may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } // Options and flags @@ -199,14 +209,35 @@ interface common { /// (--decorate, --signed[=mode], --force-with-lease[=ref]). Index into /// `tool.schema`. optional-scalar(type-node-index), - /// Repeatable; value type in the derived signature is list-of-scalar. - repeatable(repeatable-shape), + /// Repeatable scalar option (`-e a -e b`); the collected value is a + /// `list` of the element type. + repeatable-list(repeatable-list-shape), + /// Repeatable key-value option (`-c a=1 -c b=2`); the collected value is a + /// `golem:core` `map` node, never a `list`. + repeatable-map(repeatable-map-shape), } - record repeatable-shape { + record repeatable-list-shape { repetition: repetition, - /// Index into `tool.schema`. - %type: type-node-index, + /// Index into `tool.schema`; the element type of the collected `list`. + item-type: type-node-index, + } + + record repeatable-map-shape { + repetition: repetition, + /// Index into `tool.schema`; a `golem:core` `map` (key + value) node. The + /// collected value is this map. + map-type: type-node-index, + /// What happens when the same key is supplied more than once. + duplicate-key-policy: duplicate-key-policy, + } + + /// Resolution policy for a repeated key in a `repeatable-map` option. + enum duplicate-key-policy { + /// A repeated key is a usage error. + reject, + /// A repeated key takes the last supplied value. + last-wins, } variant repetition { diff --git a/sdks/ts/wit/deps/golem-core-v2/golem-core-v2.wit b/sdks/ts/wit/deps/golem-core-v2/golem-core-v2.wit index 950c5c843b..c2a4bd4b4d 100644 --- a/sdks/ts/wit/deps/golem-core-v2/golem-core-v2.wit +++ b/sdks/ts/wit/deps/golem-core-v2/golem-core-v2.wit @@ -221,16 +221,16 @@ interface types { // --- Primitives --- bool-type, - s8-type, - s16-type, - s32-type, - s64-type, - u8-type, - u16-type, - u32-type, - u64-type, - f32-type, - f64-type, + s8-type(option), + s16-type(option), + s32-type(option), + s64-type(option), + u8-type(option), + u16-type(option), + u32-type(option), + u64-type(option), + f32-type(option), + f64-type(option), char-type, string-type, @@ -296,6 +296,27 @@ interface types { err: option, } + // --- Numeric restrictions --- + + /// A numeric bound usable across every numeric representation. Float bounds + /// carry canonical IEEE-754 `f64` bits (NaN/inf rejected, -0.0 normalized); + /// comparisons decode the bits to `f64` and compare numerically. + variant numeric-bound { + signed(s64), + unsigned(u64), + float-bits(u64), + } + + /// Inline numeric refinement. `none` on a numeric type means unconstrained + /// (the common case). The empty restriction set is never encoded as `some`: + /// producers normalize it to `none`, decoders normalize a decoded empty to + /// `none`. `unit` is schema/help metadata only. + record numeric-restrictions { + min: option, + max: option, + unit: option, + } + // --- Text / Binary restrictions --- record text-restrictions { diff --git a/sdks/ts/wit/deps/golem-tool/common.wit b/sdks/ts/wit/deps/golem-tool/common.wit index 2d28cd96df..f28d894d44 100644 --- a/sdks/ts/wit/deps/golem-tool/common.wit +++ b/sdks/ts/wit/deps/golem-tool/common.wit @@ -57,11 +57,15 @@ package golem:tool@0.1.0; /// no items, is valid). /// • A `positional` / `option` / `result` / `error` `type-node-index` /// resolves to a node in `tool.schema`. -/// • A `repeatable` option's `default`, if present, is a list whose -/// elements are values of the `repeatable-shape.%type` node. -/// • A `value-is` ref naming a repeatable option, tail positional, or -/// otherwise list-shaped target means "any occurrence / element -/// equals this literal"; the literal is a value of the element type. +/// • A `repeatable-list` option's `default`, if present, is a `list` +/// whose elements are values of the `repeatable-list-shape.item-type` +/// node. A `repeatable-map` option's `default`, if present, is a `map` +/// value of the `repeatable-map-shape.map-type` node. +/// • A `value-is` ref naming a `repeatable-list` option, tail positional, +/// or otherwise list-shaped target means "any occurrence / element +/// equals this literal"; the literal is a value of the element type. For +/// a `repeatable-map` option the literal is a value of the map's value +/// type (any entry's value equals this literal). /// • The tool's identity is its root command name /// (`commands.nodes[0].name`); `get-tool(name)` and /// `guest.invoke(tool-name, …)` match against it. `commands.nodes` @@ -160,6 +164,9 @@ interface common { /// Default value, interpreted against `%type` in `tool.schema`. default: option, required: bool, + /// If true, the positional's value may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } record tail-positional { @@ -175,6 +182,9 @@ interface common { /// If true, tokens after `separator` are not flag-parsed (for /// `kubectl exec -- CMD ARGS...`). verbatim: bool, + /// If true, the tail items may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } // Options and flags @@ -199,14 +209,35 @@ interface common { /// (--decorate, --signed[=mode], --force-with-lease[=ref]). Index into /// `tool.schema`. optional-scalar(type-node-index), - /// Repeatable; value type in the derived signature is list-of-scalar. - repeatable(repeatable-shape), + /// Repeatable scalar option (`-e a -e b`); the collected value is a + /// `list` of the element type. + repeatable-list(repeatable-list-shape), + /// Repeatable key-value option (`-c a=1 -c b=2`); the collected value is a + /// `golem:core` `map` node, never a `list`. + repeatable-map(repeatable-map-shape), } - record repeatable-shape { + record repeatable-list-shape { repetition: repetition, - /// Index into `tool.schema`. - %type: type-node-index, + /// Index into `tool.schema`; the element type of the collected `list`. + item-type: type-node-index, + } + + record repeatable-map-shape { + repetition: repetition, + /// Index into `tool.schema`; a `golem:core` `map` (key + value) node. The + /// collected value is this map. + map-type: type-node-index, + /// What happens when the same key is supplied more than once. + duplicate-key-policy: duplicate-key-policy, + } + + /// Resolution policy for a repeated key in a `repeatable-map` option. + enum duplicate-key-policy { + /// A repeated key is a usage error. + reject, + /// A repeated key takes the last supplied value. + last-wins, } variant repetition { diff --git a/wit/deps/golem-core-v2/golem-core-v2.wit b/wit/deps/golem-core-v2/golem-core-v2.wit index 950c5c843b..c2a4bd4b4d 100644 --- a/wit/deps/golem-core-v2/golem-core-v2.wit +++ b/wit/deps/golem-core-v2/golem-core-v2.wit @@ -221,16 +221,16 @@ interface types { // --- Primitives --- bool-type, - s8-type, - s16-type, - s32-type, - s64-type, - u8-type, - u16-type, - u32-type, - u64-type, - f32-type, - f64-type, + s8-type(option), + s16-type(option), + s32-type(option), + s64-type(option), + u8-type(option), + u16-type(option), + u32-type(option), + u64-type(option), + f32-type(option), + f64-type(option), char-type, string-type, @@ -296,6 +296,27 @@ interface types { err: option, } + // --- Numeric restrictions --- + + /// A numeric bound usable across every numeric representation. Float bounds + /// carry canonical IEEE-754 `f64` bits (NaN/inf rejected, -0.0 normalized); + /// comparisons decode the bits to `f64` and compare numerically. + variant numeric-bound { + signed(s64), + unsigned(u64), + float-bits(u64), + } + + /// Inline numeric refinement. `none` on a numeric type means unconstrained + /// (the common case). The empty restriction set is never encoded as `some`: + /// producers normalize it to `none`, decoders normalize a decoded empty to + /// `none`. `unit` is schema/help metadata only. + record numeric-restrictions { + min: option, + max: option, + unit: option, + } + // --- Text / Binary restrictions --- record text-restrictions { diff --git a/wit/deps/golem-tool/common.wit b/wit/deps/golem-tool/common.wit index 2d28cd96df..f28d894d44 100644 --- a/wit/deps/golem-tool/common.wit +++ b/wit/deps/golem-tool/common.wit @@ -57,11 +57,15 @@ package golem:tool@0.1.0; /// no items, is valid). /// • A `positional` / `option` / `result` / `error` `type-node-index` /// resolves to a node in `tool.schema`. -/// • A `repeatable` option's `default`, if present, is a list whose -/// elements are values of the `repeatable-shape.%type` node. -/// • A `value-is` ref naming a repeatable option, tail positional, or -/// otherwise list-shaped target means "any occurrence / element -/// equals this literal"; the literal is a value of the element type. +/// • A `repeatable-list` option's `default`, if present, is a `list` +/// whose elements are values of the `repeatable-list-shape.item-type` +/// node. A `repeatable-map` option's `default`, if present, is a `map` +/// value of the `repeatable-map-shape.map-type` node. +/// • A `value-is` ref naming a `repeatable-list` option, tail positional, +/// or otherwise list-shaped target means "any occurrence / element +/// equals this literal"; the literal is a value of the element type. For +/// a `repeatable-map` option the literal is a value of the map's value +/// type (any entry's value equals this literal). /// • The tool's identity is its root command name /// (`commands.nodes[0].name`); `get-tool(name)` and /// `guest.invoke(tool-name, …)` match against it. `commands.nodes` @@ -160,6 +164,9 @@ interface common { /// Default value, interpreted against `%type` in `tool.schema`. default: option, required: bool, + /// If true, the positional's value may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } record tail-positional { @@ -175,6 +182,9 @@ interface common { /// If true, tokens after `separator` are not flag-parsed (for /// `kubectl exec -- CMD ARGS...`). verbatim: bool, + /// If true, the tail items may be read from standard input + /// (e.g. grep's trailing `files` accepting piped input). + accepts-stdio: bool, } // Options and flags @@ -199,14 +209,35 @@ interface common { /// (--decorate, --signed[=mode], --force-with-lease[=ref]). Index into /// `tool.schema`. optional-scalar(type-node-index), - /// Repeatable; value type in the derived signature is list-of-scalar. - repeatable(repeatable-shape), + /// Repeatable scalar option (`-e a -e b`); the collected value is a + /// `list` of the element type. + repeatable-list(repeatable-list-shape), + /// Repeatable key-value option (`-c a=1 -c b=2`); the collected value is a + /// `golem:core` `map` node, never a `list`. + repeatable-map(repeatable-map-shape), } - record repeatable-shape { + record repeatable-list-shape { repetition: repetition, - /// Index into `tool.schema`. - %type: type-node-index, + /// Index into `tool.schema`; the element type of the collected `list`. + item-type: type-node-index, + } + + record repeatable-map-shape { + repetition: repetition, + /// Index into `tool.schema`; a `golem:core` `map` (key + value) node. The + /// collected value is this map. + map-type: type-node-index, + /// What happens when the same key is supplied more than once. + duplicate-key-policy: duplicate-key-policy, + } + + /// Resolution policy for a repeated key in a `repeatable-map` option. + enum duplicate-key-policy { + /// A repeated key is a usage error. + reject, + /// A repeated key takes the last supplied value. + last-wins, } variant repetition { From 25b3e8628330b1a8185b9ef8a9fe64afbd24aa73 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Fri, 26 Jun 2026 18:13:25 +0200 Subject: [PATCH 02/11] phase 3 --- .../tests/well_formedness_tests.txt | 7 + sdks/rust/golem-rust-macro/src/lib.rs | 51 ++ sdks/rust/golem-rust-macro/src/tool/arg.rs | 419 ++++++++++ .../rust/golem-rust-macro/src/tool/command.rs | 247 ++++++ .../golem-rust-macro/src/tool/constraint.rs | 411 ++++++++++ .../golem-rust-macro/src/tool/definition.rs | 529 +++++++++++++ sdks/rust/golem-rust-macro/src/tool/doc.rs | 212 +++++ .../rust/golem-rust-macro/src/tool/helpers.rs | 218 ++++++ .../src/tool/implementation.rs | 39 + sdks/rust/golem-rust-macro/src/tool/ir.rs | 319 ++++++++ sdks/rust/golem-rust-macro/src/tool/mod.rs | 32 + sdks/rust/golem-rust-macro/src/tool/result.rs | 98 +++ .../golem-rust-macro/src/tool/synthesis.rs | 67 ++ .../golem-rust-macro/src/tool/tool_error.rs | 475 ++++++++++++ .../src/agentic/extended_tool_type.rs | 6 + sdks/rust/golem-rust/src/agentic/mod.rs | 2 + .../golem-rust/src/agentic/tool_literal.rs | 317 ++++++++ tool-rust-1.md | 734 ++++++++++++++++++ 18 files changed, 4183 insertions(+) create mode 100644 golem-common/proptest-regressions/schema/validation/tests/well_formedness_tests.txt create mode 100644 sdks/rust/golem-rust-macro/src/tool/arg.rs create mode 100644 sdks/rust/golem-rust-macro/src/tool/command.rs create mode 100644 sdks/rust/golem-rust-macro/src/tool/constraint.rs create mode 100644 sdks/rust/golem-rust-macro/src/tool/definition.rs create mode 100644 sdks/rust/golem-rust-macro/src/tool/doc.rs create mode 100644 sdks/rust/golem-rust-macro/src/tool/helpers.rs create mode 100644 sdks/rust/golem-rust-macro/src/tool/implementation.rs create mode 100644 sdks/rust/golem-rust-macro/src/tool/ir.rs create mode 100644 sdks/rust/golem-rust-macro/src/tool/mod.rs create mode 100644 sdks/rust/golem-rust-macro/src/tool/result.rs create mode 100644 sdks/rust/golem-rust-macro/src/tool/synthesis.rs create mode 100644 sdks/rust/golem-rust-macro/src/tool/tool_error.rs create mode 100644 sdks/rust/golem-rust/src/agentic/tool_literal.rs create mode 100644 tool-rust-1.md diff --git a/golem-common/proptest-regressions/schema/validation/tests/well_formedness_tests.txt b/golem-common/proptest-regressions/schema/validation/tests/well_formedness_tests.txt new file mode 100644 index 0000000000..f3eea281ee --- /dev/null +++ b/golem-common/proptest-regressions/schema/validation/tests/well_formedness_tests.txt @@ -0,0 +1,7 @@ +# Seeds for failure cases proptest has generated in the past. It is +# automatically read and these particular cases re-run before any +# novel cases are generated. +# +# It is recommended to check this file in to source control so that +# everyone who runs the test benefits from these saved cases. +cc f50bcde5b15dfd67fff05f76fbdb37e9d3e34973219c35076e2d8a1cd6a27a27 # shrinks to graph = SchemaGraph { defs: [SchemaTypeDef { id: TypeId("bt_7"), name: None, body: Ref { id: TypeId("bt_7"), metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } } }, SchemaTypeDef { id: TypeId("igi_"), name: None, body: Bool { metadata: MetadataEnvelope { doc: None, aliases: ["p", "bmjq5"], examples: ["^i*U?F2V:", ">+sN'!$"], deprecated: Some(">q,:&YazVQO\\"), role: Some(Multimodal) } } }, SchemaTypeDef { id: TypeId("e__"), name: Some("gdk_4"), body: Option { inner: Map { key: String { metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }, value: Quantity { spec: QuantitySpec { base_unit: "a", allowed_suffixes: [], min: Some(QuantityValue { mantissa: -1354897389968930, scale: -9, unit: "a" }), max: None }, metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }, metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }, metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } } }], root: Map { key: String { metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }, value: Stream { inner: Some(Path { spec: PathSpec { direction: InOut, kind: Any, allowed_mime_types: Some(["y4", "y"]), allowed_extensions: Some(["y_q9__", "v_3_0_"]) }, metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }), metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }, metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } } } diff --git a/sdks/rust/golem-rust-macro/src/lib.rs b/sdks/rust/golem-rust-macro/src/lib.rs index 76cd254527..42fb54c609 100644 --- a/sdks/rust/golem-rust-macro/src/lib.rs +++ b/sdks/rust/golem-rust-macro/src/lib.rs @@ -19,6 +19,7 @@ use proc_macro2::Span; use crate::transaction::golem_operation_impl; mod agentic; +mod tool; mod transaction; #[proc_macro_derive(MultimodalSchema)] @@ -83,6 +84,56 @@ pub fn agent_implementation(attr: TokenStream, item: TokenStream) -> TokenStream agentic::agent_implementation_impl(attr, item) } +#[proc_macro_attribute] +pub fn tool_definition(attr: TokenStream, item: TokenStream) -> TokenStream { + tool::tool_definition_impl(attr, item) +} + +#[proc_macro_attribute] +pub fn tool_implementation(attr: TokenStream, item: TokenStream) -> TokenStream { + tool::tool_implementation_impl(attr, item) +} + +#[proc_macro_derive(ToolError, attributes(tool_error, example))] +pub fn derive_tool_error(input: TokenStream) -> TokenStream { + tool::derive_tool_error_impl(input) +} + +// Helper attributes consumed by `#[tool_definition]`. A correct use sits on a +// method inside a `#[tool_definition]` trait, where the outer macro strips it +// before it ever reaches the compiler. Registering them as real proc-macro +// attributes keeps them recognized in any position; if one is ever actually +// expanded it means it was misplaced (outside a tool trait, or ordered before +// `#[tool_definition]`), so it fails loudly instead of being silently ignored. +fn misplaced_tool_helper_attr(name: &str) -> TokenStream { + syn::Error::new( + Span::call_site(), + format!("#[{name}] may only be used on methods inside a #[tool_definition] trait"), + ) + .to_compile_error() + .into() +} + +#[proc_macro_attribute] +pub fn arg(_attr: TokenStream, _item: TokenStream) -> TokenStream { + misplaced_tool_helper_attr("arg") +} + +#[proc_macro_attribute] +pub fn command(_attr: TokenStream, _item: TokenStream) -> TokenStream { + misplaced_tool_helper_attr("command") +} + +#[proc_macro_attribute] +pub fn constraint(_attr: TokenStream, _item: TokenStream) -> TokenStream { + misplaced_tool_helper_attr("constraint") +} + +#[proc_macro_attribute] +pub fn result(_attr: TokenStream, _item: TokenStream) -> TokenStream { + misplaced_tool_helper_attr("result") +} + // get the identifier of golem_rust crate to use for referencing the `golem-rust` crate // within the macros. This handles the case where the crate is renamed in Cargo.toml // or when the macro is used within the `golem-rust` crate itself. diff --git a/sdks/rust/golem-rust-macro/src/tool/arg.rs b/sdks/rust/golem-rust-macro/src/tool/arg.rs new file mode 100644 index 0000000000..f96a9918c1 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/arg.rs @@ -0,0 +1,419 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Parser for the `#[arg(...)]` helper attribute. + +use crate::tool::helpers::{ + SeenKeys, expr_bool, expr_char, expr_str, expr_str_array, expr_u32, parse_attr_exprs, + require_metadata_literal, +}; +use crate::tool::ir::{ + ArgIr, ArgPlacement, ArgSubKind, PathDirectionIr, PathKindIr, RepeatableMode, +}; +use syn::spanned::Spanned; +use syn::{Attribute, Error, Expr}; + +/// Parses a single `#[arg(...)]` attribute into an [`ArgIr`]. +pub fn parse_arg(attr: &Attribute) -> Result { + let exprs = parse_attr_exprs(attr)?; + let mut iter = exprs.iter(); + + let head = iter.next().ok_or_else(|| { + Error::new( + attr.span(), + "#[arg(...)] must start with a parameter name, e.g. `#[arg(name = \"positional\")]`", + ) + })?; + let (param, placement) = parse_head(head)?; + let mut ir = ArgIr::new(param); + ir.placement = placement; + + // Only the boolean options have a bare form (`verbatim` == `verbatim = true`); + // every other key requires `key = value`. + const BARE_OK: [&str; 5] = [ + "required", + "negatable", + "optional_scalar", + "verbatim", + "accepts_stdio", + ]; + let mut seen = SeenKeys::default(); + for expr in iter { + let (key, value, is_bare) = split_key_value(expr)?; + seen.insert(&key)?; + let key_str = key.to_string(); + if is_bare && !BARE_OK.contains(&key_str.as_str()) { + return Err(Error::new( + key.span(), + format!( + "`{key_str}` does not take a bare form; expected `key = value` in #[arg(...)]" + ), + )); + } + match key_str.as_str() { + "kind" => apply_kind(&mut ir, value)?, + "short" => ir.short = Some(expr_char(value, "short")?), + "aliases" => ir.aliases = expr_str_array(value, "aliases")?, + "env" => ir.env = Some(expr_str(value, "env")?), + "required" => ir.required = Some(value_bool(value, is_bare, "required")?), + "negatable" => ir.negatable = Some(value_bool(value, is_bare, "negatable")?), + "optional_scalar" => { + ir.optional_scalar = value_bool(value, is_bare, "optional_scalar")? + } + "repeatable" => ir.repeatable = Some(parse_repeatable(value)?), + "delim" => ir.delim = Some(expr_char(value, "delim")?), + "default" => { + require_metadata_literal(value, "default")?; + ir.default = Some(value.clone()); + } + "separator" => ir.separator = Some(expr_str(value, "separator")?), + "verbatim" => ir.verbatim = value_bool(value, is_bare, "verbatim")?, + "accepts_stdio" => ir.accepts_stdio = value_bool(value, is_bare, "accepts_stdio")?, + "regex" => ir.regex = Some(expr_str(value, "regex")?), + "min_length" => ir.min_length = Some(expr_u32(value, "min_length")?), + "max_length" => ir.max_length = Some(expr_u32(value, "max_length")?), + "direction" => ir.direction = Some(parse_direction(value)?), + "mime" => ir.mime = Some(expr_str_array(value, "mime")?), + "schemes" => ir.schemes = Some(expr_str_array(value, "schemes")?), + "unit" => ir.unit = Some(expr_str(value, "unit")?), + "bounds" => ir.bounds = Some(parse_bounds(value)?), + "doc" => ir.doc = Some(expr_str(value, "doc")?), + "value_name" => ir.value_name = Some(expr_str(value, "value_name")?), + // `min`/`max` are kept raw; their meaning (tail occurrence count, + // count-flag max, or numeric bound) depends on the final placement + // and sub-kind, which metadata synthesis resolves (placement may be inferred + // from the parameter type). + "min" => ir.raw_min = Some(value.clone()), + "max" => ir.raw_max = Some(value.clone()), + other => { + return Err(Error::new( + key.span(), + format!("unknown #[arg] key `{other}`"), + )); + } + } + } + + Ok(ir) +} + +/// Parses the leading entry: either a bare `param` or `param = ""`. +fn parse_head(expr: &Expr) -> Result<(syn::Ident, Option), Error> { + match expr { + Expr::Path(p) => { + let ident = p.path.get_ident().cloned().ok_or_else(|| { + Error::new( + p.span(), + "expected a parameter name as the first #[arg] entry", + ) + })?; + Ok((ident, None)) + } + Expr::Assign(assign) => { + let ident = assign_left_ident(&assign.left)?; + let placement = + parse_placement(&expr_str(&assign.right, "placement")?, assign.right.span())?; + Ok((ident, Some(placement))) + } + other => Err(Error::new( + other.span(), + "the first #[arg] entry must be `` or ` = \"\"`", + )), + } +} + +fn parse_placement(value: &str, span: proc_macro2::Span) -> Result { + match value { + "global" => Ok(ArgPlacement::Global), + "positional" => Ok(ArgPlacement::Positional), + "option" => Ok(ArgPlacement::Option), + "flag" => Ok(ArgPlacement::Flag), + "tail" => Ok(ArgPlacement::Tail), + other => Err(Error::new( + span, + format!( + "invalid arg placement `{other}`; expected one of: global, positional, option, flag, tail" + ), + )), + } +} + +fn apply_kind(ir: &mut ArgIr, value: &Expr) -> Result<(), Error> { + let s = expr_str(value, "kind")?; + match s.as_str() { + "flag" => ir.sub_kind = Some(ArgSubKind::Flag), + "count-flag" => ir.sub_kind = Some(ArgSubKind::CountFlag), + "file" => ir.path_kind = Some(PathKindIr::File), + "dir" | "directory" => ir.path_kind = Some(PathKindIr::Directory), + "any" => ir.path_kind = Some(PathKindIr::Any), + other => { + return Err(Error::new( + value.span(), + format!( + "invalid kind `{other}`; expected one of: flag, count-flag (arg kind) or file, dir, any (path kind)" + ), + )); + } + } + Ok(()) +} + +fn parse_repeatable(value: &Expr) -> Result { + let s = expr_str(value, "repeatable")?; + match s.as_str() { + "repeated" => Ok(RepeatableMode::Repeated), + "delimited" => Ok(RepeatableMode::Delimited), + "either" => Ok(RepeatableMode::Either), + other => Err(Error::new( + value.span(), + format!("invalid repeatable mode `{other}`; expected: repeated, delimited, either"), + )), + } +} + +fn parse_direction(value: &Expr) -> Result { + let s = expr_str(value, "direction")?; + match s.as_str() { + "input" | "in" => Ok(PathDirectionIr::Input), + "output" | "out" => Ok(PathDirectionIr::Output), + "inout" | "in-out" | "in_out" => Ok(PathDirectionIr::InOut), + other => Err(Error::new( + value.span(), + format!("invalid direction `{other}`; expected: input, output, inout"), + )), + } +} + +fn parse_bounds(value: &Expr) -> Result<(Expr, Expr), Error> { + match value { + Expr::Tuple(t) if t.elems.len() == 2 => { + let mut it = t.elems.iter(); + let lo = it.next().unwrap().clone(); + let hi = it.next().unwrap().clone(); + Ok((lo, hi)) + } + other => Err(Error::new( + other.span(), + "bounds must be a 2-tuple `(min, max)`", + )), + } +} + +/// Reads a key-value entry. The returned flag is `true` when the entry was a +/// bare `key` path (no `= value`), which the boolean handlers treat as `true`. +fn split_key_value(expr: &Expr) -> Result<(syn::Ident, &Expr, bool), Error> { + match expr { + Expr::Assign(assign) => { + let ident = assign_left_ident(&assign.left)?; + Ok((ident, &assign.right, false)) + } + Expr::Path(p) => { + let ident = + p.path.get_ident().cloned().ok_or_else(|| { + Error::new(p.span(), "expected a key identifier in #[arg(...)]") + })?; + // A bare key (e.g. `verbatim`) means the key set to `true`; the + // expression itself is reused as the value, which only the boolean + // handlers accept (and only because `is_bare` is `true`). + Ok((ident, expr, true)) + } + other => Err(Error::new( + other.span(), + "expected `key = value` in #[arg(...)]", + )), + } +} + +/// Resolves a boolean key: a bare key is `true`; an assigned key requires a +/// boolean literal (`= true` / `= false`), rejecting anything else. +fn value_bool(value: &Expr, is_bare: bool, what: &str) -> Result { + if is_bare { + return Ok(true); + } + expr_bool(value, what) +} + +fn assign_left_ident(left: &Expr) -> Result { + if let Expr::Path(p) = left + && let Some(ident) = p.path.get_ident() + { + return Ok(ident.clone()); + } + Err(Error::new( + left.span(), + "expected an identifier on the left of `=`", + )) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn arg(src: &str) -> Result { + let item: syn::ItemStruct = syn::parse_str(&format!("{src}\nstruct S;")).unwrap(); + parse_arg(&item.attrs[0]) + } + + #[test] + fn positional_with_regex() { + let ir = arg(r##"#[arg(pattern = "positional", regex = r"^.+$")]"##).unwrap(); + assert_eq!(ir.param.to_string(), "pattern"); + assert_eq!(ir.placement, Some(ArgPlacement::Positional)); + assert_eq!(ir.regex.as_deref(), Some("^.+$")); + } + + #[test] + fn global_flag() { + let ir = arg(r#"#[arg(case_sensitive = "global", short = 'i', kind = "flag")]"#).unwrap(); + assert_eq!(ir.param.to_string(), "case_sensitive"); + assert_eq!(ir.placement, Some(ArgPlacement::Global)); + assert_eq!(ir.short, Some('i')); + assert_eq!(ir.sub_kind, Some(ArgSubKind::Flag)); + } + + #[test] + fn repeatable_either_with_delim() { + let ir = arg( + r#"#[arg(extra_patterns = "option", short = 'e', repeatable = "either", delim = ',')]"#, + ) + .unwrap(); + assert_eq!(ir.repeatable, Some(RepeatableMode::Either)); + assert_eq!(ir.delim, Some(',')); + } + + #[test] + fn min_max_kept_raw() { + // `min`/`max` are captured raw regardless of placement; metadata synthesis routes + // them once the final placement/sub-kind is known. + let ir = arg(r#"#[arg(max_count = "option", short = 'n', min = 1)]"#).unwrap(); + assert!(ir.raw_min.is_some()); + assert!(ir.raw_max.is_none()); + } + + #[test] + fn bare_min_key_is_rejected() { + let err = arg(r#"#[arg(max_count = "option", short = 'n', min)]"#).unwrap_err(); + assert!(err.to_string().contains("expected `key = value`")); + } + + #[test] + fn tail_min_is_raw() { + let ir = arg(r#"#[arg(paths = "tail", separator = "--", min = 0)]"#).unwrap(); + assert_eq!(ir.placement, Some(ArgPlacement::Tail)); + assert!(ir.raw_min.is_some()); + assert_eq!(ir.separator.as_deref(), Some("--")); + } + + #[test] + fn count_flag_max_is_raw() { + let ir = arg(r#"#[arg(verbose = "global", short = 'v', kind = "count-flag", max = 3)]"#) + .unwrap(); + assert_eq!(ir.sub_kind, Some(ArgSubKind::CountFlag)); + assert!(ir.raw_max.is_some()); + } + + #[test] + fn numeric_bounds_tuple() { + let ir = + arg(r#"#[arg(max_count = "option", short = 'n', bounds = (0, i64::MAX))]"#).unwrap(); + assert!(ir.bounds.is_some()); + } + + #[test] + fn accepts_stdio_on_tail() { + let ir = arg(r#"#[arg(files = "tail", accepts_stdio = true)]"#).unwrap(); + assert_eq!(ir.placement, Some(ArgPlacement::Tail)); + assert!(ir.accepts_stdio); + } + + #[test] + fn env_default_required() { + let ir = arg(r#"#[arg(message = "option", short = 'm', required = true)]"#).unwrap(); + assert_eq!(ir.required, Some(true)); + let ir = arg(r#"#[arg(git_dir = "global", env = "GIT_DIR", default = ".git")]"#).unwrap(); + assert_eq!(ir.env.as_deref(), Some("GIT_DIR")); + assert!(ir.default.is_some()); + } + + #[test] + fn negatable_flag_default_true() { + let ir = + arg(r#"#[arg(paginate = "global", kind = "flag", negatable = true, default = true)]"#) + .unwrap(); + assert_eq!(ir.negatable, Some(true)); + assert!(ir.default.is_some()); + } + + #[test] + fn bare_param_infers_placement() { + let ir = arg(r#"#[arg(pattern, regex = r"^.+$")]"#).unwrap(); + assert_eq!(ir.param.to_string(), "pattern"); + assert_eq!(ir.placement, None); + } + + #[test] + fn path_kind_via_kind_key() { + let ir = arg(r#"#[arg(out = "positional", kind = "file", direction = "output")]"#).unwrap(); + assert_eq!(ir.path_kind, Some(PathKindIr::File)); + assert_eq!(ir.direction, Some(PathDirectionIr::Output)); + assert!(ir.sub_kind.is_none()); + } + + #[test] + fn url_schemes() { + let ir = arg(r#"#[arg(endpoint = "positional", schemes = ["https", "http"])]"#).unwrap(); + assert_eq!( + ir.schemes, + Some(vec!["https".to_string(), "http".to_string()]) + ); + } + + #[test] + fn unknown_key_is_error() { + let err = arg(r#"#[arg(name = "option", bogus = 1)]"#).unwrap_err(); + assert!(err.to_string().contains("unknown #[arg] key")); + } + + #[test] + fn assigned_bool_must_be_boolean_literal() { + let err = arg(r#"#[arg(name = "option", required = maybe)]"#).unwrap_err(); + assert!(err.to_string().contains("required")); + } + + #[test] + fn default_rejects_negated_string_literal() { + let err = arg(r#"#[arg(name = "option", default = -"bad")]"#).unwrap_err(); + assert!(err.to_string().contains("literal")); + } + + #[test] + fn default_rejects_byte_string_literal() { + assert!( + arg(r#"#[arg(name = "option", default = b"bad")]"#).is_err(), + "byte string defaults are accepted into the IR even though metadata literals only support strings, numbers, bools, chars, arrays, and tuples" + ); + } + + #[test] + fn duplicate_arg_key_is_error() { + let err = arg(r#"#[arg(name = "option", short = 'n', short = 'm')]"#).unwrap_err(); + assert!(err.to_string().contains("duplicate")); + } + + #[test] + fn invalid_placement_is_error() { + let err = arg(r#"#[arg(name = "weird")]"#).unwrap_err(); + assert!(err.to_string().contains("invalid arg placement")); + } +} diff --git a/sdks/rust/golem-rust-macro/src/tool/command.rs b/sdks/rust/golem-rust-macro/src/tool/command.rs new file mode 100644 index 0000000000..5a93baad30 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/command.rs @@ -0,0 +1,247 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Parser for the `#[command(...)]` helper attribute. + +use crate::tool::helpers::{SeenKeys, expr_bool, expr_str, expr_str_array, parse_attr_exprs}; +use crate::tool::ir::{CommandAnnotationsIr, SubtreeIr}; +use syn::spanned::Spanned; +use syn::{Attribute, Error, Expr}; + +/// The parsed pieces of one or more `#[command(...)]` attributes on a method. +#[derive(Debug, Clone, Default, PartialEq, Eq)] +pub struct CommandAttr { + pub aliases: Vec, + pub name_override: Option, + pub annotations: Option, + pub subtree: Option, +} + +/// Parses a single `#[command(...)]` attribute, merging into `out`. `seen` +/// tracks the keys set so far (across every `#[command]` attribute on the same +/// method) so a repeated key is rejected instead of silently overwriting. +pub fn parse_command_into( + attr: &Attribute, + out: &mut CommandAttr, + seen: &mut SeenKeys, +) -> Result<(), Error> { + let exprs = parse_attr_exprs(attr)?; + for expr in exprs.iter() { + match expr { + Expr::Call(call) => { + let func = func_ident(&call.func)?; + if func == "annotations" { + seen.insert(&func)?; + out.annotations = Some(parse_annotations(call)?); + } else { + return Err(Error::new( + call.func.span(), + format!("unknown #[command] entry `{func}(...)`"), + )); + } + } + Expr::Assign(assign) => { + let key = assign_left_ident(&assign.left)?; + seen.insert(&key)?; + match key.to_string().as_str() { + "aliases" => out.aliases = expr_str_array(&assign.right, "aliases")?, + "name" => out.name_override = Some(expr_str(&assign.right, "name")?), + "subtree" => out.subtree = Some(parse_subtree(&assign.right)?), + other => { + return Err(Error::new( + key.span(), + format!("unknown #[command] key `{other}`"), + )); + } + } + } + other => { + return Err(Error::new( + other.span(), + "expected `key = value` or `annotations(...)` in #[command(...)]", + )); + } + } + } + + // A `name` next to `subtree` overrides the grafted command name. + if let (Some(name), Some(subtree)) = (&out.name_override, out.subtree.as_mut()) + && subtree.name_override.is_none() + { + subtree.name_override = Some(name.clone()); + } + Ok(()) +} + +fn parse_subtree(right: &Expr) -> Result { + match right { + Expr::Path(p) => Ok(SubtreeIr { + path: p.path.clone(), + name_override: None, + }), + other => Err(Error::new( + other.span(), + "subtree must be a path to a #[tool_definition] trait, e.g. `subtree = path::Remote`", + )), + } +} + +fn parse_annotations(call: &syn::ExprCall) -> Result { + let mut ann = CommandAnnotationsIr::default(); + let mut seen = SeenKeys::default(); + for arg in call.args.iter() { + // Accept both `key = bool` and a bare `key` (meaning `key = true`). + let (key, value) = match arg { + Expr::Assign(assign) => ( + assign_left_ident(&assign.left)?, + expr_bool(&assign.right, "annotation")?, + ), + Expr::Path(p) => { + let ident = p + .path + .get_ident() + .cloned() + .ok_or_else(|| Error::new(p.span(), "expected an annotation name"))?; + (ident, true) + } + other => { + return Err(Error::new( + other.span(), + "annotations entries must be `key` or `key = bool`", + )); + } + }; + seen.insert(&key)?; + match key.to_string().as_str() { + "read_only" => ann.read_only = Some(value), + "destructive" => ann.destructive = Some(value), + "idempotent" => ann.idempotent = Some(value), + "open_world" => ann.open_world = Some(value), + other => { + return Err(Error::new( + key.span(), + format!( + "unknown annotation `{other}`; expected: read_only, destructive, idempotent, open_world" + ), + )); + } + } + } + Ok(ann) +} + +fn func_ident(func: &Expr) -> Result { + if let Expr::Path(p) = func + && let Some(ident) = p.path.get_ident() + { + return Ok(ident.clone()); + } + Err(Error::new(func.span(), "expected an identifier")) +} + +fn assign_left_ident(left: &Expr) -> Result { + if let Expr::Path(p) = left + && let Some(ident) = p.path.get_ident() + { + return Ok(ident.clone()); + } + Err(Error::new( + left.span(), + "expected an identifier on the left of `=`", + )) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn command(src: &str) -> Result { + let item: syn::ItemStruct = syn::parse_str(&format!("{src}\nstruct S;")).unwrap(); + let mut out = CommandAttr::default(); + let mut seen = SeenKeys::default(); + for attr in &item.attrs { + parse_command_into(attr, &mut out, &mut seen)?; + } + Ok(out) + } + + #[test] + fn aliases_and_annotations() { + let c = + command(r#"#[command(aliases = ["ci"], annotations(destructive = true))]"#).unwrap(); + assert_eq!(c.aliases, vec!["ci".to_string()]); + let ann = c.annotations.unwrap(); + assert_eq!(ann.destructive, Some(true)); + assert_eq!(ann.read_only, None); + } + + #[test] + fn multi_annotations() { + let c = command(r#"#[command(annotations(read_only = true, idempotent = true))]"#).unwrap(); + let ann = c.annotations.unwrap(); + assert_eq!(ann.read_only, Some(true)); + assert_eq!(ann.idempotent, Some(true)); + } + + #[test] + fn bare_annotation_is_true() { + let c = command(r#"#[command(annotations(destructive, read_only = false))]"#).unwrap(); + let ann = c.annotations.unwrap(); + assert_eq!(ann.destructive, Some(true)); + assert_eq!(ann.read_only, Some(false)); + } + + #[test] + fn subtree_path() { + let c = command(r#"#[command(subtree = path::Remote)]"#).unwrap(); + let sub = c.subtree.unwrap(); + let path = &sub.path; + assert_eq!( + quote::quote!(#path).to_string().replace(' ', ""), + "path::Remote" + ); + } + + #[test] + fn subtree_name_override() { + let c = command(r#"#[command(subtree = path::Remote, name = "rmt")]"#).unwrap(); + let sub = c.subtree.unwrap(); + assert_eq!(sub.name_override.as_deref(), Some("rmt")); + } + + #[test] + fn unknown_key_is_error() { + let err = command(r#"#[command(bogus = 1)]"#).unwrap_err(); + assert!(err.to_string().contains("unknown #[command] key")); + } + + #[test] + fn unknown_annotation_is_error() { + let err = command(r#"#[command(annotations(whatever = true))]"#).unwrap_err(); + assert!(err.to_string().contains("unknown annotation")); + } + + #[test] + fn duplicate_annotation_key_is_error() { + let err = + command(r#"#[command(annotations(read_only = true, read_only = false))]"#).unwrap_err(); + assert!(err.to_string().contains("duplicate")); + } + + #[test] + fn duplicate_empty_aliases_key_is_error() { + let err = command(r#"#[command(aliases = [], aliases = ["ci"])]"#).unwrap_err(); + assert!(err.to_string().contains("duplicate")); + } +} diff --git a/sdks/rust/golem-rust-macro/src/tool/constraint.rs b/sdks/rust/golem-rust-macro/src/tool/constraint.rs new file mode 100644 index 0000000000..67c3067be8 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/constraint.rs @@ -0,0 +1,411 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Parser for the `#[constraint(...)]` helper attribute. + +use crate::tool::helpers::{expr_str, parse_attr_exprs, require_metadata_literal}; +use crate::tool::ir::{ConstraintIr, QuantifierIr, RefIr}; +use syn::spanned::Spanned; +use syn::{Attribute, Error, Expr}; + +/// Parses a single `#[constraint(...)]` attribute into one [`ConstraintIr`]. +pub fn parse_constraint(attr: &Attribute) -> Result { + let exprs = parse_attr_exprs(attr)?; + if exprs.len() != 1 { + return Err(Error::new( + attr.span(), + "#[constraint(...)] must contain exactly one constraint, e.g. `all_or_none = [...]` or `implies(...)`", + )); + } + let expr = exprs.first().unwrap(); + match expr { + Expr::Assign(assign) => { + let key = assign_left_ident(&assign.left)?; + match key.to_string().as_str() { + "requires_all" => Ok(ConstraintIr::RequiresAll(parse_refs(&assign.right)?)), + "all_or_none" => Ok(ConstraintIr::AllOrNone(parse_refs(&assign.right)?)), + "requires_any" => Ok(ConstraintIr::RequiresAny(parse_refs(&assign.right)?)), + "mutex_groups" => Ok(ConstraintIr::MutexGroups(parse_ref_groups(&assign.right)?)), + other => Err(Error::new( + key.span(), + format!("unknown #[constraint] key `{other}`"), + )), + } + } + Expr::Call(call) => { + let func = func_ident(&call.func)?; + match func.to_string().as_str() { + "implies" => parse_implies(call), + "forbids" => parse_forbids(call), + other => Err(Error::new( + call.func.span(), + format!("unknown #[constraint] form `{other}(...)`"), + )), + } + } + other => Err(Error::new( + other.span(), + "expected a constraint like `all_or_none = [...]`, `implies(...)`, or `forbids(...)`", + )), + } +} + +fn parse_implies(call: &syn::ExprCall) -> Result { + let kw = collect_kwargs(call)?; + check_allowed_keys(&kw, &["lhs", "rhs", "lhs_quant", "rhs_quant"])?; + let (lhs_quant, lhs) = take_side(&kw, "lhs")?; + let (rhs_quant, rhs) = take_side(&kw, "rhs")?; + Ok(ConstraintIr::Implies { + lhs_quant, + lhs, + rhs_quant, + rhs, + }) +} + +fn parse_forbids(call: &syn::ExprCall) -> Result { + let kw = collect_kwargs(call)?; + // `forbids` has no RHS quantifier in the runtime model, so reject `rhs_quant`. + check_allowed_keys(&kw, &["lhs", "rhs", "lhs_quant"])?; + let (lhs_quant, lhs) = take_side(&kw, "lhs")?; + let (_rhs_quant, rhs) = take_side(&kw, "rhs")?; + Ok(ConstraintIr::Forbids { + lhs_quant, + lhs, + rhs, + }) +} + +/// Rejects unknown or duplicated keyword arguments in a constraint form. +fn check_allowed_keys(kw: &[(syn::Ident, Expr)], allowed: &[&str]) -> Result<(), Error> { + let mut seen = std::collections::BTreeSet::new(); + for (key, _) in kw { + let name = key.to_string(); + if !allowed.contains(&name.as_str()) { + return Err(Error::new( + key.span(), + format!( + "unknown key `{name}`; expected one of: {}", + allowed.join(", ") + ), + )); + } + if !seen.insert(name.clone()) { + return Err(Error::new(key.span(), format!("duplicate key `{name}`"))); + } + } + Ok(()) +} + +/// Resolves a `lhs`/`rhs` side: refs from `` and an optional +/// `_quant = "all" | "any"` (defaulting to `all`). +fn take_side(kw: &[(syn::Ident, Expr)], side: &str) -> Result<(QuantifierIr, Vec), Error> { + let refs_expr = kw + .iter() + .find(|(k, _)| k == side) + .map(|(_, v)| v) + .ok_or_else(|| Error::new(proc_macro2::Span::call_site(), format!("missing `{side}`")))?; + let refs = parse_refs(refs_expr)?; + let quant = match kw.iter().find(|(k, _)| *k == format!("{side}_quant")) { + Some((_, v)) => parse_quantifier(v)?, + None => QuantifierIr::All, + }; + Ok((quant, refs)) +} + +fn parse_quantifier(expr: &Expr) -> Result { + match expr_str(expr, "quantifier")?.as_str() { + "all" => Ok(QuantifierIr::All), + "any" => Ok(QuantifierIr::Any), + other => Err(Error::new( + expr.span(), + format!("invalid quantifier `{other}`; expected `all` or `any`"), + )), + } +} + +fn collect_kwargs(call: &syn::ExprCall) -> Result, Error> { + let mut out = Vec::new(); + for arg in call.args.iter() { + let Expr::Assign(assign) = arg else { + return Err(Error::new( + arg.span(), + "expected `key = value` arguments (e.g. `lhs = \"a\", rhs = \"b\"`)", + )); + }; + out.push((assign_left_ident(&assign.left)?, (*assign.right).clone())); + } + Ok(out) +} + +/// Parses a flexible ref list: either a single ref or an array of refs. +fn parse_refs(expr: &Expr) -> Result, Error> { + match expr { + Expr::Array(arr) => arr.elems.iter().map(parse_ref).collect(), + other => Ok(vec![parse_ref(other)?]), + } +} + +fn parse_ref_groups(expr: &Expr) -> Result>, Error> { + let Expr::Array(arr) = expr else { + return Err(Error::new( + expr.span(), + "mutex_groups must be an array of groups, e.g. `[[\"add\"], [\"delete\"]]`", + )); + }; + // Each group must itself be an array; a bare ref like `mutex_groups = + // [\"add\", \"delete\"]` would otherwise be silently parsed as two no-op + // single-element groups instead of one mutually-exclusive group. + arr.elems + .iter() + .map(|group| match group { + Expr::Array(group_arr) => group_arr.elems.iter().map(parse_ref).collect(), + other => Err(Error::new( + other.span(), + "mutex_groups must be an array of groups, e.g. `[[\"add\"], [\"delete\"]]`; each group must itself be an array of argument refs", + )), + }) + .collect() +} + +/// Parses a single ref: a string literal (`present`) or `value_is(...)`. +fn parse_ref(expr: &Expr) -> Result { + match expr { + Expr::Lit(_) => Ok(RefIr::Present(expr_str(expr, "argument name")?)), + Expr::Call(call) + if func_ident(&call.func) + .map(|i| i == "value_is") + .unwrap_or(false) => + { + parse_value_is(call) + } + other => Err(Error::new( + other.span(), + "expected an argument name string or `value_is(name, value)`", + )), + } +} + +/// Parses `value_is("name", )` or `value_is(name = "name", value = )`. +fn parse_value_is(call: &syn::ExprCall) -> Result { + let args: Vec<&Expr> = call.args.iter().collect(); + let any_keyword = args.iter().any(|a| matches!(a, Expr::Assign(_))); + let all_keyword = args.iter().all(|a| matches!(a, Expr::Assign(_))); + if any_keyword && !all_keyword { + return Err(Error::new( + call.span(), + "value_is(...) cannot mix positional and keyword arguments; use `value_is(\"name\", )` or `value_is(name = \"name\", value = )`", + )); + } + // Keyword form. + if all_keyword && !args.is_empty() { + let kw = collect_kwargs(call)?; + check_allowed_keys(&kw, &["name", "value"])?; + let name = kw + .iter() + .find(|(k, _)| k == "name") + .ok_or_else(|| Error::new(call.span(), "value_is(...) is missing `name`"))?; + let value = kw + .iter() + .find(|(k, _)| k == "value") + .ok_or_else(|| Error::new(call.span(), "value_is(...) is missing `value`"))?; + require_metadata_literal(&value.1, "value_is value")?; + return Ok(RefIr::ValueIs { + name: expr_str(&name.1, "value_is name")?, + value: value.1.clone(), + }); + } + // Positional form: value_is("name", ). + if args.len() == 2 { + require_metadata_literal(args[1], "value_is value")?; + return Ok(RefIr::ValueIs { + name: expr_str(args[0], "value_is name")?, + value: args[1].clone(), + }); + } + Err(Error::new( + call.span(), + "value_is(...) takes `name` and `value` (positional or keyword)", + )) +} + +fn func_ident(func: &Expr) -> Result { + if let Expr::Path(p) = func + && let Some(ident) = p.path.get_ident() + { + return Ok(ident.clone()); + } + Err(Error::new(func.span(), "expected an identifier")) +} + +fn assign_left_ident(left: &Expr) -> Result { + if let Expr::Path(p) = left + && let Some(ident) = p.path.get_ident() + { + return Ok(ident.clone()); + } + Err(Error::new( + left.span(), + "expected an identifier on the left of `=`", + )) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn constraint(src: &str) -> Result { + let item: syn::ItemStruct = syn::parse_str(&format!("{src}\nstruct S;")).unwrap(); + parse_constraint(&item.attrs[0]) + } + + #[test] + fn all_or_none() { + let c = constraint(r#"#[constraint(all_or_none = ["all-match", "grep"])]"#).unwrap(); + assert_eq!( + c, + ConstraintIr::AllOrNone(vec![ + RefIr::Present("all-match".to_string()), + RefIr::Present("grep".to_string()), + ]) + ); + } + + #[test] + fn mutex_groups() { + let c = constraint(r#"#[constraint(mutex_groups = [["add"], ["delete"]])]"#).unwrap(); + assert_eq!( + c, + ConstraintIr::MutexGroups(vec![ + vec![RefIr::Present("add".to_string())], + vec![RefIr::Present("delete".to_string())], + ]) + ); + } + + #[test] + fn mutex_groups_requires_array_of_groups() { + let err = constraint(r#"#[constraint(mutex_groups = ["add", "delete"])]"#).unwrap_err(); + assert!( + err.to_string() + .contains("mutex_groups must be an array of groups") + ); + } + + #[test] + fn implies_single() { + let c = + constraint(r#"#[constraint(implies(lhs = "reset-author", rhs = "amend"))]"#).unwrap(); + assert_eq!( + c, + ConstraintIr::Implies { + lhs_quant: QuantifierIr::All, + lhs: vec![RefIr::Present("reset-author".to_string())], + rhs_quant: QuantifierIr::All, + rhs: vec![RefIr::Present("amend".to_string())], + } + ); + } + + #[test] + fn implies_with_quantifiers() { + let c = + constraint(r#"#[constraint(implies(lhs = ["a", "b"], lhs_quant = "any", rhs = "c"))]"#) + .unwrap(); + match c { + ConstraintIr::Implies { lhs_quant, lhs, .. } => { + assert_eq!(lhs_quant, QuantifierIr::Any); + assert_eq!(lhs.len(), 2); + } + _ => panic!("expected implies"), + } + } + + #[test] + fn forbids() { + let c = constraint(r#"#[constraint(forbids(lhs = "a", rhs = "b"))]"#).unwrap(); + assert!(matches!(c, ConstraintIr::Forbids { .. })); + } + + #[test] + fn value_is_ref_keyword() { + let c = constraint( + r#"#[constraint(requires_all = [value_is(name = "output", value = "json")])]"#, + ) + .unwrap(); + match c { + ConstraintIr::RequiresAll(refs) => match &refs[0] { + RefIr::ValueIs { name, .. } => assert_eq!(name, "output"), + _ => panic!("expected value_is ref"), + }, + _ => panic!("expected requires_all"), + } + } + + #[test] + fn value_is_ref_positional() { + let c = + constraint(r#"#[constraint(requires_any = [value_is("output", "json"), "verbose"])]"#) + .unwrap(); + match c { + ConstraintIr::RequiresAny(refs) => { + assert!(matches!(refs[0], RefIr::ValueIs { .. })); + assert_eq!(refs[1], RefIr::Present("verbose".to_string())); + } + _ => panic!("expected requires_any"), + } + } + + #[test] + fn value_is_rejects_mixed_positional_and_keyword_args() { + let err = + constraint(r#"#[constraint(requires_all = [value_is("output", value = "json")])]"#) + .unwrap_err(); + assert!(err.to_string().contains("value_is")); + } + + #[test] + fn value_is_rejects_non_literal_value() { + let err = constraint(r#"#[constraint(requires_all = [value_is("output", compute())])]"#) + .unwrap_err(); + assert!(err.to_string().contains("literal")); + } + + #[test] + fn value_is_rejects_negated_bool_literal() { + let err = + constraint(r#"#[constraint(requires_all = [value_is("output", -true)])]"#).unwrap_err(); + assert!(err.to_string().contains("literal")); + } + + #[test] + fn unknown_constraint_is_error() { + let err = constraint(r#"#[constraint(bogus = ["x"])]"#).unwrap_err(); + assert!(err.to_string().contains("unknown #[constraint] key")); + } + + #[test] + fn implies_typo_key_is_error() { + let err = constraint(r#"#[constraint(implies(lhs = "a", rhs = "b", lhs_qunat = "any"))]"#) + .unwrap_err(); + assert!(err.to_string().contains("unknown key")); + } + + #[test] + fn forbids_rhs_quant_is_rejected() { + let err = constraint(r#"#[constraint(forbids(lhs = "a", rhs = "b", rhs_quant = "any"))]"#) + .unwrap_err(); + assert!(err.to_string().contains("unknown key")); + } +} diff --git a/sdks/rust/golem-rust-macro/src/tool/definition.rs b/sdks/rust/golem-rust-macro/src/tool/definition.rs new file mode 100644 index 0000000000..bdda0adb08 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/definition.rs @@ -0,0 +1,529 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! `#[tool_definition]` entry point. +//! +//! This parses the trait and all tool authoring attributes into a +//! [`ToolDefinitionIr`], strips the helper attributes from the emitted trait, +//! and adds the hidden `tool_implementation_annotation` item that forces every +//! implementation to carry `#[tool_implementation]`. Metadata synthesis and +//! runtime registration are added later from that IR. + +use crate::tool::arg::parse_arg; +use crate::tool::command::{CommandAttr, parse_command_into}; +use crate::tool::constraint::parse_constraint; +use crate::tool::doc::parse_doc_full; +use crate::tool::helpers::SeenKeys; +use crate::tool::ir::{ArgIr, CommandIr, ParamIr, ToolDefinitionIr}; +use crate::tool::result::parse_result; +use proc_macro::TokenStream; +use quote::quote; +use std::collections::BTreeSet; +use syn::spanned::Spanned; +use syn::{Attribute, Error, Expr, FnArg, ItemTrait, Lit, TraitItem}; + +const HELPER_ATTRS: [&str; 5] = ["arg", "command", "constraint", "result", "example"]; + +pub fn tool_definition_impl(attrs: TokenStream, item: TokenStream) -> TokenStream { + let mut item_trait = syn::parse_macro_input!(item as ItemTrait); + + let version = match parse_version(attrs.into()) { + Ok(v) => v, + Err(err) => return err.to_compile_error().into(), + }; + + // Building the IR validates every tool authoring attribute and surfaces + // parse errors at compile time. + if let Err(err) = build_tool_definition_ir(&item_trait, version) { + return err.to_compile_error().into(); + } + + strip_helper_attrs(&mut item_trait); + + let annotation_item: TraitItem = syn::parse_quote! { + #[doc(hidden)] + fn tool_implementation_annotation() where Self: Sized; + }; + item_trait.items.push(annotation_item); + + quote! { + #[allow(async_fn_in_trait)] + #item_trait + } + .into() +} + +/// Parses a `#[tool_definition]` trait and its authoring attributes into IR. +pub fn build_tool_definition_ir( + item_trait: &ItemTrait, + version: Option, +) -> Result { + reject_misplaced_method_helper_attrs(item_trait)?; + + let mut commands = Vec::new(); + for item in &item_trait.items { + if let TraitItem::Fn(method) = item { + commands.push(build_command_ir(method)?); + } + } + + Ok(ToolDefinitionIr { + trait_ident: item_trait.ident.clone(), + version, + doc: parse_doc_full(&item_trait.attrs)?, + commands, + }) +} + +fn build_command_ir(method: &syn::TraitItemFn) -> Result { + let mut command_attr = CommandAttr::default(); + let mut command_seen = SeenKeys::default(); + let mut args = Vec::new(); + let mut constraints = Vec::new(); + let mut result = None; + + for attr in &method.attrs { + let path = attr.path(); + if path.is_ident("command") { + parse_command_into(attr, &mut command_attr, &mut command_seen)?; + } else if path.is_ident("arg") { + args.push(parse_arg(attr)?); + } else if path.is_ident("constraint") { + constraints.push(parse_constraint(attr)?); + } else if path.is_ident("result") { + if result.is_some() { + return Err(Error::new( + attr.span(), + "a command may have at most one #[result(...)] attribute", + )); + } + result = Some(parse_result(attr)?); + } + } + + let params = collect_params(&method.sig)?; + validate_arg_bindings(&args, ¶ms)?; + + Ok(CommandIr { + method_ident: method.sig.ident.clone(), + doc: parse_doc_full(&method.attrs)?, + aliases: command_attr.aliases, + name_override: command_attr.name_override, + annotations: command_attr.annotations, + subtree: command_attr.subtree, + params, + output: method.sig.output.clone(), + args, + constraints, + result, + }) +} + +/// Ensures every `#[arg(...)]` binds to an existing method parameter and that no +/// parameter is described by more than one `#[arg(...)]`. +fn validate_arg_bindings(args: &[ArgIr], params: &[ParamIr]) -> Result<(), Error> { + let param_names: BTreeSet = params.iter().map(|p| p.ident.to_string()).collect(); + let mut seen: BTreeSet = BTreeSet::new(); + for arg in args { + let name = arg.param.to_string(); + if !param_names.contains(&name) { + return Err(Error::new( + arg.param.span(), + format!( + "#[arg(...)] refers to unknown parameter `{name}`; the method has no such parameter" + ), + )); + } + if !seen.insert(name.clone()) { + return Err(Error::new( + arg.param.span(), + format!("duplicate #[arg(...)] for parameter `{name}`"), + )); + } + } + Ok(()) +} + +/// Collects the typed parameters of a method, excluding the `&self` receiver. +/// +/// Every typed parameter must be a simple named identifier so that metadata synthesis can +/// build the command metadata from this IR without re-reading the trait. +fn collect_params(sig: &syn::Signature) -> Result, Error> { + let mut params = Vec::new(); + for input in &sig.inputs { + match input { + FnArg::Receiver(_) => {} + FnArg::Typed(pat_type) => match &*pat_type.pat { + syn::Pat::Ident(pat_ident) if pat_ident.subpat.is_none() => { + params.push(ParamIr { + ident: pat_ident.ident.clone(), + ty: (*pat_type.ty).clone(), + }); + } + other => { + return Err(Error::new( + other.span(), + "tool method parameters must be named identifiers, e.g. `name: Type`", + )); + } + }, + } + } + Ok(params) +} + +/// Rejects helper attributes used in positions the IR builder does not read, +/// where they would otherwise be silently ignored. The method-only helpers +/// (`#[arg]`, `#[command]`, `#[constraint]`, `#[result]`) are valid only on a +/// tool method; `#[example]` is valid only on the trait or a method. Anywhere +/// else — the trait's non-method items or a method's parameters — is rejected. +fn reject_misplaced_method_helper_attrs(item_trait: &ItemTrait) -> Result<(), Error> { + fn reject_method_only(attrs: &[Attribute]) -> Result<(), Error> { + const METHOD_ONLY: [&str; 4] = ["arg", "command", "constraint", "result"]; + for attr in attrs { + if METHOD_ONLY.iter().any(|name| attr.path().is_ident(name)) { + return Err(Error::new( + attr.span(), + "#[arg], #[command], #[constraint], and #[result] may only be used on tool methods", + )); + } + } + Ok(()) + } + + fn reject_example(attrs: &[Attribute]) -> Result<(), Error> { + for attr in attrs { + if attr.path().is_ident("example") { + return Err(Error::new( + attr.span(), + "#[example] may only be used on the tool trait or its methods", + )); + } + } + Ok(()) + } + + // `#[example]` is allowed on the trait itself, so only the method-only + // helpers are rejected at trait level. + reject_method_only(&item_trait.attrs)?; + + for item in &item_trait.items { + match item { + TraitItem::Fn(method) => { + // A method's own attributes are valid; its parameters' are not. + for input in &method.sig.inputs { + let attrs = match input { + FnArg::Receiver(r) => &r.attrs, + FnArg::Typed(t) => &t.attrs, + }; + reject_method_only(attrs)?; + reject_example(attrs)?; + } + } + TraitItem::Const(c) => { + reject_method_only(&c.attrs)?; + reject_example(&c.attrs)?; + } + TraitItem::Type(t) => { + reject_method_only(&t.attrs)?; + reject_example(&t.attrs)?; + } + TraitItem::Macro(m) => { + reject_method_only(&m.attrs)?; + reject_example(&m.attrs)?; + } + _ => {} + } + } + Ok(()) +} + +fn strip_helper_attrs(item_trait: &mut ItemTrait) { + item_trait + .attrs + .retain(|attr| !attr.path().is_ident("example")); + + for item in &mut item_trait.items { + if let TraitItem::Fn(method) = item { + method + .attrs + .retain(|attr| !HELPER_ATTRS.iter().any(|h| attr.path().is_ident(h))); + } + } +} + +/// Parses the optional `#[tool_definition(version = "...")]` attribute argument. +fn parse_version(attrs: proc_macro2::TokenStream) -> Result, Error> { + if attrs.is_empty() { + return Ok(None); + } + use syn::parse::Parser; + use syn::punctuated::Punctuated; + let parser = Punctuated::::parse_terminated; + let exprs = parser.parse2(attrs)?; + let mut version = None; + let mut seen = SeenKeys::default(); + for expr in exprs.iter() { + let Expr::Assign(assign) = expr else { + return Err(Error::new( + expr.span(), + "expected `version = \"...\"` in #[tool_definition(...)]", + )); + }; + let key = match &*assign.left { + Expr::Path(p) if p.path.get_ident().is_some() => p.path.get_ident().unwrap().clone(), + other => { + return Err(Error::new( + other.span(), + "the only supported #[tool_definition] argument is `version`", + )); + } + }; + if key != "version" { + return Err(Error::new( + key.span(), + "the only supported #[tool_definition] argument is `version`", + )); + } + seen.insert(&key)?; + match &*assign.right { + Expr::Lit(syn::ExprLit { + lit: Lit::Str(s), .. + }) => version = Some(s.value()), + other => { + return Err(Error::new(other.span(), "version must be a string literal")); + } + } + } + Ok(version) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn ir(src: &str) -> Result { + let item_trait: ItemTrait = syn::parse_str(src).unwrap(); + build_tool_definition_ir(&item_trait, None) + } + + fn version(src: &str) -> Result, Error> { + let attrs: proc_macro2::TokenStream = src.parse().unwrap(); + parse_version(attrs) + } + + #[test] + fn version_is_parsed() { + assert_eq!(version("").unwrap(), None); + assert_eq!( + version(r#"version = "1.2.3""#).unwrap(), + Some("1.2.3".to_string()) + ); + } + + #[test] + fn duplicate_tool_definition_version_is_error() { + let err = version(r#"version = "1.0.0", version = "2.0.0""#).unwrap_err(); + assert!(err.to_string().contains("duplicate")); + } + + #[test] + fn unknown_tool_definition_arg_is_error() { + let err = version(r#"flavor = "fast""#).unwrap_err(); + assert!(err.to_string().contains("only supported")); + } + + #[test] + fn non_string_version_is_error() { + let err = version("version = 3").unwrap_err(); + assert!(err.to_string().contains("string literal")); + } + + #[test] + fn grep_like_trait() { + let def = ir(r##" + /// Search files for a regex pattern. + pub trait Grep { + #[arg(case_sensitive = "global", short = 'i', kind = "flag")] + #[arg(pattern = "positional", regex = r"^.+$")] + #[arg(files = "tail", accepts_stdio = true)] + #[result(formatters = ["human", "json"], default = "human")] + async fn grep(&self, case_sensitive: bool, pattern: RegexString, files: Vec) + -> Result, GrepError>; + } + "##) + .unwrap(); + assert_eq!(def.trait_ident.to_string(), "Grep"); + assert_eq!(def.doc.summary, "Search files for a regex pattern."); + assert_eq!(def.commands.len(), 1); + let cmd = &def.commands[0]; + assert_eq!(cmd.method_ident.to_string(), "grep"); + assert_eq!(cmd.args.len(), 3); + assert!(cmd.result.is_some()); + } + + #[test] + fn command_with_subtree_and_constraint() { + let def = ir(r#" + pub trait Git { + #[command(aliases = ["ci"], annotations(destructive = true))] + #[arg(message = "option", short = 'm', required = true)] + #[constraint(implies(lhs = "reset-author", rhs = "amend"))] + async fn commit(&self, message: String) -> Result<(), CommitError>; + + #[command(subtree = path::Remote, aliases = ["rmt"])] + fn remote(&self) -> Remote; + } + "#) + .unwrap(); + assert_eq!(def.commands.len(), 2); + let commit = &def.commands[0]; + assert_eq!(commit.aliases, vec!["ci".to_string()]); + assert!(commit.annotations.is_some()); + assert_eq!(commit.constraints.len(), 1); + let remote = &def.commands[1]; + assert!(remote.subtree.is_some()); + assert_eq!(remote.aliases, vec!["rmt".to_string()]); + } + + #[test] + fn duplicate_result_is_error() { + let err = ir(r#" + pub trait T { + #[result(formatters = ["a"])] + #[result(formatters = ["b"])] + async fn f(&self) -> Result<(), E>; + } + "#) + .unwrap_err(); + assert!(err.to_string().contains("at most one #[result")); + } + + #[test] + fn bad_arg_is_error() { + let err = ir(r#" + pub trait T { + #[arg(x = "nope")] + async fn f(&self) -> Result<(), E>; + } + "#) + .unwrap_err(); + assert!(err.to_string().contains("invalid arg placement")); + } + + #[test] + fn params_and_output_are_captured() { + let def = ir(r#" + pub trait T { + async fn f(&self, name: String, count: u32) -> Result, E>; + } + "#) + .unwrap(); + let cmd = &def.commands[0]; + let params: Vec = cmd.params.iter().map(|p| p.ident.to_string()).collect(); + assert_eq!(params, vec!["name".to_string(), "count".to_string()]); + assert!(matches!(cmd.output, syn::ReturnType::Type(..))); + } + + #[test] + fn trait_level_method_helper_attr_is_error() { + let err = ir(r#" + #[arg(name = "positional")] + pub trait T { + async fn f(&self, name: String) -> Result<(), E>; + } + "#) + .unwrap_err(); + assert!(err.to_string().contains("may only be used on tool methods")); + } + + #[test] + fn arg_for_unknown_param_is_error() { + let err = ir(r#" + pub trait T { + #[arg(missing = "option")] + async fn f(&self, name: String) -> Result<(), E>; + } + "#) + .unwrap_err(); + assert!(err.to_string().contains("missing")); + } + + #[test] + fn duplicate_arg_for_same_param_is_error() { + let err = ir(r#" + pub trait T { + #[arg(name = "option")] + #[arg(name = "flag")] + async fn f(&self, name: bool) -> Result<(), E>; + } + "#) + .unwrap_err(); + assert!(err.to_string().contains("duplicate")); + } + + #[test] + fn non_ident_param_is_error() { + let err = ir(r#" + pub trait T { + async fn f(&self, (a, b): (u32, u32)) -> Result<(), E>; + } + "#) + .unwrap_err(); + assert!(err.to_string().contains("named identifiers")); + } + + #[test] + fn helper_attr_on_associated_type_is_error() { + let err = ir(r#" + pub trait T { + #[arg(name = "option")] + type State; + + async fn f(&self) -> Result<(), E>; + } + "#) + .unwrap_err(); + assert!(err.to_string().contains("may only be used on tool methods")); + } + + #[test] + fn helper_attr_on_parameter_is_error() { + let err = ir(r#" + pub trait T { + async fn f( + &self, + #[arg(name = "option")] + name: String, + ) -> Result<(), E>; + } + "#) + .unwrap_err(); + assert!(err.to_string().contains("may only be used on tool methods")); + } + + #[test] + fn example_on_associated_type_is_error() { + let err = ir(r#" + pub trait T { + #[example(body = "ignored")] + type State; + + async fn f(&self) -> Result<(), E>; + } + "#) + .unwrap_err(); + assert!(err.to_string().contains("example")); + } +} diff --git a/sdks/rust/golem-rust-macro/src/tool/doc.rs b/sdks/rust/golem-rust-macro/src/tool/doc.rs new file mode 100644 index 0000000000..037264288d --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/doc.rs @@ -0,0 +1,212 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Parsing of `///` doc comments and `#[example(...)]` attributes into a +//! [`DocIr`] (summary + description + examples). + +use crate::tool::helpers::{SeenKeys, expr_str, parse_attr_exprs}; +use crate::tool::ir::{DocIr, ExampleIr}; +use syn::spanned::Spanned; +use syn::{Attribute, Error, Expr, ExprLit, Lit, Meta}; + +/// Extracts the doc comment text from a list of attributes, splitting it into +/// the first paragraph (summary) and the remaining paragraphs (description). +/// Does not parse `#[example(...)]`; use [`parse_doc_full`] for that. +pub fn parse_doc(attrs: &[Attribute]) -> DocIr { + let lines = collect_doc_lines(attrs); + split_doc(&lines) +} + +/// Like [`parse_doc`] but also collects `#[example(...)]` entries. +pub fn parse_doc_full(attrs: &[Attribute]) -> Result { + let mut doc = parse_doc(attrs); + doc.examples = parse_examples(attrs)?; + Ok(doc) +} + +/// Collects `#[example(title = "...", body = "...")]` entries (repeatable). +fn parse_examples(attrs: &[Attribute]) -> Result, Error> { + let mut out = Vec::new(); + for attr in attrs { + if attr.path().is_ident("example") { + out.push(parse_example_attr(attr)?); + } + } + Ok(out) +} + +fn parse_example_attr(attr: &Attribute) -> Result { + let exprs = parse_attr_exprs(attr)?; + let mut title = String::new(); + let mut body = None; + let mut seen = SeenKeys::default(); + for expr in exprs.iter() { + let Expr::Assign(assign) = expr else { + return Err(Error::new( + expr.span(), + "expected `title = \"...\"` / `body = \"...\"` in #[example(...)]", + )); + }; + let key = match &*assign.left { + Expr::Path(p) if p.path.get_ident().is_some() => p.path.get_ident().unwrap().clone(), + other => { + return Err(Error::new( + other.span(), + "expected an identifier on the left of `=`", + )); + } + }; + seen.insert(&key)?; + match key.to_string().as_str() { + "title" => title = expr_str(&assign.right, "title")?, + "body" => body = Some(expr_str(&assign.right, "body")?), + other => { + return Err(Error::new( + assign.left.span(), + format!("unknown #[example] key `{other}`; expected `title` or `body`"), + )); + } + } + } + let body = body.ok_or_else(|| Error::new(attr.span(), "#[example] is missing `body`"))?; + Ok(ExampleIr { title, body }) +} + +/// Returns the raw doc lines (one per `#[doc = "..."]`), each with a single +/// leading space trimmed (rustdoc convention for `/// text`). +fn collect_doc_lines(attrs: &[Attribute]) -> Vec { + let mut lines = Vec::new(); + for attr in attrs { + if !attr.path().is_ident("doc") { + continue; + } + if let Meta::NameValue(nv) = &attr.meta + && let Expr::Lit(ExprLit { + lit: Lit::Str(s), .. + }) = &nv.value + { + let value = s.value(); + lines.push(value.strip_prefix(' ').unwrap_or(&value).to_string()); + } + } + lines +} + +fn split_doc(lines: &[String]) -> DocIr { + // Drop leading/trailing blank lines. + let trimmed: Vec<&String> = { + let start = lines.iter().position(|l| !l.trim().is_empty()); + let end = lines.iter().rposition(|l| !l.trim().is_empty()); + match (start, end) { + (Some(s), Some(e)) => lines[s..=e].iter().collect(), + _ => Vec::new(), + } + }; + + if trimmed.is_empty() { + return DocIr::default(); + } + + // Summary is the first blank-line-delimited paragraph, joined into one line. + let mut summary_lines = Vec::new(); + let mut idx = 0; + while idx < trimmed.len() && !trimmed[idx].trim().is_empty() { + summary_lines.push(trimmed[idx].trim()); + idx += 1; + } + let summary = summary_lines.join(" ").trim().to_string(); + + // Skip blank separator lines before the description. + while idx < trimmed.len() && trimmed[idx].trim().is_empty() { + idx += 1; + } + let description = trimmed[idx..] + .iter() + .map(|l| l.as_str()) + .collect::>() + .join("\n") + .trim_end() + .to_string(); + + DocIr { + summary, + description, + examples: Vec::new(), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn doc_attrs(src: &str) -> Vec { + // Wrap the doc lines around a dummy item so we can parse real attributes. + let item: syn::ItemFn = syn::parse_str(&format!("{src}\nfn f() {{}}")).unwrap(); + item.attrs + } + + #[test] + fn empty_doc() { + let d = parse_doc(&[]); + assert_eq!(d, DocIr::default()); + } + + #[test] + fn summary_only() { + let attrs = doc_attrs("/// Search files for a regex pattern."); + let d = parse_doc(&attrs); + assert_eq!(d.summary, "Search files for a regex pattern."); + assert_eq!(d.description, ""); + } + + #[test] + fn summary_and_description() { + let attrs = doc_attrs( + "/// Record changes to the repository.\n///\n/// The long form.\n/// Second line.", + ); + let d = parse_doc(&attrs); + assert_eq!(d.summary, "Record changes to the repository."); + assert_eq!(d.description, "The long form.\nSecond line."); + } + + #[test] + fn examples_are_collected() { + let item: syn::ItemFn = syn::parse_str( + "/// Summary.\n#[example(title = \"basic\", body = \"grep foo\")]\n#[example(body = \"grep -i foo\")]\nfn f() {}", + ) + .unwrap(); + let d = parse_doc_full(&item.attrs).unwrap(); + assert_eq!(d.summary, "Summary."); + assert_eq!(d.examples.len(), 2); + assert_eq!(d.examples[0].title, "basic"); + assert_eq!(d.examples[0].body, "grep foo"); + assert_eq!(d.examples[1].title, ""); + assert_eq!(d.examples[1].body, "grep -i foo"); + } + + #[test] + fn example_without_body_is_error() { + let item: syn::ItemFn = syn::parse_str("#[example(title = \"x\")]\nfn f() {}").unwrap(); + let err = parse_doc_full(&item.attrs).unwrap_err(); + assert!(err.to_string().contains("missing `body`")); + } + + #[test] + fn multiline_summary_is_joined() { + let attrs = doc_attrs("/// Search files\n/// for a pattern.\n///\n/// Details here."); + let d = parse_doc(&attrs); + assert_eq!(d.summary, "Search files for a pattern."); + assert_eq!(d.description, "Details here."); + } +} diff --git a/sdks/rust/golem-rust-macro/src/tool/helpers.rs b/sdks/rust/golem-rust-macro/src/tool/helpers.rs new file mode 100644 index 0000000000..31c871c75c --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/helpers.rs @@ -0,0 +1,218 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Small literal-extraction helpers shared by the tool attribute parsers. + +use std::collections::BTreeSet; +use syn::spanned::Spanned; +use syn::{Error, Expr, ExprArray, ExprLit, Lit, Token}; + +/// Tracks the keyword keys seen within a single helper attribute so that a +/// repeated key produces a clean compile error instead of silently keeping the +/// last value. Every kwarg-style tool parser (`#[arg]`, `#[command]`, +/// `#[result]`, `#[example]`, `#[tool_error]`) records each key through this. +#[derive(Default)] +pub struct SeenKeys(BTreeSet); + +impl SeenKeys { + /// Records `key`, returning a `duplicate key` error on its second occurrence. + pub fn insert(&mut self, key: &syn::Ident) -> Result<(), Error> { + if !self.0.insert(key.to_string()) { + return Err(Error::new(key.span(), format!("duplicate key `{key}`"))); + } + Ok(()) + } +} + +/// Returns `true` if `expr` is a metadata-time literal: a literal, a negated +/// numeric literal, or an array/tuple/parenthesized group built only from such +/// literals. These are the only forms that can be interpreted into a schema +/// value at metadata-synthesis time, used by `#[arg(default = …)]` and the +/// literal side of a `value_is(…)` constraint ref. +pub fn is_metadata_literal(expr: &Expr) -> bool { + match expr { + // Only the literal kinds that map onto a schema value: string, integer, + // float, bool, and char. Byte strings, byte, and C-string literals are + // not supported metadata literals. + Expr::Lit(ExprLit { lit, .. }) => matches!( + lit, + Lit::Str(_) | Lit::Int(_) | Lit::Float(_) | Lit::Bool(_) | Lit::Char(_) + ), + // Unary negation is only meaningful on a numeric literal (`-5`, `-1.5`); + // `-"x"` / `-true` are not literals. + Expr::Unary(u) if matches!(u.op, syn::UnOp::Neg(_)) => matches!( + &*u.expr, + Expr::Lit(ExprLit { + lit: Lit::Int(_) | Lit::Float(_), + .. + }) + ), + Expr::Group(g) => is_metadata_literal(&g.expr), + Expr::Paren(p) => is_metadata_literal(&p.expr), + Expr::Array(a) => a.elems.iter().all(is_metadata_literal), + Expr::Tuple(t) => t.elems.iter().all(is_metadata_literal), + _ => false, + } +} + +/// Errors unless `expr` is a metadata-time literal (see [`is_metadata_literal`]). +pub fn require_metadata_literal(expr: &Expr, what: &str) -> Result<(), Error> { + if is_metadata_literal(expr) { + Ok(()) + } else { + Err(Error::new( + expr.span(), + format!( + "{what} must be a literal value (string, number, bool, char, or an array/tuple of literals)" + ), + )) + } +} + +/// Extracts a string literal value from an expression. +pub fn expr_str(expr: &Expr, what: &str) -> Result { + match expr { + Expr::Lit(ExprLit { + lit: Lit::Str(s), .. + }) => Ok(s.value()), + other => Err(Error::new( + other.span(), + format!("{what} must be a string literal"), + )), + } +} + +/// Extracts a boolean literal value from an expression. +pub fn expr_bool(expr: &Expr, what: &str) -> Result { + match expr { + Expr::Lit(ExprLit { + lit: Lit::Bool(b), .. + }) => Ok(b.value), + other => Err(Error::new( + other.span(), + format!("{what} must be a boolean literal"), + )), + } +} + +/// Extracts a `char` literal value from an expression. +pub fn expr_char(expr: &Expr, what: &str) -> Result { + match expr { + Expr::Lit(ExprLit { + lit: Lit::Char(c), .. + }) => Ok(c.value()), + other => Err(Error::new( + other.span(), + format!("{what} must be a character literal"), + )), + } +} + +/// Extracts a non-negative integer literal value from an expression. +pub fn expr_u32(expr: &Expr, what: &str) -> Result { + match expr { + Expr::Lit(ExprLit { + lit: Lit::Int(i), .. + }) => i.base10_parse::(), + other => Err(Error::new( + other.span(), + format!("{what} must be a non-negative integer literal"), + )), + } +} + +/// Extracts a `u8` integer literal value from an expression. +pub fn expr_u8(expr: &Expr, what: &str) -> Result { + match expr { + Expr::Lit(ExprLit { + lit: Lit::Int(i), .. + }) => i.base10_parse::(), + other => Err(Error::new( + other.span(), + format!("{what} must be an integer literal in 0..=255"), + )), + } +} + +/// Extracts an array of string literals (`["a", "b"]`) from an expression. +pub fn expr_str_array(expr: &Expr, what: &str) -> Result, Error> { + match expr { + Expr::Array(ExprArray { elems, .. }) => elems + .iter() + .map(|e| expr_str(e, &format!("each entry of {what}"))) + .collect(), + other => Err(Error::new( + other.span(), + format!("{what} must be an array of string literals"), + )), + } +} + +/// Parses the comma-separated argument list of a helper attribute +/// (`#[arg(...)]`, `#[command(...)]`, ...) into a sequence of expressions. +pub fn parse_attr_exprs( + attr: &syn::Attribute, +) -> Result, Error> { + let parser = syn::punctuated::Punctuated::::parse_terminated; + attr.parse_args_with(parser) +} + +/// Converts a Rust identifier (`snake_case`, `camelCase`, or `PascalCase`) to +/// the canonical kebab-case used for every tool-facing name, matching the WIT +/// identifier regex `^[a-z][a-z0-9]*(-[a-z0-9]+)*$`. Acronym runs collapse +/// (`HTTPServer` -> `http-server`) and underscores become single dashes. +pub fn to_kebab_case(ident: &str) -> String { + let chars: Vec = ident.chars().collect(); + let mut out = String::new(); + for (i, &c) in chars.iter().enumerate() { + if c == '_' || c == '-' { + if !out.is_empty() && !out.ends_with('-') { + out.push('-'); + } + continue; + } + if c.is_ascii_uppercase() { + let prev = if i > 0 { Some(chars[i - 1]) } else { None }; + let next = chars.get(i + 1).copied(); + let boundary = match (prev, next) { + (Some(p), _) if p.is_ascii_lowercase() || p.is_ascii_digit() => true, + (Some(p), Some(n)) if p.is_ascii_uppercase() && n.is_ascii_lowercase() => true, + _ => false, + }; + if boundary && !out.is_empty() && !out.ends_with('-') { + out.push('-'); + } + out.push(c.to_ascii_lowercase()); + } else { + out.push(c); + } + } + out +} + +#[cfg(test)] +mod tests { + use super::to_kebab_case; + + #[test] + fn kebab_cases() { + assert_eq!(to_kebab_case("Grep"), "grep"); + assert_eq!(to_kebab_case("BadPattern"), "bad-pattern"); + assert_eq!(to_kebab_case("case_sensitive"), "case-sensitive"); + assert_eq!(to_kebab_case("HTTPServer"), "http-server"); + assert_eq!(to_kebab_case("parseHTML"), "parse-html"); + assert_eq!(to_kebab_case("remote"), "remote"); + assert_eq!(to_kebab_case("log2"), "log2"); + } +} diff --git a/sdks/rust/golem-rust-macro/src/tool/implementation.rs b/sdks/rust/golem-rust-macro/src/tool/implementation.rs new file mode 100644 index 0000000000..178badf510 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/implementation.rs @@ -0,0 +1,39 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Minimal `#[tool_implementation]` entry point. +//! +//! This only injects the hidden `tool_implementation_annotation` item that +//! satisfies the required trait item emitted by `#[tool_definition]`, making the +//! attribute a registration trigger. The `#[ctor]` that registers the tool's +//! metadata is added later. + +use proc_macro::TokenStream; +use quote::quote; +use syn::{ImplItem, ItemImpl}; + +pub fn tool_implementation_impl(_attrs: TokenStream, item: TokenStream) -> TokenStream { + let mut item_impl = syn::parse_macro_input!(item as ItemImpl); + + let annotation: ImplItem = syn::parse_quote! { + #[doc(hidden)] + fn tool_implementation_annotation() where Self: Sized {} + }; + item_impl.items.push(annotation); + + quote! { + #item_impl + } + .into() +} diff --git a/sdks/rust/golem-rust-macro/src/tool/ir.rs b/sdks/rust/golem-rust-macro/src/tool/ir.rs new file mode 100644 index 0000000000..c38317b553 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/ir.rs @@ -0,0 +1,319 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Intermediate representation produced by tool attribute parsing. +//! +//! This module is a faithful, type-resolution-free representation of the tool +//! authoring attributes (`#[tool_definition]`, `#[arg]`, `#[command]`, +//! `#[constraint]`, `#[result]`, `#[derive(ToolError)]`). It captures *what the +//! author wrote*; turning the IR plus the trait method signatures into the +//! runtime `ExtendedToolType` metadata is done during metadata synthesis. + +use syn::{Expr, Ident, Path, ReturnType, Type}; + +/// A full `#[tool_definition]` trait, lowered to IR. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ToolDefinitionIr { + /// The trait identifier; the tool name is `kebab(ident)` (resolved during metadata synthesis). + pub trait_ident: Ident, + /// Optional `version = "..."` from the `#[tool_definition(...)]` attribute. + pub version: Option, + /// Doc comment on the trait. + pub doc: DocIr, + /// One entry per trait method, in declaration order. + pub commands: Vec, +} + +/// A single trait method, lowered to IR. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct CommandIr { + /// The method identifier; the command name is `kebab(ident)` (resolved during metadata synthesis). + pub method_ident: Ident, + /// Doc comment on the method. + pub doc: DocIr, + /// `#[command(aliases = [...])]`. + pub aliases: Vec, + /// `#[command(name = "...")]` override for the command name. + pub name_override: Option, + /// `#[command(annotations(...))]`. + pub annotations: Option, + /// `#[command(subtree = path::To::Trait)]`, if this method grafts a subtree. + pub subtree: Option, + /// Typed method parameters, in declaration order (the `&self` receiver is + /// excluded). Metadata synthesis projects these onto positionals/options/flags/streams + /// using each parameter's Rust type. + pub params: Vec, + /// The method return type, used during metadata synthesis to derive the result and (for + /// `Result`) the error cases. + pub output: ReturnType, + /// `#[arg(...)]` entries, in declaration order. + pub args: Vec, + /// `#[constraint(...)]` entries, in declaration order. + pub constraints: Vec, + /// `#[result(...)]`, if present. + pub result: Option, +} + +/// A typed method parameter. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ParamIr { + pub ident: Ident, + pub ty: Type, +} + +/// `#[command(subtree = path, name = "...")]`. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct SubtreeIr { + /// Path to the child `#[tool_definition]` trait. + pub path: Path, + /// Optional command-name override for the grafted node. + pub name_override: Option, +} + +/// `#[command(annotations(destructive = .., read_only = .., idempotent = .., open_world = ..))]`. +#[derive(Debug, Clone, PartialEq, Eq, Default)] +pub struct CommandAnnotationsIr { + pub read_only: Option, + pub destructive: Option, + pub idempotent: Option, + pub open_world: Option, +} + +/// Where an argument lives in the command surface, as written in the leading +/// ` = ""` form of `#[arg(...)]`. `None` means the placement +/// is inferred from the parameter type during metadata synthesis. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum ArgPlacement { + Global, + Positional, + Option, + Flag, + Tail, +} + +/// `kind = "flag" | "count-flag"` modifier (used mostly on global args to say a +/// global is a flag/count-flag rather than an option). +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum ArgSubKind { + Flag, + CountFlag, +} + +/// `repeatable = "repeated" | "delimited" | "either"`. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum RepeatableMode { + Repeated, + Delimited, + Either, +} + +/// Path `kind = "file" | "dir" | "any"`. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum PathKindIr { + File, + Directory, + Any, +} + +/// Path `direction = "input" | "output" | "inout"`. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum PathDirectionIr { + Input, + Output, + InOut, +} + +/// A single `#[arg(...)]` entry, fully parsed but not yet projected onto a +/// schema type (that is metadata synthesis, which has the parameter's Rust type). +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ArgIr { + /// Parameter identifier this `#[arg]` binds to. + pub param: Ident, + /// Explicit placement override, or `None` to infer from the type. + pub placement: Option, + /// `kind = "flag" | "count-flag"`. + pub sub_kind: Option, + + // --- option/flag surface --- + pub short: Option, + pub aliases: Vec, + pub env: Option, + pub required: Option, + pub negatable: Option, + pub optional_scalar: bool, + pub repeatable: Option, + pub delim: Option, + /// Raw `default = ` literal; resolved against the parameter type during metadata synthesis. + pub default: Option, + + // --- tail positional --- + pub separator: Option, + pub verbatim: bool, + pub accepts_stdio: bool, + + // --- text refinement --- + pub regex: Option, + pub min_length: Option, + pub max_length: Option, + + // --- path refinement --- + pub path_kind: Option, + pub direction: Option, + pub mime: Option>, + + // --- url refinement --- + pub schemes: Option>, + + // --- raw `min` / `max` (raw exprs) --- + // Their meaning depends on the *final* placement and sub-kind, which may be + // inferred from the parameter type during metadata synthesis (tail occurrence counts vs. + // count-flag max vs. numeric bound), so they are not classified here. + pub raw_min: Option, + pub raw_max: Option, + + // --- numeric refinement (raw exprs; numeric repr known during metadata synthesis) --- + pub bounds: Option<(Expr, Expr)>, + pub unit: Option, + + // --- documentation --- + pub doc: Option, + pub value_name: Option, +} + +impl ArgIr { + pub fn new(param: Ident) -> Self { + ArgIr { + param, + placement: None, + sub_kind: None, + short: None, + aliases: Vec::new(), + env: None, + required: None, + negatable: None, + optional_scalar: false, + repeatable: None, + delim: None, + default: None, + separator: None, + verbatim: false, + accepts_stdio: false, + regex: None, + min_length: None, + max_length: None, + path_kind: None, + direction: None, + mime: None, + schemes: None, + raw_min: None, + raw_max: None, + bounds: None, + unit: None, + doc: None, + value_name: None, + } + } +} + +/// `all`/`any` quantifier in `implies`/`forbids`. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum QuantifierIr { + All, + Any, +} + +/// A reference to an argument in a constraint, by its tool-facing name. +/// `value_is` carries the raw literal expression (resolved during metadata synthesis). +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum RefIr { + Present(String), + ValueIs { name: String, value: Expr }, +} + +/// A single `#[constraint(...)]` entry. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum ConstraintIr { + RequiresAll(Vec), + AllOrNone(Vec), + RequiresAny(Vec), + MutexGroups(Vec>), + Implies { + lhs_quant: QuantifierIr, + lhs: Vec, + rhs_quant: QuantifierIr, + rhs: Vec, + }, + Forbids { + lhs_quant: QuantifierIr, + lhs: Vec, + rhs: Vec, + }, +} + +/// `#[result(formatters = [...], default = "...")]`. +#[derive(Debug, Clone, PartialEq, Eq, Default)] +pub struct ResultIr { + pub formatters: Vec, + pub default_formatter: Option, +} + +/// Doc comment, split into a summary and a longer description, plus any +/// `#[example(...)]` entries. +#[derive(Debug, Clone, PartialEq, Eq, Default)] +pub struct DocIr { + pub summary: String, + pub description: String, + pub examples: Vec, +} + +/// A `#[example(title = "...", body = "...")]` entry, mirroring the wire +/// `golem:tool` `example` record. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ExampleIr { + pub title: String, + pub body: String, +} + +/// `#[derive(ToolError)]` enum, lowered to IR. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ToolErrorIr { + pub enum_ident: Ident, + pub variants: Vec, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum ErrorKindIr { + UsageError, + RuntimeError, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ToolErrorVariantIr { + pub variant_ident: Ident, + pub doc: DocIr, + pub kind: ErrorKindIr, + pub exit_code: u8, + /// Payload schema source: unit variants carry no payload, single-field + /// variants carry the field's type (resolved to a `SchemaType` during metadata synthesis). + pub payload: ToolErrorPayloadIr, +} + +/// The payload of a `#[derive(ToolError)]` variant. Variants with two or more +/// fields are rejected at parse time (no synthetic record is generated). +#[derive(Debug, Clone, PartialEq, Eq)] +#[allow(clippy::large_enum_variant)] +pub enum ToolErrorPayloadIr { + None, + Single { ty: Type }, +} diff --git a/sdks/rust/golem-rust-macro/src/tool/mod.rs b/sdks/rust/golem-rust-macro/src/tool/mod.rs new file mode 100644 index 0000000000..393de132e4 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/mod.rs @@ -0,0 +1,32 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Tool authoring macros (`#[tool_definition]`, `#[tool_implementation]`, +//! `#[derive(ToolError)]`) and the attribute IR they parse into. + +pub use definition::tool_definition_impl; +pub use implementation::tool_implementation_impl; +pub use tool_error::derive_tool_error_impl; + +mod arg; +mod command; +mod constraint; +mod definition; +mod doc; +mod helpers; +mod implementation; +pub mod ir; +mod result; +mod synthesis; +mod tool_error; diff --git a/sdks/rust/golem-rust-macro/src/tool/result.rs b/sdks/rust/golem-rust-macro/src/tool/result.rs new file mode 100644 index 0000000000..9ef803fb2d --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/result.rs @@ -0,0 +1,98 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Parser for the `#[result(...)]` helper attribute. + +use crate::tool::helpers::{SeenKeys, expr_str, expr_str_array, parse_attr_exprs}; +use crate::tool::ir::ResultIr; +use syn::spanned::Spanned; +use syn::{Attribute, Error, Expr}; + +/// Parses a single `#[result(formatters = [...], default = "...")]` attribute. +pub fn parse_result(attr: &Attribute) -> Result { + let exprs = parse_attr_exprs(attr)?; + let mut ir = ResultIr::default(); + let mut seen = SeenKeys::default(); + for expr in exprs.iter() { + let Expr::Assign(assign) = expr else { + return Err(Error::new( + expr.span(), + "expected `formatters = [...]` or `default = \"...\"` in #[result(...)]", + )); + }; + let key = assign_left_ident(&assign.left)?; + seen.insert(&key)?; + match key.to_string().as_str() { + "formatters" => ir.formatters = expr_str_array(&assign.right, "formatters")?, + "default" => ir.default_formatter = Some(expr_str(&assign.right, "default")?), + other => { + return Err(Error::new( + key.span(), + format!("unknown #[result] key `{other}`"), + )); + } + } + } + Ok(ir) +} + +fn assign_left_ident(left: &Expr) -> Result { + if let Expr::Path(p) = left + && let Some(ident) = p.path.get_ident() + { + return Ok(ident.clone()); + } + Err(Error::new( + left.span(), + "expected an identifier on the left of `=`", + )) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn result(src: &str) -> Result { + let item: syn::ItemStruct = syn::parse_str(&format!("{src}\nstruct S;")).unwrap(); + parse_result(&item.attrs[0]) + } + + #[test] + fn formatters_and_default() { + let r = + result(r#"#[result(formatters = ["human", "porcelain", "json"], default = "human")]"#) + .unwrap(); + assert_eq!(r.formatters, vec!["human", "porcelain", "json"]); + assert_eq!(r.default_formatter.as_deref(), Some("human")); + } + + #[test] + fn formatters_only() { + let r = result(r#"#[result(formatters = ["oneline", "short"])]"#).unwrap(); + assert_eq!(r.formatters.len(), 2); + assert_eq!(r.default_formatter, None); + } + + #[test] + fn unknown_key_is_error() { + let err = result(r#"#[result(bogus = "x")]"#).unwrap_err(); + assert!(err.to_string().contains("unknown #[result] key")); + } + + #[test] + fn duplicate_result_key_is_error() { + let err = result(r#"#[result(default = "human", default = "json")]"#).unwrap_err(); + assert!(err.to_string().contains("duplicate")); + } +} diff --git a/sdks/rust/golem-rust-macro/src/tool/synthesis.rs b/sdks/rust/golem-rust-macro/src/tool/synthesis.rs new file mode 100644 index 0000000000..0c0c486265 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/synthesis.rs @@ -0,0 +1,67 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Shared token emission helpers used to synthesize the runtime tool metadata +//! (`ExtendedToolType`, `ExtendedErrorCase`, ...) from the parsed IR. + +use crate::tool::ir::{DocIr, ErrorKindIr}; +use proc_macro2::TokenStream; +use quote::quote; +use syn::Type; + +/// Emits a `golem_rust::agentic::Doc` value from a [`DocIr`]. +pub fn doc_tokens(doc: &DocIr) -> TokenStream { + let summary = &doc.summary; + let description = &doc.description; + let examples = doc.examples.iter().map(|ex| { + let title = &ex.title; + let body = &ex.body; + quote! { + golem_rust::agentic::Example { + title: #title.to_string(), + body: #body.to_string(), + } + } + }); + quote! { + golem_rust::agentic::Doc { + summary: #summary.to_string(), + description: #description.to_string(), + examples: vec![ #(#examples),* ], + } + } +} + +/// Emits a `wire::ErrorKind` value. +pub fn error_kind_tokens(kind: ErrorKindIr) -> TokenStream { + match kind { + ErrorKindIr::UsageError => quote! { + golem_rust::golem_agentic::golem::tool::common::ErrorKind::UsageError + }, + ErrorKindIr::RuntimeError => quote! { + golem_rust::golem_agentic::golem::tool::common::ErrorKind::RuntimeError + }, + } +} + +/// Emits a `golem_rust::agentic::SchemaGraph` for a Rust type by asking its +/// `Schema` implementation at runtime. Used for positionals, options, results, +/// and error payloads (anything that contributes a value type to the tool). +pub fn schema_graph_tokens(ty: &Type) -> TokenStream { + quote! { + <#ty as golem_rust::agentic::Schema>::get_type() + .get_schema_graph() + .expect("tool value type must be a value schema, not an auto-injected type") + } +} diff --git a/sdks/rust/golem-rust-macro/src/tool/tool_error.rs b/sdks/rust/golem-rust-macro/src/tool/tool_error.rs new file mode 100644 index 0000000000..4cd3b9c429 --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/tool_error.rs @@ -0,0 +1,475 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! `#[derive(ToolError)]` with the `#[tool_error(kind, exit_code)]` helper +//! attribute. Parsing produces the [`ToolErrorIr`], from which an +//! `impl ToolErrorSchema` exposing the per-variant error cases is synthesized. + +use crate::tool::doc::parse_doc_full; +use crate::tool::helpers::{SeenKeys, expr_str, expr_u8, to_kebab_case}; +use crate::tool::ir::{ErrorKindIr, ToolErrorIr, ToolErrorPayloadIr, ToolErrorVariantIr}; +use crate::tool::synthesis::{doc_tokens, error_kind_tokens, schema_graph_tokens}; +use proc_macro::TokenStream; +use quote::quote; +use syn::spanned::Spanned; +use syn::{Attribute, Data, DeriveInput, Error, Expr, Fields}; + +pub fn derive_tool_error_impl(input: TokenStream) -> TokenStream { + let derive_input = syn::parse_macro_input!(input as DeriveInput); + match parse_tool_error(&derive_input) { + Ok(ir) => synthesize_tool_error(&ir), + Err(err) => err.to_compile_error().into(), + } +} + +/// Builds `impl golem_rust::agentic::ToolErrorSchema for ` from the IR. +fn synthesize_tool_error(ir: &ToolErrorIr) -> TokenStream { + let enum_ident = &ir.enum_ident; + let cases = ir.variants.iter().map(|variant| { + let name = to_kebab_case(&variant.variant_ident.to_string()); + let doc = doc_tokens(&variant.doc); + let kind = error_kind_tokens(variant.kind); + let exit_code = variant.exit_code; + let payload = match &variant.payload { + ToolErrorPayloadIr::None => quote! { None }, + ToolErrorPayloadIr::Single { ty } => { + let graph = schema_graph_tokens(ty); + quote! { Some(#graph) } + } + }; + quote! { + golem_rust::agentic::ExtendedErrorCase { + name: #name.to_string(), + doc: #doc, + kind: #kind, + exit_code: #exit_code, + payload: #payload, + } + } + }); + quote! { + impl golem_rust::agentic::ToolErrorSchema for #enum_ident { + fn error_cases() -> ::std::vec::Vec { + vec![ #(#cases),* ] + } + } + } + .into() +} + +/// Parses a `#[derive(ToolError)]` enum into its IR. +pub fn parse_tool_error(input: &DeriveInput) -> Result { + let Data::Enum(data) = &input.data else { + return Err(Error::new( + input.span(), + "#[derive(ToolError)] can only be applied to enums", + )); + }; + + // `#[tool_error(...)]` describes a single error case, so it belongs on a + // variant; on the enum itself it would be silently ignored. `#[example]` is + // collected per variant, so it is likewise misplaced on the enum. + if let Some(attr) = find_tool_error_attr(&input.attrs)? { + return Err(Error::new( + attr.span(), + "#[tool_error(...)] may only be used on variants of a #[derive(ToolError)] enum", + )); + } + if let Some(attr) = find_example_attr(&input.attrs) { + return Err(Error::new( + attr.span(), + "#[example] may only be used on variants of a #[derive(ToolError)] enum", + )); + } + + let mut variants = Vec::new(); + for variant in &data.variants { + // A `#[tool_error(...)]` or `#[example]` on a variant's field would be + // silently ignored. + for field in variant.fields.iter() { + if let Some(attr) = find_tool_error_attr(&field.attrs)? { + return Err(Error::new( + attr.span(), + "#[tool_error(...)] may only be used on variants of a #[derive(ToolError)] enum", + )); + } + if let Some(attr) = find_example_attr(&field.attrs) { + return Err(Error::new( + attr.span(), + "#[example] may only be used on variants of a #[derive(ToolError)] enum", + )); + } + } + let attr = find_tool_error_attr(&variant.attrs)?.ok_or_else(|| { + Error::new( + variant.span(), + format!( + "variant `{}` is missing #[tool_error(kind = \"...\", exit_code = ...)]", + variant.ident + ), + ) + })?; + let (kind, exit_code) = parse_tool_error_attr(attr)?; + let payload = parse_payload(&variant.fields)?; + variants.push(ToolErrorVariantIr { + variant_ident: variant.ident.clone(), + doc: parse_doc_full(&variant.attrs)?, + kind, + exit_code, + payload, + }); + } + + Ok(ToolErrorIr { + enum_ident: input.ident.clone(), + variants, + }) +} + +/// Maps a variant's fields to its payload: unit / zero fields carry no payload, +/// exactly one field carries that field's type, and two or more fields are a +/// compile error (no synthetic record is generated). +fn parse_payload(fields: &Fields) -> Result { + match fields { + Fields::Unit => Ok(ToolErrorPayloadIr::None), + Fields::Unnamed(f) if f.unnamed.is_empty() => Ok(ToolErrorPayloadIr::None), + Fields::Named(f) if f.named.is_empty() => Ok(ToolErrorPayloadIr::None), + Fields::Unnamed(f) if f.unnamed.len() == 1 => Ok(ToolErrorPayloadIr::Single { + ty: f.unnamed.first().unwrap().ty.clone(), + }), + Fields::Named(f) if f.named.len() == 1 => Ok(ToolErrorPayloadIr::Single { + ty: f.named.first().unwrap().ty.clone(), + }), + other => Err(Error::new( + other.span(), + "a ToolError variant may have at most one field; wrap multiple values in a struct or tuple type", + )), + } +} + +/// Finds an `#[example(...)]` attribute, used to reject it in positions where +/// the derive does not collect examples (the enum itself or a variant's field). +fn find_example_attr(attrs: &[Attribute]) -> Option<&Attribute> { + attrs.iter().find(|a| a.path().is_ident("example")) +} + +/// Finds the single `#[tool_error(...)]` attribute on a variant, rejecting a +/// second occurrence so it cannot be silently ignored. +fn find_tool_error_attr(attrs: &[Attribute]) -> Result, Error> { + let mut found: Option<&Attribute> = None; + for attr in attrs { + if attr.path().is_ident("tool_error") { + if found.is_some() { + return Err(Error::new( + attr.span(), + "duplicate #[tool_error(...)]; a variant may have at most one", + )); + } + found = Some(attr); + } + } + Ok(found) +} + +/// Parses `#[tool_error(kind = "...", exit_code = N)]`. +fn parse_tool_error_attr(attr: &Attribute) -> Result<(ErrorKindIr, u8), Error> { + use syn::punctuated::Punctuated; + let parser = Punctuated::::parse_terminated; + let exprs = attr.parse_args_with(parser)?; + + let mut kind = None; + let mut exit_code = None; + let mut seen = SeenKeys::default(); + for expr in exprs.iter() { + let Expr::Assign(assign) = expr else { + return Err(Error::new( + expr.span(), + "expected `kind = \"...\"` and `exit_code = N`", + )); + }; + let key = assign_left_ident(&assign.left)?; + seen.insert(&key)?; + match key.to_string().as_str() { + "kind" => kind = Some(parse_kind(&assign.right)?), + "exit_code" => exit_code = Some(expr_u8(&assign.right, "exit_code")?), + other => { + return Err(Error::new( + key.span(), + format!("unknown #[tool_error] key `{other}`"), + )); + } + } + } + + let kind = kind.ok_or_else(|| Error::new(attr.span(), "#[tool_error] is missing `kind`"))?; + let exit_code = + exit_code.ok_or_else(|| Error::new(attr.span(), "#[tool_error] is missing `exit_code`"))?; + Ok((kind, exit_code)) +} + +fn parse_kind(expr: &Expr) -> Result { + match expr_str(expr, "kind")?.as_str() { + "usage" | "usage-error" => Ok(ErrorKindIr::UsageError), + "runtime" | "runtime-error" => Ok(ErrorKindIr::RuntimeError), + other => Err(Error::new( + expr.span(), + format!("invalid error kind `{other}`; expected `usage-error` or `runtime-error`"), + )), + } +} + +fn assign_left_ident(left: &Expr) -> Result { + if let Expr::Path(p) = left + && let Some(ident) = p.path.get_ident() + { + return Ok(ident.clone()); + } + Err(Error::new( + left.span(), + "expected an identifier on the left of `=`", + )) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn parse(src: &str) -> Result { + let input: DeriveInput = syn::parse_str(src).unwrap(); + parse_tool_error(&input) + } + + #[test] + fn parses_variants() { + let ir = parse( + r#" + enum GrepError { + #[tool_error(kind = "usage-error", exit_code = 2)] + BadPattern(String), + #[tool_error(kind = "runtime-error", exit_code = 1)] + Io(String), + } + "#, + ) + .unwrap(); + assert_eq!(ir.enum_ident.to_string(), "GrepError"); + assert_eq!(ir.variants.len(), 2); + assert_eq!(ir.variants[0].variant_ident.to_string(), "BadPattern"); + assert_eq!(ir.variants[0].kind, ErrorKindIr::UsageError); + assert_eq!(ir.variants[0].exit_code, 2); + assert_eq!(ir.variants[1].kind, ErrorKindIr::RuntimeError); + assert_eq!(ir.variants[1].exit_code, 1); + assert!(matches!( + ir.variants[0].payload, + ToolErrorPayloadIr::Single { .. } + )); + } + + #[test] + fn payload_shapes() { + let ir = parse( + r#" + enum E { + #[tool_error(kind = "usage-error", exit_code = 1)] + Unit, + #[tool_error(kind = "usage-error", exit_code = 1)] + Tuple(String), + #[tool_error(kind = "usage-error", exit_code = 1)] + Named { reason: String }, + } + "#, + ) + .unwrap(); + assert_eq!(ir.variants[0].payload, ToolErrorPayloadIr::None); + assert!(matches!( + ir.variants[1].payload, + ToolErrorPayloadIr::Single { .. } + )); + assert!(matches!( + ir.variants[2].payload, + ToolErrorPayloadIr::Single { .. } + )); + } + + #[test] + fn multi_field_variant_is_error() { + let err = parse( + r#" + enum E { + #[tool_error(kind = "usage-error", exit_code = 1)] + Bad { a: String, b: u32 }, + } + "#, + ) + .unwrap_err(); + assert!(err.to_string().contains("at most one field")); + } + + #[test] + fn legacy_kind_spellings() { + let ir = parse( + r#" + enum E { + #[tool_error(kind = "usage", exit_code = 129)] + A, + #[tool_error(kind = "runtime", exit_code = 128)] + B, + } + "#, + ) + .unwrap(); + assert_eq!(ir.variants[0].kind, ErrorKindIr::UsageError); + assert_eq!(ir.variants[1].kind, ErrorKindIr::RuntimeError); + } + + #[test] + fn variant_doc_is_captured() { + let ir = parse( + r#" + enum E { + /// The pattern was bad. + #[tool_error(kind = "usage-error", exit_code = 2)] + BadPattern, + } + "#, + ) + .unwrap(); + assert_eq!(ir.variants[0].doc.summary, "The pattern was bad."); + } + + #[test] + fn missing_attr_is_error() { + let err = parse( + r#" + enum E { + A, + } + "#, + ) + .unwrap_err(); + assert!(err.to_string().contains("missing #[tool_error")); + } + + #[test] + fn duplicate_tool_error_attr_is_error() { + let err = parse( + r#" + enum E { + #[tool_error(kind = "usage-error", exit_code = 1)] + #[tool_error(kind = "runtime-error", exit_code = 2)] + A, + } + "#, + ) + .unwrap_err(); + assert!(err.to_string().contains("duplicate") || err.to_string().contains("at most one")); + } + + #[test] + fn duplicate_tool_error_key_is_error() { + let err = parse( + r#" + enum E { + #[tool_error(kind = "usage-error", kind = "runtime-error", exit_code = 1)] + A, + } + "#, + ) + .unwrap_err(); + assert!(err.to_string().contains("duplicate")); + } + + #[test] + fn enum_level_tool_error_attr_is_error() { + let err = parse( + r#" + #[tool_error(kind = "runtime-error", exit_code = 9)] + enum E { + #[tool_error(kind = "usage-error", exit_code = 1)] + A, + } + "#, + ) + .unwrap_err(); + assert!(err.to_string().contains("may only be used on variants")); + } + + #[test] + fn field_level_tool_error_attr_is_error() { + let err = parse( + r#" + enum E { + #[tool_error(kind = "usage-error", exit_code = 1)] + A( + #[tool_error(kind = "runtime-error", exit_code = 2)] + String, + ), + } + "#, + ) + .unwrap_err(); + assert!(err.to_string().contains("may only be used on variants")); + } + + #[test] + fn misplaced_example_attr_in_tool_error_is_error() { + let enum_level_example_is_accepted = parse( + r#" + #[example(body = "ignored")] + enum E { + #[tool_error(kind = "usage-error", exit_code = 1)] + A, + } + "#, + ) + .is_ok(); + let field_level_example_is_accepted = parse( + r#" + enum E { + #[tool_error(kind = "usage-error", exit_code = 1)] + A( + #[example(body = "ignored")] + String, + ), + } + "#, + ) + .is_ok(); + + assert!( + !enum_level_example_is_accepted && !field_level_example_is_accepted, + "#[example] is accepted and silently ignored on ToolError enum/field positions" + ); + } + + #[test] + fn non_enum_is_error() { + let err = parse(r#"struct S { x: u32 }"#).unwrap_err(); + assert!(err.to_string().contains("can only be applied to enums")); + } + + #[test] + fn invalid_kind_is_error() { + let err = parse( + r#" + enum E { + #[tool_error(kind = "bogus", exit_code = 1)] + A, + } + "#, + ) + .unwrap_err(); + assert!(err.to_string().contains("invalid error kind")); + } +} diff --git a/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs index c8005bf968..cabf1bf216 100644 --- a/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs +++ b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs @@ -145,6 +145,12 @@ pub struct ExtendedErrorCase { pub payload: Option, } +/// Implemented by `#[derive(ToolError)]` enums. A tool method returning +/// `Result` reads its declared error cases from `E::error_cases()`. +pub trait ToolErrorSchema { + fn error_cases() -> Vec; +} + #[derive(Clone, Debug)] pub enum ExtendedRef { Present(String), diff --git a/sdks/rust/golem-rust/src/agentic/mod.rs b/sdks/rust/golem-rust/src/agentic/mod.rs index 881544c9f2..ae3e7c8ba9 100644 --- a/sdks/rust/golem-rust/src/agentic/mod.rs +++ b/sdks/rust/golem-rust/src/agentic/mod.rs @@ -25,6 +25,7 @@ pub use http::*; pub use multimodal::*; pub use resolved_agent::*; pub use schema::*; +pub use tool_literal::*; pub use tool_refinement::*; pub use tool_registry::{ get_all_tools, get_extended_tool_by_name, get_tool_by_name, register_tool, @@ -49,6 +50,7 @@ mod resolved_agent; mod schema; pub mod snapshot_auto; mod tool_impl; +mod tool_literal; mod tool_refinement; mod tool_registry; mod unstructured_binary; diff --git a/sdks/rust/golem-rust/src/agentic/tool_literal.rs b/sdks/rust/golem-rust/src/agentic/tool_literal.rs new file mode 100644 index 0000000000..d518bc17da --- /dev/null +++ b/sdks/rust/golem-rust/src/agentic/tool_literal.rs @@ -0,0 +1,317 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Interpretation of metadata-time literals (`#[arg(default = ...)]` and +//! `value_is(...)`) against their target type node, producing the +//! `SchemaValue` the tool model stores for option/positional defaults and +//! `value-is` constraint references. + +use crate::agentic::extended_tool_type::ToolBuildError; +use crate::schema::schema_value::TextValuePayload; +use crate::schema::{SchemaGraph, SchemaType, SchemaValue}; + +/// A literal written in a tool authoring attribute, captured before it is +/// interpreted against the referenced type node. The macro builds one of these +/// from the Rust attribute expression; the value type itself determines how it +/// is interpreted (e.g. a string against an `enum` type selects a case). +#[derive(Clone, Debug, PartialEq)] +pub enum ToolLiteral { + Bool(bool), + /// Integer literal, widened to `i128` so it can carry any signed or + /// unsigned target down to the concrete numeric type. + Int(i128), + Float(f64), + Char(char), + Str(String), + List(Vec), + Map(Vec<(ToolLiteral, ToolLiteral)>), +} + +/// Interprets `lit` against the root type of `graph` (resolving any leading +/// `Ref` indirections), returning the `SchemaValue` to store as a default or +/// `value-is` literal. +pub fn literal_to_schema_value( + graph: &SchemaGraph, + lit: &ToolLiteral, +) -> Result { + let root = graph.root.clone(); + interpret(graph, &root, lit) +} + +fn mismatch(ty: &SchemaType, lit: &ToolLiteral) -> ToolBuildError { + ToolBuildError::DefaultTypeMismatch(format!("literal {lit:?} is not valid for type {ty:?}")) +} + +fn interpret( + graph: &SchemaGraph, + ty: &SchemaType, + lit: &ToolLiteral, +) -> Result { + // Resolve through any number of `Ref` indirections first. + let resolved = graph + .resolve_ref(ty) + .map_err(|e| ToolBuildError::DefaultTypeMismatch(e.to_string()))?; + + match resolved { + SchemaType::Bool { .. } => match lit { + ToolLiteral::Bool(b) => Ok(SchemaValue::Bool(*b)), + _ => Err(mismatch(resolved, lit)), + }, + SchemaType::S8 { .. } => int_value(resolved, lit, i8::MIN as i128, i8::MAX as i128, |v| { + SchemaValue::S8(v as i8) + }), + SchemaType::S16 { .. } => { + int_value(resolved, lit, i16::MIN as i128, i16::MAX as i128, |v| { + SchemaValue::S16(v as i16) + }) + } + SchemaType::S32 { .. } => { + int_value(resolved, lit, i32::MIN as i128, i32::MAX as i128, |v| { + SchemaValue::S32(v as i32) + }) + } + SchemaType::S64 { .. } => { + int_value(resolved, lit, i64::MIN as i128, i64::MAX as i128, |v| { + SchemaValue::S64(v as i64) + }) + } + SchemaType::U8 { .. } => int_value(resolved, lit, 0, u8::MAX as i128, |v| { + SchemaValue::U8(v as u8) + }), + SchemaType::U16 { .. } => int_value(resolved, lit, 0, u16::MAX as i128, |v| { + SchemaValue::U16(v as u16) + }), + SchemaType::U32 { .. } => int_value(resolved, lit, 0, u32::MAX as i128, |v| { + SchemaValue::U32(v as u32) + }), + SchemaType::U64 { .. } => int_value(resolved, lit, 0, u64::MAX as i128, |v| { + SchemaValue::U64(v as u64) + }), + SchemaType::F32 { .. } => match lit { + ToolLiteral::Float(f) => Ok(SchemaValue::F32(*f as f32)), + ToolLiteral::Int(i) => Ok(SchemaValue::F32(*i as f32)), + _ => Err(mismatch(resolved, lit)), + }, + SchemaType::F64 { .. } => match lit { + ToolLiteral::Float(f) => Ok(SchemaValue::F64(*f)), + ToolLiteral::Int(i) => Ok(SchemaValue::F64(*i as f64)), + _ => Err(mismatch(resolved, lit)), + }, + SchemaType::Char { .. } => match lit { + ToolLiteral::Char(c) => Ok(SchemaValue::Char(*c)), + _ => Err(mismatch(resolved, lit)), + }, + SchemaType::String { .. } => match lit { + ToolLiteral::Str(s) => Ok(SchemaValue::String(s.clone())), + _ => Err(mismatch(resolved, lit)), + }, + SchemaType::Text { .. } => match lit { + ToolLiteral::Str(s) => Ok(SchemaValue::Text(TextValuePayload { + text: s.clone(), + language: None, + })), + _ => Err(mismatch(resolved, lit)), + }, + SchemaType::Path { .. } => match lit { + ToolLiteral::Str(s) => Ok(SchemaValue::Path { path: s.clone() }), + _ => Err(mismatch(resolved, lit)), + }, + SchemaType::Url { .. } => match lit { + ToolLiteral::Str(s) => Ok(SchemaValue::Url { url: s.clone() }), + _ => Err(mismatch(resolved, lit)), + }, + SchemaType::Enum { cases, .. } => match lit { + ToolLiteral::Str(s) => { + let case = cases.iter().position(|c| c == s).ok_or_else(|| { + ToolBuildError::DefaultTypeMismatch(format!( + "enum case {s:?} is not one of {cases:?}" + )) + })?; + Ok(SchemaValue::Enum { case: case as u32 }) + } + _ => Err(mismatch(resolved, lit)), + }, + SchemaType::Option { inner, .. } => { + let inner_value = interpret(graph, inner, lit)?; + Ok(SchemaValue::Option { + inner: Some(Box::new(inner_value)), + }) + } + SchemaType::List { element, .. } => match lit { + ToolLiteral::List(items) => { + let elements = items + .iter() + .map(|item| interpret(graph, element, item)) + .collect::>()?; + Ok(SchemaValue::List { elements }) + } + _ => Err(mismatch(resolved, lit)), + }, + SchemaType::Map { key, value, .. } => match lit { + ToolLiteral::Map(entries) => { + let entries = entries + .iter() + .map(|(k, v)| Ok((interpret(graph, key, k)?, interpret(graph, value, v)?))) + .collect::>()?; + Ok(SchemaValue::Map { entries }) + } + _ => Err(mismatch(resolved, lit)), + }, + _ => Err(ToolBuildError::DefaultTypeMismatch(format!( + "literals are not supported for type {resolved:?}" + ))), + } +} + +fn int_value( + ty: &SchemaType, + lit: &ToolLiteral, + min: i128, + max: i128, + build: impl FnOnce(i128) -> SchemaValue, +) -> Result { + match lit { + ToolLiteral::Int(i) => { + if *i < min || *i > max { + return Err(ToolBuildError::DefaultTypeMismatch(format!( + "integer literal {i} is out of range for {ty:?}" + ))); + } + Ok(build(*i)) + } + _ => Err(mismatch(ty, lit)), + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::schema::SchemaType; + use test_r::test; + + fn graph(root: SchemaType) -> SchemaGraph { + SchemaGraph::anonymous(root) + } + + #[test] + fn string_literal() { + let v = + literal_to_schema_value(&graph(SchemaType::string()), &ToolLiteral::Str("hi".into())) + .unwrap(); + assert_eq!(v, SchemaValue::String("hi".into())); + } + + #[test] + fn enum_case_by_name() { + let enum_ty = SchemaType::Enum { + cases: vec!["always".into(), "never".into(), "auto".into()], + metadata: Default::default(), + }; + let v = literal_to_schema_value(&graph(enum_ty), &ToolLiteral::Str("auto".into())).unwrap(); + assert_eq!(v, SchemaValue::Enum { case: 2 }); + } + + #[test] + fn unknown_enum_case_errors() { + let enum_ty = SchemaType::Enum { + cases: vec!["always".into()], + metadata: Default::default(), + }; + let err = + literal_to_schema_value(&graph(enum_ty), &ToolLiteral::Str("nope".into())).unwrap_err(); + assert!(matches!(err, ToolBuildError::DefaultTypeMismatch(_))); + } + + #[test] + fn u64_max_in_range() { + let v = literal_to_schema_value( + &graph(SchemaType::u64()), + &ToolLiteral::Int(u64::MAX as i128), + ) + .unwrap(); + assert_eq!(v, SchemaValue::U64(u64::MAX)); + } + + #[test] + fn integer_out_of_range_errors() { + let err = + literal_to_schema_value(&graph(SchemaType::u32()), &ToolLiteral::Int(-1)).unwrap_err(); + assert!(matches!(err, ToolBuildError::DefaultTypeMismatch(_))); + } + + #[test] + fn path_literal() { + let v = literal_to_schema_value( + &graph(SchemaType::Path { + spec: crate::schema::PathSpec { + direction: crate::schema::PathDirection::InOut, + kind: crate::schema::PathKind::Any, + allowed_mime_types: None, + allowed_extensions: None, + }, + metadata: Default::default(), + }), + &ToolLiteral::Str(".git".into()), + ) + .unwrap(); + assert_eq!( + v, + SchemaValue::Path { + path: ".git".into() + } + ); + } + + #[test] + fn list_of_strings() { + let v = literal_to_schema_value( + &graph(SchemaType::list(SchemaType::string())), + &ToolLiteral::List(vec![ + ToolLiteral::Str("a".into()), + ToolLiteral::Str("b".into()), + ]), + ) + .unwrap(); + assert_eq!( + v, + SchemaValue::List { + elements: vec![ + SchemaValue::String("a".into()), + SchemaValue::String("b".into()) + ] + } + ); + } + + #[test] + fn map_of_strings() { + let v = literal_to_schema_value( + &graph(SchemaType::map(SchemaType::string(), SchemaType::string())), + &ToolLiteral::Map(vec![( + ToolLiteral::Str("k".into()), + ToolLiteral::Str("v".into()), + )]), + ) + .unwrap(); + assert_eq!( + v, + SchemaValue::Map { + entries: vec![( + SchemaValue::String("k".into()), + SchemaValue::String("v".into()) + )] + } + ); + } +} diff --git a/tool-rust-1.md b/tool-rust-1.md new file mode 100644 index 0000000000..963bdab134 --- /dev/null +++ b/tool-rust-1.md @@ -0,0 +1,734 @@ +# Rust tool definition macros (golemcloud/golem#3532) — implementation plan + +Implements the Rust `#[tool_definition]` authoring surface from the agent-tools +spec (§5.1, §5.2.1, §5.3.1 grep example, §5.3.5.1 git subset, §5.8.1 +implicit-body convention), testable end-to-end through the exported +`golem:tool/guest@0.1.0` `discover-tools` function. + +Everything in this list ships in a **single PR** — including the cross-cutting +`golem-schema` changes, subtree support, the git/Remote multi-trait example, and +the §4.7 cross-language equivalence anchor. Nothing the ticket describes is +deferred. + +## Dependency + +This work sits on top of the `value-type-refactoring-6` branch (currently in +`../golem-2`, to be merged onto this branch). That branch adds the +standard-Rust-type → rich-schema-node mappings this plan relies on: + +- `std::path::PathBuf` → `SchemaType::Path { direction: InOut, kind: Any }` +- `url::Url` → `SchemaType::Url` +- `chrono::DateTime` → `SchemaType::Datetime` +- `std::time::Duration` → `SchemaType::Duration` +- `HashMap`/`BTreeMap` → `SchemaType::Map` +- new `SchemaType::{text, path, url, quantity, secret}` constructors + +## Key context (verified against the repo) + +- The repo WIT differs from the spec: the spec's separate `type-tree` / + `value-tree` and `*-c` constraint records are gone. Types and values are + delegated to `golem:core/types@2.0.0`'s schema-graph model. See + `sdks/rust/golem-rust/wit/deps/golem-tool/common.wit` and `guest.wit`. +- `tool` record is `{ version, commands: command-tree, schema: schema-graph }`. + Command bodies reference types by `type-node-index` into the shared + `tool.schema` pool. `schema.root` is a structurally-required placeholder, not + the semantic root. +- The command tree, `option-shape`, `flag-shape`, `constraint` + (`mutex-groups`/`implies`/`all-or-none`/`requires-all`/`requires-any`/`forbids`), + `stream-spec`, `result-spec`, `error-case`, `command-annotations` all still + exist in the tool WIT. +- The schema model (`golem-schema/src/schema/schema_type.rs`) carries constraints + on rich semantic types via inline sidecars (`Text{TextRestrictions}`, + `Url{UrlRestrictions}`, `Path{PathSpec}`, `Quantity{QuantitySpec}`, + `Binary{BinaryRestrictions}`). Numeric variants `S8..U64, F32, F64` currently + carry only `MetadataEnvelope`. `SchemaType` derives `Eq`. +- The `golem-agentic` world already exports `golem:tool/guest@0.1.0`; the current + guest impl `sdks/rust/golem-rust/src/agentic/tool_impl.rs` is a placeholder + (`discover_tools` returns empty, `get_tool`/`invoke` report unknown). +- Pattern to mirror (agents): + - definition macro `sdks/rust/golem-rust-macro/src/agentic/agent_definition_impl.rs` + inserts a `__register_agent_type()` metadata producer into the trait. + - implementation macro `sdks/rust/golem-rust-macro/src/agentic/agent_implementation_impl.rs` + emits the `#[ctor]` that calls `::__register_agent_type()`. + - registry `sdks/rust/golem-rust/src/agentic/agent_registry.rs` (global `State`). + - builder `sdks/rust/golem-rust/src/agentic/extended_agent_type.rs` + (`ExtendedAgentType` → WIT record, merging per-method schema graphs). + - tests `sdks/rust/golem-rust/tests/agent.rs` call `Impl::__register_agent_type()` + directly, then query the registry. + +## Locked decisions + +### D1 — Registration: definition builds metadata, implementation registers + +- `#[tool_definition]` only generates the metadata producer (a `where Self: Sized` + static fn, e.g. `__register_tool()`, plus a hidden `ToolDefinitionDescriptor`) + and performs compile-time validation. It does **not** register. +- `#[tool_implementation]` emits the `#[ctor]` that calls + `::__register_tool()`. Because the ctor only exists on + implemented types, a tool with no implementation is never registered — a + registered tool is necessarily implemented in that wasm (operator invariant). +- A **minimal `#[tool_implementation]`** (registration trigger only; real + `invoke` dispatch is a downstream ticket) is in scope so the macro is testable + through `discover-tools`. +- Tests register by calling `Leaf*::__register_tool()` directly (like the agent + tests), then assert via the `discover_tools()` guest export. + +### D2 — Numeric constraints: `Option` (one PR) + +- Add `restrictions: Option` to all 10 numeric `SchemaType` + variants (`S8..U64, F32, F64`). `Option<>` (not a non-optional empty-by-default + struct) is chosen to minimize hot-path cost: `SchemaType`/`SchemaValue` are + passed, serialized, and converted on the hot path, and the common + unconstrained case is a single `None` tag rather than three carried inner + `Option`s. +- `NumericRestrictions { min: Option, max: Option, + unit: Option }`. +- `NumericBound` is `Eq`-safe and covers the full range of every numeric repr + (`SchemaType` derives `Eq`, and `i64`-mantissa cannot represent `u64::MAX`): + `enum NumericBound { Signed(i64), Unsigned(u64), Float(u64 /* canonical bits */) }`. + Floats are stored as canonical bits, rejecting `NaN`/`inf` and normalizing + `-0.0`. +- **Canonicalization invariant** (closes the `None` vs `Some(empty)` hazard the + `Option<>` form introduces, keeping derived `Eq` and §4.7 byte-equivalence + intact): + - `NumericRestrictions::is_empty()` ⇔ `min.is_none() && max.is_none() && + unit` is `None`/empty. + - Smart constructors and decoders always collapse empty → `None`; `unit: + Some("")` normalizes to `None`. + - Well-formedness forbids `Some(empty)` (it must never be constructible). + - `#[serde(default, skip_serializing_if = "Option::is_none")]` so the wire form + for unconstrained numerics is unchanged. + +### D3 — Rich types: standard types for identity, `#[arg]` for refinement + +- Type identity comes from standard Rust types via the dependency branch + (`PathBuf`/`url::Url`/`chrono::DateTime`/`Duration`/`BTreeMap`). No new SDK + wrapper types. +- The macro does `#[arg]`-driven **node refinement** on the schema node returned + by `::get_type()`: + - `regex` / `min_length` / `max_length` → `Text { TextRestrictions }` + - `direction` / `kind` / `mime` / `accepts_stdio` → `Path { PathSpec }` (+ the + tool-model positional `accepts-stdio` flag, see D5) + - url `schemes` → `Url { UrlRestrictions }` + - numeric `min` / `max` / `bounds` / `unit` → numeric `NumericRestrictions` + +### D4 — Key-value parameters use `Map` + +- Key-value data maps to `SchemaType::Map` / `SchemaValue::Map`, never + `list`. +- Author git's `config` as `BTreeMap` (deterministic key order, + required for the §4.7 canonical anchor; `HashMap` order is nondeterministic). +- git's `config` is also `repeatable = "repeated"` (`-c a=1 -c b=2`). The tool + WIT `repeatable-shape` carries a single element `%type` while the logical + collected value is a `Map`. Model the repeatable element's value type via + `repeatable-shape` and collect into a `Map` node; the exact + element-vs-map shaping is finalized in Phase 0. + +### D5 — `accepts_stdio` is added to the tool WIT (not deferred) + +- `accepts_stdio` (grep's `files = "tail", accepts_stdio = true`) is not in the + current WIT. Add `accepts-stdio: bool` to the tool-model `positional` and + `tail-positional` records in `golem:tool` common.wit (tool-specific home, + smaller blast radius than the shared schema model). Synced to all SDK WIT + copies via `cargo make wit`. + +### D6 — Cross-trait subtree assembly via runtime descriptor + +- A proc macro expanding `Git` cannot read the metadata generated by the `Remote` + macro, so the command tree for `git → remote → add` cannot be assembled at + macro-expansion time. Instead: + - Each `#[tool_definition]` emits a hidden `ToolDefinitionDescriptor` + (`fn metadata() -> ExtendedToolType`). + - The parent declares subtrees explicitly with + `#[command(subtree = path::to::Remote)]` (bare `-> Remote` is not a safe macro + target). + - The parent's generated `__register_tool()` calls the child descriptor's + `metadata()` at registration time, turns the parent method into a command + node with `body = none`, and grafts the child root's subcommands beneath it. + - The child root name must match (or be explicitly overridden against) the + parent command name; validated at registration. + - A subtree-only trait is not registered as a top-level tool unless it has its + own `#[tool_implementation]`. + +### D7 — No command-body input-record in metadata + +- The WIT `command-body` lists positionals/options/flags individually by + `type-node-index`; there is no single input-record type node. The invocation + record (`guest.invoke`'s `typed-schema-value`) is a derived view. +- Lock a canonical invocation-record field order, used by the derived record, + validation, help rendering, and future dispatch/client codegen: + 1. inherited globals from root → parent (at each node: options, then flags), + 2. fixed positionals (declaration order), + 3. tail positional (single list-typed field), + 4. body options, + 5. body flags. + +### D8 — Globals stored once + +- Globals are stored only on the `command-node` where declared (recursive "this + level and downward" semantics). They are **not** cloned into descendant + `command-body` options/flags. An effective-globals view is derived where + needed. A validator checks body-local names are unique against inherited + globals. + +### D9 — Defaults and `value_is` literals + +- `positional.default`, `option-spec.default`, and `value-is` are + `schema-value-tree`s interpreted against the referenced type node. The macro + layer parses Rust attribute literals, resolves the referenced argument's + `SchemaType`, produces a `SchemaValue`, and encodes via the schema model's + value encoder. Validated against the referenced type node at registration. +- Enum-default case names need a canonical casing rule (tool-facing) so the §4.7 + anchor is stable. + +### D10 — Error metadata via a derive + +- `Result` does not let the tool macro recover `#[error(kind, exit_code)]` + from `E`. Add `#[derive(ToolError)]` with a `#[tool_error(kind = "...", + exit_code = ...)]` helper attribute (an inert attribute alone cannot drive + enum-variant metadata). Tool methods returning `Result` require + `E: ToolErrorSchema` (+ `Schema`), and the macro reads error-case metadata from + that. + +## Phases + +### Phase 0 — Design locks (before coding) + +Finalize and write down, with golden examples: + +- Subtree mechanism: `ToolDefinitionDescriptor` shape, `#[command(subtree=…)]` + syntax, child-root-name matching/override rule, runtime graft algorithm (D6). +- Canonical invocation-record field order (D7). +- Defaults / `value_is` literal → `SchemaValue` conversion strategy and enum-case + canonical casing (D9). +- Error metadata strategy: `ToolError` derive + helper attribute (D10). +- Numeric: `Option`, `NumericBound`, normalization invariant + (D2). +- `accepts-stdio` WIT addition (D5); key-value/repeatable `Map` shaping (D4). +- Canonical casing rules for tool / command / arg names. + +### Phase 1 — Schema + WIT model changes + +`golem-schema`: + +- Add `Option` to `S8..U64, F32, F64` + (`skip_serializing_if = Option::is_none` + empty-normalization to `None`); + add `NumericBound`, `NumericRestrictions`, smart constructors. +- Update the ~120 numeric match sites: + - `validation/subtyping.rs`: numeric narrowing within the same repr + (`sub.min >= sup.min`, `sub.max <= sup.max`, `None` = unbounded; inclusive), + equivalence compares normalized restrictions exactly. + - `validation/value.rs`: numeric range/unit checks. + - `validation/well_formedness.rs`: `min <= max`, bounds fit the repr, integer + variants reject fractional bounds, float bounds reject `NaN`/`inf` and + normalize `-0.0`, reject `Some(empty)`. + - `protobuf.rs` + the schema `.proto`: numeric message fields. + - `wit/encode.rs` + `wit/decode.rs` + `golem-core-v2.wit`: numeric variant + cases gain a payload (payloadless → payload-carrying = versioned wire + evolution; decoders normalize missing → `None`). + - `proptest_strategies.rs`, `conversion.rs` (primitives still emit `None`). + +`golem:tool` common.wit: + +- Add `accepts-stdio: bool` to `positional` and `tail-positional`. + +Propagation: + +- Sync WIT/protobuf to the TS / Scala / MoonBit encoders/decoders so byte + equivalence holds; run `cargo make wit`. +- Golden cross-SDK vectors: bare `u32`, `u32 min=1`, `u32 bounds=(0,100)`, + `s64 bounds=(0, i64::MAX)`, `u64` near `u64::MAX`, `f64 min=0.0`, each `+unit`, + and empty → `None` roundtrip. + +> **Phase 1 status (oracle-reviewed):** the Rust core (golem-schema + +> golem-common + protobuf + golem-core-v2/tool WIT + golem-schema-derive) is +> complete, verified, and oracle-confirmed correct (4 bug fixes accepted). +> **Deferred-within-PR gate:** the TS / Scala / MoonBit schema-model codec sync +> for the new numeric WIT/proto/tool shapes is intentionally **sequenced after +> the Rust phases** but is **required same-PR work that must land before Phase 6 +> / final merge** (oracle SHOULD-FIX 2). Tracked in Phase 6. + +### Phase 2 — golem-rust runtime + +> **Phase 2 status (oracle-reviewed, CLEAR):** the golem-rust runtime mirror is +> complete and oracle-confirmed. Delivered in +> `sdks/rust/golem-rust/src/agentic/`: `tool_registry.rs` (deterministic +> root-name-keyed registry), `extended_tool_type.rs` (runtime mirror + +> graph-merge `to_tool()`, full validator mirroring `golem-common`'s +> `validate_tool`, help/argument-help renderer, subtree graft), +> `tool_refinement.rs` (D3 node refinements), `errors.rs` (`ToolError`), and +> registry-wired `tool_impl.rs` discovery/lookup. Oracle blockers resolved: +> subtree index-remap/dispatcher/annotation semantics fixed; panic-safe +> validator + helpers; and per-argument schema graphs are now explicitly +> checked for dangling refs (`check_graph_closed`, mirroring canonical +> `check_type_refs`/`check_def_refs`), which makes per-arg default/`value-is` +> validation equivalent to validating against the merged tool schema. SDK +> build/clippy/tests green (lib 60 passed/4 ignored, agent 29 passed). `invoke` +> remains a placeholder pending the later phase. + +- `tool_registry.rs`: global `State` with `register_tool`, `get_all_tools`, + `get_tool_by_name` (mirror `agent_registry.rs`). +- `extended_tool_type.rs`: Rust mirror of the WIT `tool` / `command-tree` / + `command-node` / `command-body` / specs, with `to_tool()` merging per-arg + schema graphs into one `tool.schema` (reuse the agent graph-merge/encode + pattern). **No synthetic input-record node in metadata.** Add: + - `EffectiveCommandBody`, `effective_globals(command_index)`, + `canonical_input_fields(command_index)` (D7), + - `encode_schema_value_default(...)` (D9), + - validators: name uniqueness vs inherited globals (D8), default / `value_is` + type-match (D9), all `type-node-index` references resolve. +- Node-refinement helpers (D3): regex/min/max-len → `Text`; direction / kind / + mime / `accepts_stdio` → `Path` (+ positional `accepts-stdio`); schemes → + `Url`; min/max/unit → numeric. +- `ToolError` runtime surface; help-text renderer (a `Tool` + command-path → + formatted string at any depth: root, named subcommand, individual argument). +- `ToolDefinitionDescriptor` trait + subtree-graft runtime merge (D6). +- Wire `tool_impl.rs` `discover_tools` / `get_tool` to the registry. + +### Phase 3 — Macro: attribute parsing (golem-rust-macro) + +- New `tool/` module; register in `lib.rs`: `#[tool_definition]`, minimal + `#[tool_implementation]`, `#[derive(ToolError)]`, and inert + `#[arg]` / `#[command]` / `#[constraint]` / `#[result]`. +- Parsers: + - arg kind: `positional` | `option` | `flag` | `tail` | `global`. + - option/flag shapes: `repeatable = repeated|delimited|either` (+ `delim`), + `count-flag` (+ `max`), `optional-scalar`, `negatable`, `default`, `short`, + `aliases`, `env`, `required`. + - refinements: `regex`, path `kind` / `direction` / `accepts_stdio`, url + `schemes`, numeric `min` / `max` / `bounds` / `unit`. + - `#[command(subtree = path, aliases = [...], annotations(destructive, + read_only, idempotent, open_world))]`. + - `#[constraint(...)]`: `mutex_groups`, `all_or_none`, `implies`, + `requires_all`, `requires_any`, `forbids`, `value_is`. + - `#[result(formatters = [...], default = "...")]`. + - `#[tool_error(kind, exit_code)]` (on `ToolError` enum variants). + - doc parsing: `///` on trait/method → `doc.summary` / `doc.description`; + `#[arg(doc = "...")]` for params; examples. + +### Phase 4 — Macro: metadata synthesis + +- Trait name → tool name (kebab). Implicit-body detection: the method whose + snake_case name equals the tool's snake_case name is the root command body. + Enforce `commands[0].name == tool.name`; **compile error on divergence** + (§5.8.1). +- Parameter projection: `bool` → flag; `Vec` at tail → tail positional; + `Vec` elsewhere → repeatable option; `Option` → not-required; primitive + → positional; struct → options-object; `BTreeMap`/`HashMap` → `Map`; + `#[command(subtree=…)]` method → `body = none` node grafted at runtime; + `"global"` args propagate to this command + descendants (stored once, D8). +- Per typed arg: `::get_type()` then apply `#[arg]` refinement; + merge into `tool.schema`. Build the flattened command tree (root at index 0), + globals, options/flags/positionals/streams/result/errors/annotations/ + constraints. +- Emit `__register_tool()` building `ExtendedToolType` (+ descriptor); + `#[tool_implementation]` emits the `#[ctor]` calling `::__register_tool()`. + +### Phase 5 — Tests (through discover-tools) + +- Port **grep** (§5.3.1) — single trait — into `golem-rust/tests/tool.rs` + (feature `export_golem_agentic`): register via `LeafGrep::__register_tool()`, + call `discover_tools()`, assert full metadata. +- Port **git + Remote subtree** (§5.3.5.1): multi-level subcommands, pure + dispatchers, aliases, per-command annotations, tail separator, optional + trailing positional, option aliases/env/default, count-flag, negatable flag, + all repeatable modes, several constraint kinds, multi-level globals + propagation, `Url`/`Datetime`/`Map`/`Enum` nodes, multiple result formatters, + mixed usage/runtime exit codes. +- Targeted tests: canonical invocation-record field order (D7); default / + `value_is` schema-value-tree encoding (D9); globals declared once but effective + in descendants (D8); numeric bounds incl. `u64::MAX` (D2); + no-registration-without-`#[tool_implementation]` (D1); help-text rendering at + root / subcommand / argument depth. +- `trybuild` compile-fail: body/name divergence (§5.8.1), bad `#[arg]`, invalid + subtree return/descriptor shape. + +### Phase 6 — §4.7 cross-language equivalence anchor + +- Ensure canonical ordering and casing throughout the produced metadata. +- Snapshot the canonical grep/git `Tool` metadata as the reference the + cross-language verification ticket (#3560) reuses across SDKs. +- **Deferred-within-PR gate (oracle SHOULD-FIX 2):** complete the TS / Scala / + MoonBit schema-model codec sync for the new numeric WIT/proto/tool shapes + (`numeric-restrictions`, `numeric-bound`, `accepts-stdio`, the `option-shape` + list/map split, `duplicate-key-policy`). Regenerate generated bindings, update + the hand-written codecs, and prove byte-equivalence against the golden + vectors. This is required before final completion of this PR. + +### Phase 7 — Verify + +- `cargo test -p golem-schema` +- `cargo test -p golem-rust --features export_golem_agentic` +- `cargo build -p golem-rust-macro` +- `cargo make wit` (WIT source changed) +- `cargo fmt` + `cargo clippy` per `sdks/rust/AGENTS.md` (the SDK is outside + `cargo make build`; do not hand-edit `wit/deps`, regenerate instead). + +## Phase 0 — Finalized design (grounded against the repo) + +This section turns D1–D10 into concrete, code-level artifacts the later phases +copy verbatim. Every claim below was verified against the current tree on branch +`tools-rust-macro-1` (head `2def062bb Value type refactoring 6 (#3662)`). + +### F0.1 — Grounded file inventory (numeric change, Phase 1) + +Numeric variants `S8..U64, F32, F64` are payloadless today. They are matched in +exactly these files (verified): + +- `golem-schema/src/schema/schema_type.rs` — variant defs, `metadata()` + + `metadata_mut()` accessors, 10 bare constructors. +- `golem-schema/src/schema/wit/encode.rs` (~L362–372), `wit/decode.rs` + (L297–306) — `wire::SchemaTypeBody::{S8Type..F64Type}`. +- `golem-schema/src/schema/protobuf.rs` (encode L212–221, decode L293–302) — + `Body::{S8Type..F64Type}(ProtoEmpty{})`. +- `golem-schema/src/schema/validation/{subtyping,value,well_formedness}.rs`. +- `golem-schema/src/schema/proptest_strategies.rs`, `conversion*.rs`. + +Wire types come from `wit_bindgen::generate!` over +`golem-schema/wit/deps/golem-core-v2/golem-core-v2.wit` (`schema-type-body` +variant, L218). Proto is `golem-api-grpc/proto/golem/schema/schema.proto` +(`SchemaType.body` oneof, fields 4–13 `golem.common.Empty`). `golem-core-v2` and +the tool WIT are brand-new this cycle (unreleased), so evolving the payloadless +numeric cases is a free versioned change, not a compatibility break. + +### F0.2 — Numeric model (D2), exact Rust + +```rust +/// Bound usable across every numeric repr. `SchemaType` derives `Eq`, and an +/// `i64` mantissa cannot represent `u64::MAX`, so the bound is a 3-family sum. +/// Floats store canonical IEEE-754 bits (NaN/inf rejected at construction, +/// `-0.0` normalized to `+0.0`) to stay `Eq`-safe. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, IntoSchema, FromSchema, ...)] +#[serde(tag = "kind", content = "value", rename_all = "kebab-case")] +pub enum NumericBound { + Signed(i64), + Unsigned(u64), + FloatBits(u64), +} +impl NumericBound { + pub fn float(v: f64) -> Result; // reject NaN/inf, normalize -0.0 +} + +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize, IntoSchema, FromSchema, ...)] +#[serde(rename_all = "camelCase")] +pub struct NumericRestrictions { + #[serde(default, skip_serializing_if = "Option::is_none")] pub min: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] pub max: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] pub unit: Option, +} +impl NumericRestrictions { + pub fn is_empty(&self) -> bool; // min/max none && unit none-or-"" + pub fn normalize(self) -> Option; // empty -> None; unit Some("") -> None +} +``` + +Each numeric variant gains the field (bare constructors keep `restrictions: None`): + +```rust +S8 { + #[serde(default, skip_serializing_if = "Option::is_none")] + restrictions: Option, + #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] + metadata: MetadataEnvelope, +}, +``` + +Accessor match arms become `SchemaType::S8 { metadata, .. } | ...`. The macro +sets restrictions by building the struct literal with +`restrictions: NumericRestrictions{..}.normalize()`. **Invariant:** `Some(empty)` +is never constructible; smart constructors/decoders collapse empty → `None`; +well-formedness rejects `Some(empty)`. + +WIT (`golem-core-v2.wit`): + +```wit +variant numeric-bound { signed(s64), unsigned(u64), float-bits(u64) } +record numeric-restrictions { + min: option, max: option, unit: option, +} +// numeric cases gain a payload: +s8-type(option), // … through f64-type(option) +``` + +Proto (`schema.proto`): numeric oneof fields 4–13 change +`golem.common.Empty` → `NumericRestrictions` (presence = `Some`; absent/empty +decodes/normalizes to `None`): + +```proto +message NumericBound { oneof bound { int64 signed = 1; uint64 unsigned = 2; uint64 float_bits = 3; } } +message NumericRestrictions { NumericBound min = 1; NumericBound max = 2; optional string unit = 3; } +``` + +Validation semantics — centralized in one helper used by **every** entry point +(well-formedness, subtyping, equivalence, value validation, macro refinement), so +no path assumes a prior well-formedness pass (oracle finding 9): + +```rust +fn normalize_numeric_restrictions_for_repr( + repr: NumericRepr, // S8..U64, F32, F64 + r: Option, +) -> Result, SchemaValidationError>; +``` + +- `well_formedness`: `min <= max` compared **numerically** (not by family tag or + raw bits); bound family must match the repr (`U*` ⇒ `Unsigned`, `S*` ⇒ + `Signed`, `F*` ⇒ `FloatBits`) — family mismatch is an error; integer reprs + reject fractional/float bounds; bounds must fit the repr range; reject + `Some(empty)`; a `NumericBound` whose arm is set but value is non-finite is + impossible (constructor guards), but a decoded malformed bound is rejected. +- `subtyping`: numeric narrowing within identical repr — sub.min ≥ sup.min, + sub.max ≤ sup.max (`None` = unbounded, inclusive). Family mismatch ⇒ "not a + subtype" (defended here too, not only in well-formedness). Equivalence compares + normalized restrictions exactly. **`unit` is schema-level metadata** (numeric + `SchemaValue`s carry no unit), so value validation never checks it; for + equivalence/subtyping the normalized `unit` must match exactly (finding 10). +- `value`: **range only** against the node's restrictions; decode bound bits → + `f64`/`i64`/`u64`, compare numerically. No unit check. + +Float rule (finding 11): `FloatBits` stores **canonical f64 bits**. All +comparisons decode to `f64` and compare numerically, never by bit order. For +`F32`, bounds must round-trip through `f32` (well-formedness rejects bounds that +don't); value checks widen the `f32` value to `f64` and compare against the f64 +bounds. + +Wire/format notes (findings 6–8): +- **WIT** change `s8-type` → `s8-type(option)` is an + intentional ABI change on an unreleased package. Unconstrained numeric encodes + as `s8-type(none)`. There is no "missing payload decodes to None"; the binding + type simply carries `Option`. `some(empty)` is accepted only at the decode + boundary and normalized to `none`. +- **Proto** decode rules: a missing `SchemaType.body` is an invalid schema (not + `S8(None)`); `Body::S8Type(NumericRestrictions::default())` decodes to + `S8 { restrictions: None }`; `Some({min:None,max:None,unit:None|Some("")})` + normalizes to `None`; a present `NumericBound` with no `bound` arm set is a + decode error. +- **desert** `BinaryCodec` with `evolution()`: binary bytes for numeric schema + variants are **not** backward-compatible across this unreleased refactor (a + payloadless case gaining an `Option` payload is not assumed wire-stable). Phase + 1 adds a roundtrip test over `S8/U64/F64` plus adjacent `Char`/`String`/`Bool` + to prove the codec is internally consistent after the change. + +### F0.3 — `accepts-stdio` (D5), exact WIT + +Add to `golem:tool` `common.wit` `positional` and `tail-positional` records: + +```wit +accepts-stdio: bool, +``` + +Source of truth `sdks/rust/golem-rust/wit/deps/golem-tool/common.wit`; all 9 +copies synced via `cargo make wit`. + +### F0.4 — Subtree descriptor + graft (D6), exact shape + +A trait associated fn with `where Self: Sized` is **not** callable from a bare +trait path (`::…` needs a concrete `Self`), so the descriptor +cannot be a trait method that the parent reaches via the subtree trait path +(oracle blocker 1). Instead, `#[tool_definition] trait T` emits a **module-level +free function** with a deterministic name derived from the trait ident: + +```rust +#[doc(hidden)] +pub fn __golem_tool_descriptor_for_T( + ctx: &mut golem_rust::agentic::ToolBuildCtx, +) -> Result; +``` + +It also adds two hidden trait items so the `#[tool_implementation]` ctor and the +"must be implemented" check work exactly like agents: + +```rust +#[doc(hidden)] +fn __tool_descriptor() -> golem_rust::agentic::ExtendedToolType where Self: Sized { // delegates to the free fn + __golem_tool_descriptor_for_T(&mut golem_rust::agentic::ToolBuildCtx::new()) + .expect("tool descriptor build failed") +} +#[doc(hidden)] +fn tool_implementation_annotation() where Self: Sized; // forces #[tool_implementation] +``` + +`#[tool_implementation]` emits (via the re-exported `ctor`, like agents): + +```rust +::golem_rust::ctor::__support::ctor_parse!( + #[ctor] fn __register_tool_() { + golem_rust::agentic::register_tool(::__tool_descriptor()); + } +); +``` + +Because the ctor exists only on implemented types, an unimplemented tool is never +registered (D1). A subtree-only trait without its own `#[tool_implementation]` is +never a top-level tool (no ctor → not registered), but its free descriptor fn is +still reachable for grafting. + +**Subtree resolution.** A method annotated `#[command(subtree = path::Remote)]` +(optionally `subtree = path::Remote, name = "remote"`) is rewritten by the parent +macro to call the child's free descriptor fn: it maps the path's last segment +`Remote` → `__golem_tool_descriptor_for_Remote` and calls +`path::__golem_tool_descriptor_for_Remote(ctx)`, threading the same `ctx`. + +**`ToolBuildCtx`** (blocker 2) carries a recursion stack keyed by descriptor +identity (the free-fn path string) plus command path. Building a child: +- pushes the child identity; if already present, returns + `ToolBuildError::SubtreeCycle(path)` (e.g. `git.remote -> remote.foo -> + git.remote`) — no stack overflow; +- DAG reuse (same child grafted twice) is allowed: each graft **clones** the + child `ExtendedToolType` and **remaps** its command indices and schema + `type-node-index`es into the parent before merging — never shares mutable nodes; +- pops on return. + +**Graft semantics** (blocker 3 — no silent loss): +- The child root command's `body` **must be `None`**; a child root with an + executable body is rejected (`ToolBuildError::SubtreeRootHasBody`). +- The child root's `globals` are **copied onto the graft placeholder node** so + they still apply to all descendants (per WIT recursive-globals semantics). +- The graft node's `name`/`doc`/`aliases`/`annotations` come from the parent + subtree method's `#[command(...)]` when present, otherwise inherit from the + child root. Name/alias uniqueness against siblings is validated after merge. +- The child root's subcommands (index-remapped) become the graft node's + subcommands. +- Child-root-name rule: the child tool's root command name must equal the subtree + method's command name (kebab) unless overridden by `name = "..."`; validated + during the parent descriptor build. + +### F0.5 — Canonical invocation-record field order (D7), restated authoritatively + +The derived invocation record for a command body (used by validation, help, and +future dispatch/codegen) orders fields. Per the WIT, globals declared on a +command apply to that command's **own** body and to all descendants, so the +effective set runs from the root **through the current node inclusive** (oracle +blocker 5): + +1. effective globals, root → current node **inclusive**, at each node + **options then flags** (declaration order within each), +2. body fixed positionals (declaration order), +3. body tail positional (single list-typed field), if any, +4. body options (declaration order), +5. body flags (declaration order). + +Worked example for `git remote add` (3-level): +1. `git` global options, `git` global flags, +2. `remote` global options, `remote` global flags, +3. `add` global options, `add` global flags, +4. `add` fixed positionals, +5. `add` tail positional, +6. `add` body options, +7. `add` body flags. + +Globals are stored **once** in the declaring `command-node.globals` (D8) and are +**never** duplicated into any `command-body.options`/`flags`; the effective view +is derived by walking root→node. A validator rejects a body-local name colliding +with any effective (inherited or own) global. + +### F0.6 — Defaults / `value-is` literals (D9) + +`positional.default`, `option-spec.default`, and `value-is` literals are +`schema-value-tree`s. Macro flow: parse the Rust attr literal → resolve the +referenced arg's `SchemaType` → build a `SchemaValue` → encode with the schema +value encoder → store. Validated against the referenced type node at descriptor +build time. Enum default case names use the canonical kebab casing (F0.8). + +### F0.7 — Error metadata via derive (D10), exact shape + +```rust +#[derive(ToolError)] +enum GrepError { + #[tool_error(kind = "usage-error", exit_code = 2)] BadPattern(String), + #[tool_error(kind = "runtime-error", exit_code = 1)] Io(String), +} +``` + +Generates `impl golem_rust::agentic::ToolErrorSchema for GrepError` exposing per +variant: kebab `name`, `error-kind` (`usage-error`|`runtime-error`), `exit-code` +(`u8`), and the payload `SchemaType`. Tool methods returning `Result` +require `E: ToolErrorSchema + Schema`; the macro reads error cases from +`E::error_cases()`. Payload rules per variant shape (oracle finding 13): +- unit variant → `payload: None`; +- exactly one field (named or unnamed) → payload `SchemaType` from that field via + `Schema::get_type()`; +- two or more fields → **compile error** (no synthetic record in Phase 1–7). + +### F0.8 — Canonical casing (D7/D9, §4.7 stability) + +All tool-facing identifiers are kebab-case, matching the WIT regex +`^[a-z][a-z0-9]*(-[a-z0-9]+)*$`: + +- tool name ← kebab(trait ident); root command name == tool name. +- command name ← kebab(method ident). Implicit body: the method whose snake_case + == tool snake_case is the root body; `commands[0].name == tool.name` is enforced + with a **compile error** on divergence (§5.8.1). +- option long / flag long / positional name ← kebab(param ident). +- error-case name ← kebab(variant ident); enum default case ← kebab(variant). + +### F0.9 — Key-value / repeatable `Map` shaping (D4) + WIT `option-shape` split + +The current WIT `option-shape::repeatable(repeatable-shape{repetition,%type})` +documents `%type` as the **element** of a list-collected option, and a +repeatable default as "a list whose elements are values of `%type`". A +`BTreeMap`-collected repeatable cannot be expressed under that invariant (its +collected value is a `Map`, not a `List`), so Phase 1 **changes the tool WIT** +(`golem:tool` common.wit, in scope of this PR) to model the collected shape +explicitly (oracle blocker 4): + +```wit +variant option-shape { + scalar(type-node-index), + optional-scalar(type-node-index), + repeatable-list(repeatable-list-shape), + repeatable-map(repeatable-map-shape), +} +record repeatable-list-shape { repetition: repetition, item-type: type-node-index } +record repeatable-map-shape { + repetition: repetition, + /// A `SchemaType::Map` node; the collected value is this Map. + map-type: type-node-index, + duplicate-key-policy: duplicate-key-policy, +} +enum duplicate-key-policy { reject, last-wins } +``` + +Shaping rules: +- `BTreeMap` / `HashMap` → `SchemaType::Map { key:String, value:V }`. + Author git's `config` as `BTreeMap` for deterministic order. +- repeatable **scalar** option (`Vec`, grep `-e`): `repeatable-list(item-type = + )`; default is a `List`; collected invocation value is `List`. +- repeatable **key-value** option (git `config` as `BTreeMap`, `-c a=1 -c b=2`): + `repeatable-map(map-type = >, duplicate-key-policy)`; default is a + `Map`; each `-c k=v` contributes one entry; collected invocation value is + the merged `Map`. Never `list`. +- Defaults and `value-is` for each shape are values of the **collected** type + (`List` resp. `Map`), consistent with D9 and the WIT invariant. For a + `value-is` naming a `repeatable-list`, the literal is an element value (any + occurrence equals it); for `repeatable-map`, the literal is an entry value. + +### F0.10 — Runtime mirror targets (Phase 2), grounded + +Mirror the agent pattern 1:1, with one deviation: the tool registry is +**deterministic** (Phase 6 snapshots `discover-tools`), so it stores tools in a +`BTreeMap` (not the agent `HashMap`) and +`get_all_tools()` returns them sorted by root command name. Duplicate +registration of the same tool name **panics** with a clear message (catches two +impls for one tool) — oracle finding 12. +- `agent_registry.rs` (`static mut STATE`, `get_state()`, `register_agent_type`, + `get_all_agent_types`) → `tool_registry.rs` (`register_tool`, `get_all_tools`, + `get_tool_by_name`). +- `extended_agent_type.rs` (`ExtendedAgentType::to_agent_type()` merging per-method + `SchemaGraph`s via `merge_agent_graphs` + `GraphEncoder`) → `extended_tool_type.rs` + (`ExtendedToolType::to_tool()` merging per-arg graphs into one `tool.schema`, + building the flattened command tree, **no synthetic input-record node**). +- `tool_impl.rs` `discover_tools`/`get_tool` wired to the registry (currently a + placeholder returning empty / `InvalidToolName`). + +## Risks + +- Phase 1 cross-cuts `golem-schema` + protobuf + the `golem-core-v2` WIT + all + four SDK codecs. The numeric wire-format change is a versioned evolution (not + byte-identical to the current payloadless numeric cases); golden vectors and + decoder normalization guard byte-equivalence. +- Subtree assembly is a runtime merge, not macro-time. The `#[command(subtree=…)]` + authoring syntax and child-root-name rule must be settled in Phase 0 before the + git example can be implemented. +- The `Option` form depends on the normalization invariant + (D2) to keep derived `Eq` and §4.7 byte-equivalence correct; `Some(empty)` must + never be constructible. From b566214bb5019caaff6ae6cace4870f65d285ae1 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Sat, 27 Jun 2026 10:11:53 +0200 Subject: [PATCH 03/11] phase 4 --- golem-common/src/schema/tool/tests.rs | 148 + golem-common/src/schema/tool/validation.rs | 102 +- .../golem-rust-macro/src/tool/definition.rs | 33 +- .../golem-rust-macro/src/tool/descriptor.rs | 2150 +++++++++++++ .../src/tool/implementation.rs | 52 +- sdks/rust/golem-rust-macro/src/tool/mod.rs | 1 + .../golem-rust-macro/src/tool/synthesis.rs | 12 - .../golem-rust-macro/src/tool/tool_error.rs | 19 +- sdks/rust/golem-rust/Cargo.toml | 4 + .../src/agentic/extended_tool_type.rs | 1682 +++++++++- .../golem-rust/src/agentic/tool_literal.rs | 88 + .../golem-rust/src/agentic/tool_refinement.rs | 171 +- sdks/rust/golem-rust/tests/tool.rs | 2734 +++++++++++++++++ 13 files changed, 7041 insertions(+), 155 deletions(-) create mode 100644 sdks/rust/golem-rust-macro/src/tool/descriptor.rs create mode 100644 sdks/rust/golem-rust/tests/tool.rs diff --git a/golem-common/src/schema/tool/tests.rs b/golem-common/src/schema/tool/tests.rs index fa6c6975a5..c712cc7d02 100644 --- a/golem-common/src/schema/tool/tests.rs +++ b/golem-common/src/schema/tool/tests.rs @@ -355,6 +355,114 @@ fn repeatable_map_value_is_uses_resolved_map_value_type() { assert_eq!(validate_tool(&tool), Ok(())); } +#[test] +fn value_is_one_item_literal_on_repeatable_list_option_is_accepted() { + // A repeatable-list option collecting `list` items: a value-is matches + // one occurrence (a `list`) exactly. + let mut inc = scalar_option("inc", SchemaType::string()); + inc.shape = OptionShape::RepeatableList(RepeatableListShape { + repetition: Repetition::Repeated, + item_type: SchemaType::list(SchemaType::u32()), + }); + let mut body = empty_body(); + body.options = vec![inc]; + body.constraints = vec![Constraint::RequiresAll(vec![Ref::ValueIs(ValueIsRef { + name: "inc".to_string(), + value: SchemaValue::List { + elements: vec![SchemaValue::U32(1), SchemaValue::U32(2)], + }, + })])]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + assert_eq!(validate_tool(&tool), Ok(())); +} + +#[test] +fn value_is_into_nested_element_of_repeatable_list_option_is_rejected() { + // A repeatable-list option collecting `list` items is a collecting + // surface: its comparand is one occurrence (`list`), matched exactly. A + // bare `u32` would be a nested element of one occurrence, which must NOT be + // accepted (no element relaxation on a collecting surface). + let mut inc = scalar_option("inc", SchemaType::string()); + inc.shape = OptionShape::RepeatableList(RepeatableListShape { + repetition: Repetition::Repeated, + item_type: SchemaType::list(SchemaType::u32()), + }); + let mut body = empty_body(); + body.options = vec![inc]; + body.constraints = vec![Constraint::RequiresAll(vec![Ref::ValueIs(ValueIsRef { + name: "inc".to_string(), + value: SchemaValue::U32(1), + })])]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::ValueIsTypeMismatch { name, .. } if name == "inc" + )), + "expected value-is mismatch for nested element of repeatable list, got {errors:?}" + ); +} + +#[test] +fn value_is_whole_list_literal_on_tail_positional_is_rejected() { + // A tail positional collects items into a list; its comparand is one item + // (`string`), matched exactly. A whole-list literal must NOT be accepted. + let mut body = empty_body(); + body.positionals.tail = Some(TailPositional { + name: "args".to_string(), + doc: Doc::default(), + value_name: None, + item_type: SchemaType::string(), + min: 0, + max: None, + separator: None, + verbatim: false, + accepts_stdio: false, + }); + body.constraints = vec![Constraint::RequiresAll(vec![Ref::ValueIs(ValueIsRef { + name: "args".to_string(), + value: SchemaValue::List { + elements: vec![SchemaValue::String("prod".to_string())], + }, + })])]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + let errors = validate_tool(&tool).unwrap_err(); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::ValueIsTypeMismatch { name, .. } if name == "args" + )), + "expected value-is mismatch for whole-list literal on tail, got {errors:?}" + ); +} + +#[test] +fn value_is_into_map_value_of_scalar_option_is_accepted() { + // A scalar option whose declared type is a map is a non-collecting value + // surface: a value-is matches the whole map, or — under the one-level + // relaxation — a single map value. + let mut body = empty_body(); + body.options = vec![scalar_option( + "cfg", + SchemaType::map(SchemaType::string(), SchemaType::u32()), + )]; + body.constraints = vec![Constraint::RequiresAll(vec![Ref::ValueIs(ValueIsRef { + name: "cfg".to_string(), + value: SchemaValue::U32(1), + })])]; + let mut node = root("tool"); + node.body = Some(body); + let tool = tool_with_root(node); + assert_eq!(validate_tool(&tool), Ok(())); +} + // --- validation: failures --- #[test] @@ -967,6 +1075,46 @@ fn pure_recursive_alias_input_type_is_reported_once_at_input_position() { ); } +#[test] +fn value_is_on_pure_recursive_alias_is_not_suppressed_like_dangling_ref() { + let id = TypeId::new("cycle"); + let mut body = empty_body(); + body.options = vec![scalar_option("arg", SchemaType::ref_to(id.clone()))]; + body.constraints = vec![Constraint::RequiresAll(vec![Ref::ValueIs(ValueIsRef { + name: "arg".to_string(), + value: SchemaValue::String("x".to_string()), + })])]; + let mut node = root("tool"); + node.body = Some(body); + let mut tool = tool_with_root(node); + tool.schema.defs = vec![SchemaTypeDef { + id: id.clone(), + name: Some("Cycle".to_string()), + body: SchemaType::ref_to(id), + }]; + + let errors = validate_tool(&tool).expect_err("recursive alias must be rejected"); + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::IllFormedSchema { position, detail, .. } + if position == "arg" && detail.contains("reference cycle with no concrete type") + )), + "expected the structural recursive-alias error, got {errors:?}" + ); + // A reference cycle never resolves to a concrete type, so no literal can ever + // satisfy it: unlike a *dangling* ref (which is suppressed in favor of the + // separate `UnresolvedTypeRef`), the recursive comparand is a genuine + // `value-is` mismatch and is reported alongside the structural error. + assert!( + errors.iter().any(|e| matches!( + e, + ToolValidationError::ValueIsTypeMismatch { name, .. } if name == "arg" + )), + "value-is mismatch on a recursive alias must not be suppressed, got {errors:?}" + ); +} + #[test] fn mutual_recursive_alias_input_type_is_reported_once_at_input_position() { let a = TypeId::new("a"); diff --git a/golem-common/src/schema/tool/validation.rs b/golem-common/src/schema/tool/validation.rs index ed7484e2d0..dc70ca4035 100644 --- a/golem-common/src/schema/tool/validation.rs +++ b/golem-common/src/schema/tool/validation.rs @@ -285,13 +285,31 @@ struct Validator<'a> { used_ref_ids: HashSet, } +/// How a `value-is` literal is matched against its comparand type. Mirrors the +/// SDK runtime's `ValueIsMode` so host and guest agree on what a `value-is` +/// against a collecting vs. non-collecting surface means. +#[derive(Clone, Copy, PartialEq, Eq)] +enum ValueIsMode { + /// A non-collecting value surface (a scalar option, a fixed positional): the + /// literal matches the whole declared value, or — under the one-level + /// relaxation — a single element of a list/fixed-list or value of a map + /// (optionally `option`-wrapped). + WholeOrOnePeel, + /// A collecting surface (a repeatable option or tail positional, whose + /// comparand is already the per-occurrence type): the literal matches one + /// occurrence exactly, with no element/value relaxation (matching one more + /// level would descend past a single occurrence). + Exact, +} + /// The `value-is` comparand recorded for a name that carries a declared value /// type. A name absent from the comparand map carries no value type at all (a /// flag), which is a genuine `value-is` mismatch. #[derive(Clone, Copy)] enum ValueComparand<'a> { - /// The resolved type a `value-is` literal must be valid for. - Type(&'a SchemaType), + /// The resolved type a `value-is` literal must be valid for, plus the mode + /// controlling whether the one-level relaxation applies. + Type(&'a SchemaType, ValueIsMode), /// The name is typed, but its declared type could not be resolved to a /// comparable value type (a repeatable-map whose `map_type` does not resolve /// to a map). The underlying type error is reported separately, so @@ -822,7 +840,7 @@ impl<'a> Validator<'a> { scope.names.insert(positional.name.clone()); scope.typed.insert( positional.name.clone(), - ValueComparand::Type(&positional.type_), + ValueComparand::Type(&positional.type_, ValueIsMode::WholeOrOnePeel), ); self.check_positional_default(command, positional); self.check_type_well_formed(command, &positional.name, &positional.type_); @@ -837,10 +855,13 @@ impl<'a> Validator<'a> { self.check_identifier("positional name", &tail.name); add_name(self, &tail.name); scope.names.insert(tail.name.clone()); - // A tail positional is list-like; a value-is literal matches an item. - scope - .typed - .insert(tail.name.clone(), ValueComparand::Type(&tail.item_type)); + // A tail positional collects occurrences into a list; a value-is + // literal matches one item exactly (the per-occurrence item type), + // never the whole collected list. + scope.typed.insert( + tail.name.clone(), + ValueComparand::Type(&tail.item_type, ValueIsMode::Exact), + ); self.check_type_well_formed(command, &tail.name, &tail.item_type); self.input_roots.push(InputRoot { command: command.to_string(), @@ -909,8 +930,8 @@ impl<'a> Validator<'a> { continue; } match scope.typed.get(&value_is.name) { - Some(ValueComparand::Type(declared)) => { - match self.value_is_outcome(declared, &value_is.value) { + Some(ValueComparand::Type(declared, mode)) => { + match self.value_is_outcome(declared, *mode, &value_is.value) { ValueIsOutcome::Compatible => {} ValueIsOutcome::Mismatch => { self.errors.push(ToolValidationError::ValueIsTypeMismatch { @@ -949,26 +970,47 @@ impl<'a> Validator<'a> { /// Classify a `value-is` literal against the declared type. The literal is /// [`ValueIsOutcome::Compatible`] if it is a valid value for the declared - /// type, or — for the "any element/occurrence" relaxation — for the element - /// type of a list-shaped (optionally `option`-wrapped) declared type; - /// repeatable options already store their element type. + /// type. For a [`ValueIsMode::WholeOrOnePeel`] comparand (a non-collecting + /// value surface) it is *also* compatible — under the "any element / entry + /// equals this literal" relaxation — for the element type of a list/fixed-list + /// or the value type of a map (optionally `option`-wrapped) declared type. A + /// [`ValueIsMode::Exact`] comparand (a collecting surface, whose type is + /// already the per-occurrence type) gets no relaxation: matching one more + /// level would descend past a single occurrence. /// /// When neither comparison holds, the result is [`ValueIsOutcome::Mismatch`] /// unless the relevant comparison failed *purely* because the value /// descended into an unresolved reference, in which case it is /// [`ValueIsOutcome::BlockedByDanglingRef`] and the mismatch is suppressed /// (the unresolved reference is reported separately as `UnresolvedTypeRef`). - fn value_is_outcome(&self, declared: &SchemaType, value: &SchemaValue) -> ValueIsOutcome { + fn value_is_outcome( + &self, + declared: &SchemaType, + mode: ValueIsMode, + value: &SchemaValue, + ) -> ValueIsOutcome { let graph = &self.tool.schema; let direct = validate_value(graph, declared, value); if direct.is_ok() { return ValueIsOutcome::Compatible; } - // "any element/occurrence" relaxation: peel `option` wrappers (resolving - // refs along the way) and, for a list-shaped declared type, compare the - // literal against the element type. When this relaxation applies, its - // element comparison is the relevant one for classification. + // A collecting surface's comparand is already the per-occurrence type; no + // element/value relaxation applies. Classify on the direct comparison. + if mode == ValueIsMode::Exact { + return match direct { + Err(errors) if value_mismatch_is_only_dangling(&errors) => { + ValueIsOutcome::BlockedByDanglingRef + } + _ => ValueIsOutcome::Mismatch, + }; + } + + // "any element/entry" relaxation: peel `option` wrappers (resolving refs + // along the way) and, for a list/fixed-list-shaped declared type, compare + // the literal against the element type, or for a map-shaped type against + // the value type. When this relaxation applies, its comparison is the + // relevant one for classification. if let Ok(mut peeled) = graph.resolve_ref(declared) { while let SchemaType::Option { inner, .. } = peeled { match graph.resolve_ref(inner) { @@ -987,9 +1029,15 @@ impl<'a> Validator<'a> { } } } - if let SchemaType::List { element, .. } | SchemaType::FixedList { element, .. } = peeled - { - return match validate_value(graph, element, value) { + let relaxed = match peeled { + SchemaType::List { element, .. } | SchemaType::FixedList { element, .. } => { + Some(element.as_ref()) + } + SchemaType::Map { value: v, .. } => Some(v.as_ref()), + _ => None, + }; + if let Some(inner_ty) = relaxed { + return match validate_value(graph, inner_ty, value) { Ok(()) => ValueIsOutcome::Compatible, Err(errors) if value_mismatch_is_only_dangling(&errors) => { ValueIsOutcome::BlockedByDanglingRef @@ -1069,7 +1117,7 @@ fn register_option<'a>(graph: &'a SchemaGraph, scope: &mut NameScope<'a>, opt: & // type error is reported elsewhere. A dangling reference inside an otherwise // comparable type is handled at check time by [`Validator::value_is_outcome`]. let comparand = match option_value_type(graph, opt) { - Some(ty) => ValueComparand::Type(ty), + Some(ty) => ValueComparand::Type(ty, option_value_is_mode(opt)), None => ValueComparand::BlockedByTypeError, }; scope.typed.insert(opt.long.clone(), comparand); @@ -1078,6 +1126,18 @@ fn register_option<'a>(graph: &'a SchemaGraph, scope: &mut NameScope<'a>, opt: & } } +/// The `value-is` matching mode for an option: a scalar / optional-scalar option +/// is a non-collecting value surface (its declared value is matched with the +/// one-level relaxation); a repeatable-list or repeatable-map option collects +/// occurrences, so its per-occurrence comparand (element / map value type) is +/// matched exactly. +fn option_value_is_mode(opt: &OptionSpec) -> ValueIsMode { + match &opt.shape { + OptionShape::Scalar(_) | OptionShape::OptionalScalar(_) => ValueIsMode::WholeOrOnePeel, + OptionShape::RepeatableList(_) | OptionShape::RepeatableMap(_) => ValueIsMode::Exact, + } +} + /// Returns `true` if `ty` (resolving named references against `graph`) reaches a /// [`SchemaType::Variant`]. `visited` records the ref ids currently being /// resolved so recursive graphs terminate. diff --git a/sdks/rust/golem-rust-macro/src/tool/definition.rs b/sdks/rust/golem-rust-macro/src/tool/definition.rs index bdda0adb08..64a3bc8ddc 100644 --- a/sdks/rust/golem-rust-macro/src/tool/definition.rs +++ b/sdks/rust/golem-rust-macro/src/tool/definition.rs @@ -45,12 +45,37 @@ pub fn tool_definition_impl(attrs: TokenStream, item: TokenStream) -> TokenStrea // Building the IR validates every tool authoring attribute and surfaces // parse errors at compile time. - if let Err(err) = build_tool_definition_ir(&item_trait, version) { - return err.to_compile_error().into(); - } + let ir = match build_tool_definition_ir(&item_trait, version) { + Ok(ir) => ir, + Err(err) => return err.to_compile_error().into(), + }; + + // Metadata synthesis: the hidden free descriptor function that builds the + // runtime `ExtendedToolType`. It is emitted as a module-level free function + // so a parent tool's `#[command(subtree = path::Child)]` can reach it + // through the child trait's module path without a concrete `Self`. + let descriptor_fn = match crate::tool::descriptor::synthesize_descriptor_fn(&ir) { + Ok(tokens) => tokens, + Err(err) => return err.to_compile_error().into(), + }; + let descriptor_fn_ident = crate::tool::descriptor::descriptor_fn_ident(&ir.trait_ident); strip_helper_attrs(&mut item_trait); + // A hidden default method delegating to the free descriptor function, so the + // `#[tool_implementation]` registration ctor can call it through the trait. + let descriptor_item: TraitItem = syn::parse_quote! { + #[doc(hidden)] + fn __tool_descriptor() -> golem_rust::agentic::ExtendedToolType + where + Self: Sized, + { + #descriptor_fn_ident(&mut golem_rust::agentic::ToolBuildCtx::new()) + .expect("tool descriptor build failed") + } + }; + item_trait.items.push(descriptor_item); + let annotation_item: TraitItem = syn::parse_quote! { #[doc(hidden)] fn tool_implementation_annotation() where Self: Sized; @@ -60,6 +85,8 @@ pub fn tool_definition_impl(attrs: TokenStream, item: TokenStream) -> TokenStrea quote! { #[allow(async_fn_in_trait)] #item_trait + + #descriptor_fn } .into() } diff --git a/sdks/rust/golem-rust-macro/src/tool/descriptor.rs b/sdks/rust/golem-rust-macro/src/tool/descriptor.rs new file mode 100644 index 0000000000..1c06801f7b --- /dev/null +++ b/sdks/rust/golem-rust-macro/src/tool/descriptor.rs @@ -0,0 +1,2150 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Metadata synthesis: turning the parsed [`ToolDefinitionIr`] into the +//! `__golem_tool_descriptor_for_` free function that builds the runtime +//! [`ExtendedToolType`]. +//! +//! The free function is emitted alongside the `#[tool_definition]` trait so that +//! a parent tool's `#[command(subtree = path::Child)]` can reach it through the +//! child trait's module path even though no concrete `Self` is available. The +//! trait also gets a hidden `__tool_descriptor()` default method that calls the +//! free function; `#[tool_implementation]` emits the `#[ctor]` that registers +//! the descriptor, so only an implemented tool is ever registered. + +use crate::tool::helpers::to_kebab_case; +use crate::tool::ir::{ + ArgIr, ArgPlacement, ArgSubKind, CommandAnnotationsIr, CommandIr, ConstraintIr, DocIr, + PathDirectionIr, PathKindIr, QuantifierIr, RefIr, RepeatableMode, ResultIr, ToolDefinitionIr, +}; +use crate::tool::synthesis::doc_tokens; +use proc_macro2::TokenStream; +use quote::{format_ident, quote}; +use std::collections::BTreeSet; +use syn::spanned::Spanned; +use syn::{Error, Expr, GenericArgument, Ident, Path, PathArguments, ReturnType, Type}; + +/// The deterministic free-function name for a tool definition trait. +pub fn descriptor_fn_ident(trait_ident: &Ident) -> Ident { + format_ident!("__golem_tool_descriptor_for_{}", trait_ident) +} + +/// Emits the module-level `__golem_tool_descriptor_for_` free function. +pub fn synthesize_descriptor_fn(ir: &ToolDefinitionIr) -> Result { + let plan = Plan::analyze(ir)?; + let fn_ident = descriptor_fn_ident(&ir.trait_ident); + let trait_name = ir.trait_ident.to_string(); + + let version = match &ir.version { + Some(v) => quote! { #v.to_string() }, + None => quote! { env!("CARGO_PKG_VERSION").to_string() }, + }; + + // Index 0 is always the root command. + let root_node = build_root_node(ir, &plan)?; + + // Every non-root command becomes either a leaf subcommand or a grafted + // subtree, linked beneath the root (index 0). + let mut links = Vec::new(); + for (idx, cmd) in ir.commands.iter().enumerate() { + if Some(idx) == plan.root_idx { + continue; + } + if cmd.subtree.is_some() { + links.push(build_subtree_link(cmd, &plan)?); + } else { + links.push(build_leaf_link(cmd, &plan)?); + } + } + + Ok(quote! { + #[doc(hidden)] + #[allow(non_snake_case)] + pub fn #fn_ident( + ctx: &mut golem_rust::agentic::ToolBuildCtx, + ) -> ::std::result::Result< + golem_rust::agentic::ExtendedToolType, + golem_rust::agentic::ToolBuildError, + > { + ctx.with_descriptor(concat!(module_path!(), "::", #trait_name), |ctx| { + #[allow(unused_variables, unused_mut)] + let mut commands: ::std::vec::Vec = + ::std::vec::Vec::new(); + commands.push(#root_node); + #(#links)* + let mut __tool = golem_rust::agentic::ExtendedToolType { + version: #version, + commands, + }; + // A nested subtree child descriptor returns its raw tree with + // `value-is` literals still deferred; only the outermost + // descriptor normalizes the fully grafted tree, once every + // ancestor subtree global and inherited-global de-projection is in + // scope. See `ToolBuildCtx::is_outermost_descriptor`. + if ctx.is_outermost_descriptor() { + golem_rust::agentic::normalize_inherited_globals(&mut __tool)?; + } + ::std::result::Result::Ok(__tool) + }) + } + }) +} + +/// Macro-time facts derived from the trait, with all divergence rules checked. +struct Plan { + tool_name: String, + /// Index of the implicit-body method (`kebab(method) == tool name`), if any. + root_idx: Option, + /// Long names + aliases of the root command's globals; descendant commands + /// must not re-project these (they are inherited by walking root→node). + root_global_names: BTreeSet, +} + +impl Plan { + fn analyze(ir: &ToolDefinitionIr) -> Result { + let tool_name = to_kebab_case(&ir.trait_ident.to_string()); + + let mut implicit: Vec = Vec::new(); + for (idx, cmd) in ir.commands.iter().enumerate() { + if to_kebab_case(&cmd.method_ident.to_string()) == tool_name { + implicit.push(idx); + } + } + if implicit.len() > 1 { + let second = &ir.commands[implicit[1]]; + return Err(Error::new( + second.method_ident.span(), + format!( + "multiple methods map to the tool's root command name `{tool_name}`; \ + only one method may be the implicit-body handler (§5.8.1)" + ), + )); + } + let root_idx = implicit.first().copied(); + + if let Some(i) = root_idx { + let cmd = &ir.commands[i]; + if cmd.subtree.is_some() { + return Err(Error::new( + cmd.method_ident.span(), + "the implicit-body method cannot also be a #[command(subtree = ...)]", + )); + } + if let Some(name) = &cmd.name_override + && name != &tool_name + { + return Err(Error::new( + cmd.method_ident.span(), + format!( + "the implicit-body method's #[command(name = {name:?})] diverges from the \ + tool name {tool_name:?}; the root command name must equal the tool name (§5.8.1)" + ), + )); + } + } + + for (idx, cmd) in ir.commands.iter().enumerate() { + if Some(idx) == root_idx { + continue; + } + let name = command_name(cmd, &tool_name, false); + if name == tool_name { + return Err(Error::new( + cmd.method_ident.span(), + format!( + "command `{name}` collides with the tool's root command name; \ + rename the method or use #[command(name = ...)]" + ), + )); + } + if cmd.subtree.is_some() { + if cmd.annotations.is_some() { + return Err(Error::new( + cmd.method_ident.span(), + "annotations are not supported on a #[command(subtree = ...)] method \ + (the model places annotations on a command body)", + )); + } + if !cmd.constraints.is_empty() || cmd.result.is_some() { + return Err(Error::new( + cmd.method_ident.span(), + "#[constraint] / #[result] are not supported on a #[command(subtree = ...)] method", + )); + } + } + } + + let mut root_global_names = BTreeSet::new(); + if let Some(i) = root_idx { + for param in &ir.commands[i].params { + let arg = arg_for(&ir.commands[i], ¶m.ident); + if arg.map(|a| a.placement) == Some(Some(ArgPlacement::Global)) { + root_global_names.insert(to_kebab_case(¶m.ident.to_string())); + if let Some(a) = arg { + for alias in &a.aliases { + root_global_names.insert(alias.clone()); + } + } + } + } + } + + Ok(Plan { + tool_name, + root_idx, + root_global_names, + }) + } +} + +fn command_name(cmd: &CommandIr, tool_name: &str, is_root: bool) -> String { + if is_root { + tool_name.to_string() + } else { + cmd.name_override + .clone() + .unwrap_or_else(|| to_kebab_case(&cmd.method_ident.to_string())) + } +} + +fn arg_for<'a>(cmd: &'a CommandIr, ident: &Ident) -> Option<&'a ArgIr> { + cmd.args.iter().find(|a| &a.param == ident) +} + +/// The surface names a parameter would project onto: its kebab long name plus +/// any `#[arg(aliases = [...])]`. Used to decide whether a parameter repeats an +/// inherited global (which is keyed by long name *and* aliases), so a parameter +/// aliased to an ancestor global is de-projected even when its long name differs. +fn param_surface_names(ident: &Ident, arg: Option<&ArgIr>) -> Vec { + let mut names = vec![to_kebab_case(&ident.to_string())]; + if let Some(a) = arg { + names.extend(a.aliases.iter().cloned()); + } + names +} + +fn repeats_inherited_global( + ident: &Ident, + arg: Option<&ArgIr>, + inherited: &BTreeSet, +) -> bool { + param_surface_names(ident, arg) + .iter() + .any(|n| inherited.contains(n)) +} + +/// Builds the index-0 root command node. With an implicit-body method the root +/// is a full command (its globals + body); otherwise it is a pure dispatcher. +fn build_root_node(ir: &ToolDefinitionIr, plan: &Plan) -> Result { + if let Some(i) = plan.root_idx { + let cmd = &ir.commands[i]; + build_command_node(cmd, &plan.tool_name, true, &BTreeSet::new()) + } else { + let name = &plan.tool_name; + let doc = doc_tokens(&ir.doc); + Ok(quote! { + golem_rust::agentic::ExtendedCommandNode { + name: #name.to_string(), + aliases: ::std::vec::Vec::new(), + doc: #doc, + globals: golem_rust::agentic::ExtendedGlobals::default(), + subcommands: ::std::vec::Vec::new(), + body: ::std::option::Option::None, + } + }) + } +} + +/// Emits the block that pushes a leaf subcommand node and links it under root. +fn build_leaf_link(cmd: &CommandIr, plan: &Plan) -> Result { + let node = build_command_node(cmd, &plan.tool_name, false, &plan.root_global_names)?; + Ok(quote! { + { + let __idx = commands.len() as i32; + commands.push(#node); + commands[0].subcommands.push(__idx); + } + }) +} + +/// Emits the block that builds a child descriptor, grafts it as a pure +/// dispatcher, prepends the subtree method's params as placeholder globals, and +/// links it under root. +fn build_subtree_link(cmd: &CommandIr, plan: &Plan) -> Result { + let subtree = cmd.subtree.as_ref().expect("subtree present"); + let call_path = subtree_call_path(&subtree.path)?; + let expected_name = command_name(cmd, &plan.tool_name, false); + + let override_name = match &subtree.name_override { + Some(n) => quote! { ::std::option::Option::Some(#n.to_string()) }, + None => quote! { ::std::option::Option::None }, + }; + let override_doc = if cmd.doc == DocIr::default() { + quote! { ::std::option::Option::None } + } else { + let doc = doc_tokens(&cmd.doc); + quote! { ::std::option::Option::Some(#doc) } + }; + let override_aliases = if cmd.aliases.is_empty() { + quote! { ::std::option::Option::None } + } else { + let aliases = cmd.aliases.iter().map(|a| quote! { #a.to_string() }); + quote! { ::std::option::Option::Some(::std::vec![ #(#aliases),* ]) } + }; + + // The subtree method's params become globals on the graft placeholder so + // they propagate to every descendant subcommand. A param that repeats a + // global already inherited from the parent root command is not skipped here: + // it is emitted as a placeholder global and reconciled (removed when + // compatible, rejected when conflicting) by `normalize_inherited_globals`. + let mut opts = Vec::new(); + let mut flags = Vec::new(); + for param in &cmd.params { + let arg = arg_for(cmd, ¶m.ident); + // Subtree-method params only contribute propagating globals, never a tail + // positional, so tail inference is disabled (`is_last_param = false`). + match classify(¶m.ident, ¶m.ty, arg, true, false)? { + Projection::Option(spec) => opts.push(spec), + Projection::Flag(spec) => flags.push(spec), + _ => { + return Err(Error::new( + param.ident.span(), + "a #[command(subtree = ...)] method parameter must project to a global option or flag", + )); + } + } + } + + Ok(quote! { + { + let __child = #call_path(ctx)?; + let mut __graft = golem_rust::agentic::graft_subtree( + __child, + #expected_name, + #override_name, + #override_doc, + #override_aliases, + ::std::option::Option::None, + )?; + // The subtree method's own params become propagating globals on the + // graft placeholder (index 0), prepended ahead of any globals the + // child root already carries. Reconciliation against inherited + // globals (root + ancestor subtree globals) happens once over the + // whole tree in `normalize_inherited_globals`. + { + let __placeholder = &mut __graft[0]; + let mut __opts: ::std::vec::Vec = + ::std::vec![ #(#opts),* ]; + let mut __flags: ::std::vec::Vec = + ::std::vec![ #(#flags),* ]; + __opts.append(&mut __placeholder.globals.options); + __placeholder.globals.options = __opts; + __flags.append(&mut __placeholder.globals.flags); + __placeholder.globals.flags = __flags; + } + let __off = golem_rust::agentic::append_grafted_subtree(&mut commands, __graft); + commands[0].subcommands.push(__off); + } + }) +} + +/// Rewrites a subtree path `a::b::Child` to `a::b::__golem_tool_descriptor_for_Child`. +fn subtree_call_path(path: &Path) -> Result { + let mut rewritten = path.clone(); + let last = rewritten.segments.last_mut().ok_or_else(|| { + Error::new( + path.span(), + "subtree path must name a #[tool_definition] trait", + ) + })?; + if !matches!(last.arguments, PathArguments::None) { + return Err(Error::new( + path.span(), + "subtree path must not carry generic arguments", + )); + } + last.ident = descriptor_fn_ident(&last.ident); + Ok(rewritten) +} + +/// Builds an `ExtendedCommandNode` (with empty `subcommands`) for a root +/// implicit-body or leaf command. +fn build_command_node( + cmd: &CommandIr, + tool_name: &str, + is_root: bool, + inherited_globals: &BTreeSet, +) -> Result { + let name = command_name(cmd, tool_name, is_root); + let doc = doc_tokens(&cmd.doc); + let aliases = cmd.aliases.iter().map(|a| quote! { #a.to_string() }); + + let mut global_options = Vec::new(); + let mut global_flags = Vec::new(); + let mut fixed = Vec::new(); + let mut saw_optional_positional = false; + let mut tail: Option = None; + let mut body_options = Vec::new(); + let mut body_flags = Vec::new(); + let mut stdin: Option = None; + let mut stdout: Option = None; + + // The last *positional-eligible* parameter is the only one eligible to + // become a tail positional by inference: `Vec` at tail → tail positional, + // `Vec` elsewhere → repeatable option (§5.8). Globals, options, flags, + // streams, and de-projected inherited globals are never positionals, so they + // must not block tail inference for a `Vec` that precedes them. + let last_value_idx = cmd + .params + .iter() + .enumerate() + .rev() + .find_map(|(idx, param)| { + let arg = arg_for(cmd, ¶m.ident); + if is_positional_candidate(param, arg, is_root, inherited_globals) { + Some(idx) + } else { + None + } + }); + + for (idx, param) in cmd.params.iter().enumerate() { + let arg = arg_for(cmd, ¶m.ident); + // A parameter repeating a global inherited from the root command is not + // skipped here: it is projected normally and reconciled (removed when + // compatible, rejected when conflicting) by `normalize_inherited_globals` + // once the whole tree is assembled. Such a parameter is still excluded + // from tail-position inference (see `is_positional_candidate`), because a + // value the runtime will drop must not steal the tail slot from a + // genuine `Vec` body parameter. + let is_global = arg.map(|a| a.placement) == Some(Some(ArgPlacement::Global)); + // A parameter repeating a global inherited from the root command is + // emitted in its natural projected form but will be removed (when + // compatible) or rejected (when conflicting) by + // `normalize_inherited_globals`. It therefore does not participate in the + // body's positional-ordering rules: a value the runtime will drop must + // not constrain (or be constrained by) the genuine body positionals. + let is_inherited = + !is_root && repeats_inherited_global(¶m.ident, arg, inherited_globals); + let is_last_param = Some(idx) == last_value_idx; + match classify(¶m.ident, ¶m.ty, arg, is_global, is_last_param)? { + Projection::Stdin(spec) => { + if stdin.is_some() { + return Err(Error::new( + param.ident.span(), + "duplicate stdin stream parameter", + )); + } + stdin = Some(spec); + } + Projection::Stdout(spec) => { + if stdout.is_some() { + return Err(Error::new( + param.ident.span(), + "duplicate stdout stream parameter", + )); + } + stdout = Some(spec); + } + Projection::Option(spec) => { + if is_global { + global_options.push(spec); + } else { + body_options.push(spec); + } + } + Projection::Flag(spec) => { + if is_global { + global_flags.push(spec); + } else { + body_flags.push(spec); + } + } + Projection::Positional { tokens, required } => { + if is_global { + return Err(Error::new( + param.ident.span(), + "a global argument cannot be a positional; use an option or flag", + )); + } + // Inherited re-declarations are excluded from the ordering rules + // (they are removed/rejected by normalization); only genuine body + // positionals constrain ordering. + if !is_inherited { + // Positionals are `fixed*` then an optional `tail`; a fixed + // positional cannot follow the variadic tail, or the + // descriptor would silently drop it (variadic-only-at-tail is + // structural). + if tail.is_some() { + return Err(Error::new( + param.ident.span(), + "a fixed positional cannot appear after a tail positional; the tail positional must be the last positional", + )); + } + // Optional positionals must be trailing: once an optional + // fixed positional appears, no required one may follow it, + // otherwise the boundary between them is ambiguous. + if required && saw_optional_positional { + return Err(Error::new( + param.ident.span(), + "a required positional cannot appear after an optional positional; optional positionals must be trailing", + )); + } + if !required { + saw_optional_positional = true; + } + } + fixed.push(tokens); + } + Projection::Tail(spec) => { + if is_global { + return Err(Error::new( + param.ident.span(), + "a global argument cannot be a tail positional", + )); + } + // An inherited re-declaration explicitly marked as a tail is + // lowered to a droppable repeatable-list option surrogate (same + // surface name, same item type, collected value `list`) so + // the runtime normalization pass can compare its shape against + // the inherited global and either remove it (compatible) or + // reject it (`InheritedGlobalConflict`). Storing it as the body's + // single tail slot would let a re-declaration the runtime will + // drop steal the slot from a genuine `Vec` body tail. + if is_inherited { + let base = unwrap_generic1(¶m.ty, "Option").unwrap_or(¶m.ty); + let item = unwrap_generic1(base, "Vec").ok_or_else(|| { + Error::new( + param.ident.span(), + "a tail positional must be a `Vec` parameter", + ) + })?; + let name = to_kebab_case(¶m.ident.to_string()); + body_options.push(inherited_tail_option_surrogate_tokens(&name, item, arg)?); + continue; + } + if tail.is_some() { + return Err(Error::new( + param.ident.span(), + "a command may have at most one tail positional", + )); + } + tail = Some(spec); + } + } + } + + let constraints = build_constraints(cmd)?; + let (result_spec, errors) = build_result(cmd)?; + let annotations = build_annotations(cmd.annotations.as_ref()); + + let tail_tokens = match tail { + Some(t) => quote! { ::std::option::Option::Some(#t) }, + None => quote! { ::std::option::Option::None }, + }; + let stdin_tokens = match stdin { + Some(s) => quote! { ::std::option::Option::Some(#s) }, + None => quote! { ::std::option::Option::None }, + }; + let stdout_tokens = match stdout { + Some(s) => quote! { ::std::option::Option::Some(#s) }, + None => quote! { ::std::option::Option::None }, + }; + + let body = quote! { + golem_rust::agentic::ExtendedCommandBody { + positionals: golem_rust::agentic::ExtendedPositionals { + fixed: ::std::vec![ #(#fixed),* ], + tail: #tail_tokens, + }, + options: ::std::vec![ #(#body_options),* ], + flags: ::std::vec![ #(#body_flags),* ], + constraints: ::std::vec![ #(#constraints),* ], + stdin: #stdin_tokens, + stdout: #stdout_tokens, + result: #result_spec, + errors: #errors, + annotations: #annotations, + } + }; + + Ok(quote! { + golem_rust::agentic::ExtendedCommandNode { + name: #name.to_string(), + aliases: ::std::vec![ #(#aliases),* ], + doc: #doc, + globals: golem_rust::agentic::ExtendedGlobals { + options: ::std::vec![ #(#global_options),* ], + flags: ::std::vec![ #(#global_flags),* ], + }, + subcommands: ::std::vec::Vec::new(), + body: ::std::option::Option::Some(#body), + } + }) +} + +/// Whether a parameter is eligible to become a positional (fixed or tail), and +/// therefore participates in "last positional → tail" inference. Globals, +/// options, flags, streams, and de-projected inherited globals are excluded +/// because none of them can ever be a positional. +fn is_positional_candidate( + param: &crate::tool::ir::ParamIr, + arg: Option<&ArgIr>, + is_root: bool, + inherited_globals: &BTreeSet, +) -> bool { + if is_stream_type(¶m.ty) { + return false; + } + if !is_root && repeats_inherited_global(¶m.ident, arg, inherited_globals) { + return false; + } + match arg.and_then(|a| a.placement) { + Some(ArgPlacement::Global | ArgPlacement::Option | ArgPlacement::Flag) => false, + Some(ArgPlacement::Positional | ArgPlacement::Tail) => true, + None => { + // No explicit placement: replicate the type-based inference in + // `classify`. A flag/count-flag kind, an inferred `bool` flag, or an + // inferred map option is never a positional; a `Vec` or scalar is. + if arg.and_then(|a| a.sub_kind).is_some() { + return false; + } + let base = unwrap_generic1(¶m.ty, "Option").unwrap_or(¶m.ty); + if type_last_ident(base).as_deref() == Some("bool") { + return false; + } + if is_map_type(base) { + return false; + } + true + } + } +} + +/// The projected surface form of a parameter. +enum Projection { + Positional { tokens: TokenStream, required: bool }, + Tail(TokenStream), + Option(TokenStream), + Flag(TokenStream), + Stdin(TokenStream), + Stdout(TokenStream), +} + +/// The concrete command-surface a parameter projects onto, used to validate that +/// every authored placement-structural `#[arg]` field is actually lowered by that +/// surface. Value-schema refinements (text/path/url/numeric) are validated +/// separately against the value type by [`value_graph_tokens`] / +/// `reject_*_refinements`, so they are deliberately not represented here. +#[derive(Clone, Copy)] +enum SurfaceKind { + Positional, + Tail, + OptionScalar, + OptionList, + OptionMap, + BoolFlag, + CountFlag, + Stream, +} + +/// Which placement-structural `#[arg]` fields a [`SurfaceKind`] lowers. A field +/// set in `#[arg]` but not lowered by the resolved surface is an authoring error +/// (it would be silently dropped), so it is rejected at macro time. +struct AllowedStructuralAttrs { + short: bool, + aliases: bool, + env: bool, + required: bool, + negatable: bool, + optional_scalar: bool, + repeatable: bool, + delim: bool, + default: bool, + separator: bool, + verbatim: bool, + accepts_stdio: bool, + value_name: bool, +} + +impl SurfaceKind { + /// Human-readable surface name for diagnostics. + fn describe(self) -> &'static str { + match self { + SurfaceKind::Positional => "a positional", + SurfaceKind::Tail => "a tail positional", + SurfaceKind::OptionScalar => "a scalar option", + SurfaceKind::OptionList => "a repeatable list option", + SurfaceKind::OptionMap => "a map option", + SurfaceKind::BoolFlag => "a flag", + SurfaceKind::CountFlag => "a count flag", + SurfaceKind::Stream => "a stdin/stdout stream", + } + } + + fn allowed_structural_attrs(self) -> AllowedStructuralAttrs { + // Every field defaults to "not lowered"; each surface opts in only to the + // fields it actually projects (see the corresponding `*_spec_tokens`). + let none = AllowedStructuralAttrs { + short: false, + aliases: false, + env: false, + required: false, + negatable: false, + optional_scalar: false, + repeatable: false, + delim: false, + default: false, + separator: false, + verbatim: false, + accepts_stdio: false, + value_name: false, + }; + match self { + SurfaceKind::Positional => AllowedStructuralAttrs { + required: true, + default: true, + accepts_stdio: true, + value_name: true, + ..none + }, + SurfaceKind::Tail => AllowedStructuralAttrs { + separator: true, + verbatim: true, + accepts_stdio: true, + value_name: true, + ..none + }, + SurfaceKind::OptionScalar => AllowedStructuralAttrs { + short: true, + aliases: true, + env: true, + required: true, + optional_scalar: true, + default: true, + value_name: true, + ..none + }, + SurfaceKind::OptionList | SurfaceKind::OptionMap => AllowedStructuralAttrs { + short: true, + aliases: true, + env: true, + required: true, + repeatable: true, + delim: true, + default: true, + value_name: true, + ..none + }, + SurfaceKind::BoolFlag => AllowedStructuralAttrs { + short: true, + aliases: true, + env: true, + negatable: true, + default: true, + ..none + }, + SurfaceKind::CountFlag => AllowedStructuralAttrs { + short: true, + aliases: true, + env: true, + ..none + }, + SurfaceKind::Stream => none, + } + } +} + +/// Rejects placement-structural `#[arg]` fields the resolved [`SurfaceKind`] does +/// not lower, so an authored field is never silently dropped. Value-schema +/// refinements are validated elsewhere (against the value type) and are not +/// considered here. +fn reject_unconsumed_structural_attrs(arg: &ArgIr, kind: SurfaceKind) -> Result<(), Error> { + let where_ = kind.describe(); + let span = arg.param.span(); + let allowed = kind.allowed_structural_attrs(); + let check = |is_set: bool, ok: bool, field: &str| -> Result<(), Error> { + if is_set && !ok { + Err(Error::new( + span, + format!("`{field}` is not valid on {where_}"), + )) + } else { + Ok(()) + } + }; + check(arg.short.is_some(), allowed.short, "short")?; + check(!arg.aliases.is_empty(), allowed.aliases, "aliases")?; + check(arg.env.is_some(), allowed.env, "env")?; + check(arg.required.is_some(), allowed.required, "required")?; + check(arg.negatable.is_some(), allowed.negatable, "negatable")?; + check( + arg.optional_scalar, + allowed.optional_scalar, + "optional_scalar", + )?; + check(arg.repeatable.is_some(), allowed.repeatable, "repeatable")?; + check(arg.delim.is_some(), allowed.delim, "delim")?; + check(arg.default.is_some(), allowed.default, "default")?; + check(arg.separator.is_some(), allowed.separator, "separator")?; + check(arg.verbatim, allowed.verbatim, "verbatim")?; + check(arg.accepts_stdio, allowed.accepts_stdio, "accepts_stdio")?; + check(arg.value_name.is_some(), allowed.value_name, "value_name")?; + Ok(()) +} + +/// Rejects every `#[arg]` field other than documentation on a stdin/stdout +/// stream parameter. A stream is projected purely from its `InputStream` / +/// `OutputStream` type ([`stream_spec_tokens`] lowers only `doc`), so an explicit +/// placement, `kind`, value-schema refinement, or any structural field would be +/// silently dropped. +fn reject_stream_attrs(arg: &ArgIr) -> Result<(), Error> { + let span = arg.param.span(); + if arg.placement.is_some() { + return Err(Error::new( + span, + "an explicit placement is not valid on a stdin/stdout stream parameter", + )); + } + if arg.sub_kind.is_some() { + return Err(Error::new( + span, + "`kind = \"flag\"` / `\"count-flag\"` is not valid on a stdin/stdout stream parameter", + )); + } + reject_text_path_url_refinements(arg, "a stdin/stdout stream")?; + if arg.bounds.is_some() || arg.unit.is_some() || arg.raw_min.is_some() || arg.raw_max.is_some() + { + return Err(Error::new( + span, + "numeric refinements (`min`/`max`/`bounds`/`unit`) are not valid on a stdin/stdout stream", + )); + } + reject_unconsumed_structural_attrs(arg, SurfaceKind::Stream) +} + +/// Projects a single parameter onto its command-surface form, applying explicit +/// `#[arg]` placement and type-based inference. +/// +/// A record or enum parameter becomes the value schema of a single CLI surface +/// (an option, positional, or global whose value type is the record/enum). Record +/// fields are never flattened into sibling options, and enum parameters are never +/// expanded into subcommands: the command tree is built only from trait methods +/// and `#[command(subtree = ...)]`, and records/enums flow through the value +/// schema rather than the command grammar. +fn classify( + ident: &Ident, + ty: &Type, + arg: Option<&ArgIr>, + is_global: bool, + is_last_param: bool, +) -> Result { + let name = to_kebab_case(&ident.to_string()); + + // Streams are not value schemas; detect them by type name. + if let Some(last) = type_last_ident(ty) { + if last == "InputStream" { + if let Some(arg) = arg { + reject_stream_attrs(arg)?; + } + return Ok(Projection::Stdin(stream_spec_tokens(arg))); + } + if last == "OutputStream" { + if let Some(arg) = arg { + reject_stream_attrs(arg)?; + } + return Ok(Projection::Stdout(stream_spec_tokens(arg))); + } + } + + // Unwrap a single `Option` layer: it only makes the argument not-required. + let (base_ty, optional) = match unwrap_generic1(ty, "Option") { + Some(inner) => (inner, true), + None => (ty, false), + }; + + let placement = arg.and_then(|a| a.placement); + let sub_kind = arg.and_then(|a| a.sub_kind); + + // `Global` placement (and the `is_global` subtree-dispatcher path) only marks a + // parameter as propagating to descendant commands; it does not select a + // command surface. A global is always an option or a flag — never a positional + // or tail — so an explicit positional/tail placement on a global is a + // contradiction (it would be silently turned into an option). Reject it, and + // otherwise infer the surface (flag vs option) from the type/kind exactly as + // for a local argument by treating `Global` as "no explicit surface". + if is_global + && matches!( + placement, + Some(ArgPlacement::Positional | ArgPlacement::Tail) + ) + { + return Err(Error::new( + ident.span(), + "a global parameter cannot be a positional or tail; globals must be options or flags", + )); + } + let surface = match placement { + Some(ArgPlacement::Global) => None, + other => other, + }; + + // An explicit value-carrying placement (option/positional/tail) contradicts a + // flag kind: a flag has no value schema. Reject rather than letting the kind + // silently win and discard the authored placement. + if let (Some(p), Some(k)) = (surface, sub_kind) + && matches!( + p, + ArgPlacement::Option | ArgPlacement::Positional | ArgPlacement::Tail + ) + && matches!(k, ArgSubKind::Flag | ArgSubKind::CountFlag) + { + return Err(Error::new( + ident.span(), + "a flag kind (`kind = \"flag\"` / `\"count-flag\"`) cannot be combined with an explicit option/positional/tail placement", + )); + } + + let is_bool = type_last_ident(base_ty).as_deref() == Some("bool"); + let vec_item = unwrap_generic1(base_ty, "Vec"); + let map_ty = if is_map_type(base_ty) { + Some(base_ty) + } else { + None + }; + + // Flags (explicit placement, sub-kind, or inferred from `bool`). A global bool + // with no explicit `kind` still follows the bool→flag rule (`surface` is + // `None` for a global), so it becomes a global flag rather than a value option. + let is_flag = matches!(surface, Some(ArgPlacement::Flag)) + || matches!(sub_kind, Some(ArgSubKind::Flag | ArgSubKind::CountFlag)) + || (surface.is_none() && is_bool); + if is_flag { + // A flag is always present in the canonical input model (a bool flag is + // present/absent with a default; a count flag counts occurrences, with + // absence meaning zero). `FlagShape` carries no optionality, so an + // `Option<_>` parameter cannot be represented and would silently diverge + // from the metadata. Reject it rather than dropping the wrapper. + if optional { + return Err(Error::new( + ident.span(), + "a flag parameter must not be `Option<_>`: flags are always present (a bool flag has a default, a count flag counts occurrences), so optionality has no canonical representation; use the bare type (`bool` / `u32`)", + )); + } + // The projected flag shape must agree with the parameter's Rust type: + // a count flag carries an integer count (`-vvv` → `u32`), while a bool + // flag carries a boolean (`--name` / `--no-name`). Anything else would + // produce metadata that disagrees with the implementation signature. + if matches!(sub_kind, Some(ArgSubKind::CountFlag)) { + if type_last_ident(base_ty).as_deref() != Some("u32") { + return Err(Error::new( + ident.span(), + "a count flag parameter must be `u32`: count flags are exposed as a `u32` canonical input field, so any other type would make the metadata disagree with the implementation signature", + )); + } + } else if !is_bool { + return Err(Error::new( + ident.span(), + "a flag parameter must be `bool` (or `Option`); for a count flag use `kind = \"count-flag\"` with an integer type", + )); + } + if let Some(arg) = arg { + let kind = if matches!(sub_kind, Some(ArgSubKind::CountFlag)) { + SurfaceKind::CountFlag + } else { + SurfaceKind::BoolFlag + }; + reject_unconsumed_structural_attrs(arg, kind)?; + } + return Ok(Projection::Flag(flag_spec_tokens(&name, base_ty, arg)?)); + } + + // Tail positional: explicit `#[arg(... = "tail")]`, or — following the + // uniform projection rule (§5.8) "`Vec` at tail → tail positional, + // `Vec` elsewhere → repeatable option" — an unmarked `Vec` that is the + // last value parameter (streams and inherited globals don't count). + let infer_tail = surface.is_none() && !is_global && vec_item.is_some() && is_last_param; + if matches!(surface, Some(ArgPlacement::Tail)) || infer_tail { + // A tail positional is inherently variadic (zero or more), and + // `ExtendedTailPositional` (like the WIT `tail-positional`) has no + // required/optional/default field. An `Option>` therefore has no + // way to represent its `None` state and the `Option` wrapper would be + // silently dropped, making the metadata disagree with the implementation + // signature. Reject it; a bare `Vec` already encodes "none supplied" as + // an empty tail. (Same representability rule as `Option<_>` flags.) + if optional { + return Err(Error::new( + ident.span(), + "a tail positional must not be `Option<_>`: a tail positional is already variadic (zero or more) and has no representation for an additional optional/absent state, so the `Option` wrapper would be silently dropped; use `Vec` (an empty tail already means none supplied)", + )); + } + let item = vec_item.ok_or_else(|| { + Error::new( + ident.span(), + "a tail positional must be a `Vec` parameter", + ) + })?; + if let Some(arg) = arg { + reject_unconsumed_structural_attrs(arg, SurfaceKind::Tail)?; + } + return Ok(Projection::Tail(tail_tokens(&name, item, arg)?)); + } + + // Options: explicit placement, any non-flag global (globals can only be + // options or flags, never positionals), or inferred collection types. + let is_option = matches!(surface, Some(ArgPlacement::Option)) + || is_global + || (surface.is_none() && (vec_item.is_some() || map_ty.is_some())); + if is_option { + if let Some(arg) = arg { + let kind = if vec_item.is_some() { + SurfaceKind::OptionList + } else if map_ty.is_some() { + SurfaceKind::OptionMap + } else { + SurfaceKind::OptionScalar + }; + reject_unconsumed_structural_attrs(arg, kind)?; + } + let spec = option_spec_tokens(&name, base_ty, vec_item, map_ty, optional, arg)?; + return Ok(Projection::Option(spec)); + } + + // Otherwise a fixed positional. Required by default; `Option` or + // `required = false` makes it optional (must match `positional_tokens`). + if let Some(arg) = arg { + reject_unconsumed_structural_attrs(arg, SurfaceKind::Positional)?; + } + let required = !optional && arg.and_then(|a| a.required).unwrap_or(true); + Ok(Projection::Positional { + tokens: positional_tokens(&name, base_ty, optional, arg)?, + required, + }) +} + +fn stream_spec_tokens(arg: Option<&ArgIr>) -> TokenStream { + let doc = arg_doc_tokens(arg); + quote! { + golem_rust::agentic::StreamSpec { + doc: #doc, + mime: ::std::vec::Vec::new(), + required: true, + } + } +} + +fn flag_spec_tokens(name: &str, base_ty: &Type, arg: Option<&ArgIr>) -> Result { + let doc = arg_doc_tokens(arg); + let short = opt_char(arg.and_then(|a| a.short)); + let aliases = alias_tokens(arg); + let env_var = opt_str(arg.and_then(|a| a.env.as_ref())); + + let is_count = matches!(arg.and_then(|a| a.sub_kind), Some(ArgSubKind::CountFlag)); + if let Some(arg) = arg { + reject_flag_value_refinements(arg, is_count)?; + } + + let shape = if is_count { + let max = match arg.and_then(|a| a.raw_max.as_ref()) { + Some(expr) => quote! { ::std::option::Option::Some({ let __m: u32 = #expr; __m }) }, + None => quote! { ::std::option::Option::None }, + }; + quote! { golem_rust::golem_agentic::golem::tool::common::FlagShape::CountFlag(#max) } + } else { + let default = match arg.and_then(|a| a.default.as_ref()) { + Some(expr) => bool_default(expr)?, + None => quote! { false }, + }; + let negatable = arg.and_then(|a| a.negatable).unwrap_or(false); + quote! { + golem_rust::golem_agentic::golem::tool::common::FlagShape::BoolFlag( + golem_rust::golem_agentic::golem::tool::common::BoolFlagShape { + default: #default, + negatable: #negatable, + } + ) + } + }; + + // `bool`/count types carry no author value schema; nothing to build from base_ty. + let _ = base_ty; + Ok(quote! { + golem_rust::agentic::FlagSpec { + long: #name.to_string(), + short: #short, + aliases: #aliases, + doc: #doc, + shape: #shape, + env_var: #env_var, + } + }) +} + +/// Rejects text/path/url refinement keys, which target a leaf scalar value +/// schema and so cannot apply to `context`. A flag has no author value schema; a +/// map option's value graph is the map container, not its leaf entries. Applying +/// them anyway would silently drop the authored refinement. +fn reject_text_path_url_refinements(arg: &ArgIr, context: &str) -> Result<(), Error> { + let span = arg.param.span(); + if arg.regex.is_some() || arg.min_length.is_some() || arg.max_length.is_some() { + return Err(Error::new( + span, + format!( + "text refinements (`regex`/`min_length`/`max_length`) are not valid on {context}" + ), + )); + } + if arg.path_kind.is_some() || arg.direction.is_some() || arg.mime.is_some() { + return Err(Error::new( + span, + format!("path refinements (`kind`/`direction`/`mime`) are not valid on {context}"), + )); + } + if arg.schemes.is_some() { + return Err(Error::new( + span, + format!("url refinements (`schemes`) are not valid on {context}"), + )); + } + Ok(()) +} + +/// Rejects `#[arg]` value-schema refinements on a flag. A flag carries no author +/// value schema (a bool flag is present/absent; a count flag is an occurrence +/// count), so text/path/url/numeric refinements would be silently dropped and +/// produce metadata that disagrees with the authored `#[arg]`. A count flag's +/// `max` (the count cap) is the only refinement it accepts; `default` and +/// `negatable` belong to bool flags only. +fn reject_flag_value_refinements(arg: &ArgIr, is_count: bool) -> Result<(), Error> { + reject_text_path_url_refinements(arg, "a flag")?; + let span = arg.param.span(); + if arg.bounds.is_some() || arg.unit.is_some() { + return Err(Error::new( + span, + "numeric refinements (`bounds`/`unit`) are not valid on a flag", + )); + } + if arg.raw_min.is_some() { + return Err(Error::new(span, "`min` is not valid on a flag")); + } + if arg.raw_max.is_some() && !is_count { + return Err(Error::new( + span, + "`max` is only valid on a count flag (`kind = \"count-flag\"`)", + )); + } + // `default` / `negatable` placement validity (allowed on bool flags, rejected + // on count flags) is enforced by `reject_unconsumed_structural_attrs`. + Ok(()) +} + +/// Rejects `#[arg]` value-schema refinements on a map option. A map's value +/// graph is the map container; the refinement keys target leaf scalars and have +/// no map-entry syntax, so they would be silently dropped. +fn reject_map_value_refinements(arg: &ArgIr) -> Result<(), Error> { + reject_text_path_url_refinements(arg, "a map option")?; + if arg.raw_min.is_some() || arg.raw_max.is_some() || arg.bounds.is_some() || arg.unit.is_some() + { + return Err(Error::new( + arg.param.span(), + "numeric refinements (`min`/`max`/`bounds`/`unit`) are not valid on a map option", + )); + } + Ok(()) +} + +fn bool_default(expr: &Expr) -> Result { + match expr { + Expr::Lit(syn::ExprLit { + lit: syn::Lit::Bool(b), + .. + }) => { + let v = b.value; + Ok(quote! { #v }) + } + // Peel parentheses/groups so a flag default accepts the same literal forms + // as the general metadata-literal grammar (`tool_literal_tokens`), e.g. + // `default = (true)`. + Expr::Paren(p) => bool_default(&p.expr), + Expr::Group(g) => bool_default(&g.expr), + other => Err(Error::new( + other.span(), + "a flag default must be a boolean literal (`true` or `false`)", + )), + } +} + +fn option_spec_tokens( + name: &str, + base_ty: &Type, + vec_item: Option<&Type>, + map_ty: Option<&Type>, + optional: bool, + arg: Option<&ArgIr>, +) -> Result { + let doc = arg_doc_tokens(arg); + let short = opt_char(arg.and_then(|a| a.short)); + let aliases = alias_tokens(arg); + let value_name = opt_str(arg.and_then(|a| a.value_name.as_ref())); + let env_var = opt_str(arg.and_then(|a| a.env.as_ref())); + + let position = format!("option --{name}"); + let shape = if let Some(item) = vec_item { + let graph = value_graph_tokens(item, arg, MinMaxRole::Bound, &position)?; + let rep = repetition_tokens(arg)?; + quote! { + golem_rust::agentic::ExtendedOptionShape::RepeatableList( + golem_rust::agentic::ExtendedRepeatableListShape { + repetition: #rep, + item_type: #graph, + } + ) + } + } else if let Some(map) = map_ty { + if let Some(arg) = arg { + reject_map_value_refinements(arg)?; + } + let graph = value_graph_tokens(map, arg, MinMaxRole::Forbidden, &position)?; + let rep = repetition_tokens(arg)?; + quote! { + golem_rust::agentic::ExtendedOptionShape::RepeatableMap( + golem_rust::agentic::ExtendedRepeatableMapShape { + repetition: #rep, + map_type: #graph, + duplicate_key_policy: + golem_rust::golem_agentic::golem::tool::common::DuplicateKeyPolicy::Reject, + } + ) + } + } else { + let graph = value_graph_tokens(base_ty, arg, MinMaxRole::Bound, &position)?; + if arg.map(|a| a.optional_scalar).unwrap_or(false) { + quote! { golem_rust::agentic::ExtendedOptionShape::OptionalScalar(#graph) } + } else { + quote! { golem_rust::agentic::ExtendedOptionShape::Scalar(#graph) } + } + }; + + // An `Option` option is never required; otherwise honor `required`. + let required = !optional && arg.and_then(|a| a.required).unwrap_or(false); + + let default = match arg.and_then(|a| a.default.as_ref()) { + Some(expr) => { + let lit = tool_literal_tokens(expr)?; + quote! { + ::std::option::Option::Some(golem_rust::agentic::literal_to_schema_value( + &golem_rust::agentic::option_collected_graph(&__shape), + &#lit, + )?) + } + } + None => quote! { ::std::option::Option::None }, + }; + + Ok(quote! { + { + let __shape = #shape; + let __default = #default; + golem_rust::agentic::ExtendedOptionSpec { + long: #name.to_string(), + short: #short, + aliases: #aliases, + doc: #doc, + value_name: #value_name, + shape: __shape, + default: __default, + required: #required, + env_var: #env_var, + } + } + }) +} + +fn positional_tokens( + name: &str, + base_ty: &Type, + optional: bool, + arg: Option<&ArgIr>, +) -> Result { + let doc = arg_doc_tokens(arg); + let value_name = opt_str(arg.and_then(|a| a.value_name.as_ref())); + let graph = value_graph_tokens( + base_ty, + arg, + MinMaxRole::Bound, + &format!("positional {name}"), + )?; + let accepts_stdio = arg.map(|a| a.accepts_stdio).unwrap_or(false); + // Positionals are required by default; `Option` or `required = false` + // makes them optional. + let required = !optional && arg.and_then(|a| a.required).unwrap_or(true); + + let default = match arg.and_then(|a| a.default.as_ref()) { + Some(expr) => { + let lit = tool_literal_tokens(expr)?; + quote! { + ::std::option::Option::Some(golem_rust::agentic::literal_to_schema_value( + &__type, &#lit, + )?) + } + } + None => quote! { ::std::option::Option::None }, + }; + + Ok(quote! { + { + let __type = #graph; + let __default = #default; + golem_rust::agentic::ExtendedPositional { + name: #name.to_string(), + doc: #doc, + value_name: #value_name, + type_: __type, + default: __default, + required: #required, + accepts_stdio: #accepts_stdio, + } + } + }) +} + +fn tail_tokens(name: &str, item: &Type, arg: Option<&ArgIr>) -> Result { + // `ExtendedTailPositional` (and the WIT `tail-positional` record) has no + // default field: a variadic tail has no single default value. An authored + // `default` is rejected by `reject_unconsumed_structural_attrs` before this + // point rather than silently dropped. + let doc = arg_doc_tokens(arg); + let value_name = opt_str(arg.and_then(|a| a.value_name.as_ref())); + // A tail's `min`/`max` bound the *occurrence count* (how many items), not a + // numeric range on each item, so the item's value graph must not consume them + // as numeric bounds (`MinMaxRole::Occurrence`). Per-item `bounds`/`unit` + // refinements still apply to the item type. + let graph = value_graph_tokens( + item, + arg, + MinMaxRole::Occurrence, + &format!("tail positional {name}"), + )?; + let min = match arg.and_then(|a| a.raw_min.as_ref()) { + Some(expr) => quote! { { let __m: u32 = #expr; __m } }, + None => quote! { 0u32 }, + }; + let max = match arg.and_then(|a| a.raw_max.as_ref()) { + Some(expr) => quote! { ::std::option::Option::Some({ let __m: u32 = #expr; __m }) }, + None => quote! { ::std::option::Option::None }, + }; + let separator = opt_str(arg.and_then(|a| a.separator.as_ref())); + let verbatim = arg.map(|a| a.verbatim).unwrap_or(false); + let accepts_stdio = arg.map(|a| a.accepts_stdio).unwrap_or(false); + + Ok(quote! { + golem_rust::agentic::ExtendedTailPositional { + name: #name.to_string(), + doc: #doc, + value_name: #value_name, + item_type: #graph, + min: #min, + max: #max, + separator: #separator, + verbatim: #verbatim, + accepts_stdio: #accepts_stdio, + } + }) +} + +/// Lowers an inherited re-declaration that is explicitly marked as a tail +/// positional to a repeatable-list option surrogate. The surrogate keeps the +/// parameter's surface name and item type (so its collected value is +/// `list`, matching a tail's collected value), letting the runtime +/// normalization pass compare it against the inherited global and either drop it +/// (compatible) or reject it (`InheritedGlobalConflict`). It is never the body's +/// structural tail slot, so a genuine `Vec` body tail is not displaced. A +/// tail's `min`/`max` bound the occurrence count rather than the item, so the +/// item graph is built with `MinMaxRole::Occurrence`. +fn inherited_tail_option_surrogate_tokens( + name: &str, + item: &Type, + arg: Option<&ArgIr>, +) -> Result { + let doc = arg_doc_tokens(arg); + let aliases = alias_tokens(arg); + let value_name = opt_str(arg.and_then(|a| a.value_name.as_ref())); + let graph = value_graph_tokens( + item, + arg, + MinMaxRole::Occurrence, + &format!("inherited tail positional {name}"), + )?; + Ok(quote! { + golem_rust::agentic::ExtendedOptionSpec { + long: #name.to_string(), + short: ::std::option::Option::None, + aliases: #aliases, + doc: #doc, + value_name: #value_name, + shape: golem_rust::agentic::ExtendedOptionShape::RepeatableList( + golem_rust::agentic::ExtendedRepeatableListShape { + repetition: + golem_rust::golem_agentic::golem::tool::common::Repetition::Repeated, + item_type: #graph, + } + ), + default: ::std::option::Option::None, + required: false, + env_var: ::std::option::Option::None, + } + }) +} + +fn repetition_tokens(arg: Option<&ArgIr>) -> Result { + let mode = arg + .and_then(|a| a.repeatable) + .unwrap_or(RepeatableMode::Repeated); + let delim = arg.and_then(|a| a.delim); + match mode { + RepeatableMode::Repeated => { + // `Repeated` carries no delimiter; a `delim` set here would be + // silently dropped, so reject it rather than ignore it. + if delim.is_some() { + return Err(Error::new( + arg.map(|a| a.param.span()) + .unwrap_or_else(proc_macro2::Span::call_site), + "`delim` requires `repeatable = \"delimited\"` or `repeatable = \"either\"`", + )); + } + Ok(quote! { golem_rust::golem_agentic::golem::tool::common::Repetition::Repeated }) + } + RepeatableMode::Delimited => { + let d = delim.ok_or_else(|| { + Error::new( + proc_macro2::Span::call_site(), + "repeatable = \"delimited\" requires a `delim = ''`", + ) + })?; + Ok(quote! { golem_rust::golem_agentic::golem::tool::common::Repetition::Delimited(#d) }) + } + RepeatableMode::Either => { + let d = delim.ok_or_else(|| { + Error::new( + proc_macro2::Span::call_site(), + "repeatable = \"either\" requires a `delim = ''`", + ) + })?; + Ok(quote! { golem_rust::golem_agentic::golem::tool::common::Repetition::Either(#d) }) + } + } +} + +/// How a value graph interprets the `#[arg]` `min`/`max` keys, which are +/// overloaded: on most slots they are numeric bounds on the value, but on a tail +/// they bound the occurrence count (handled by the caller). `bounds`/`unit` +/// refine the value's numeric schema for `Bound`/`Occurrence`; `Forbidden` skips +/// all numeric refinements. +#[derive(Clone, Copy)] +enum MinMaxRole { + /// Scalars, fixed positionals, and list/scalar option items: `min`/`max` + /// (and `bounds`/`unit`) refine the value's numeric schema. + Bound, + /// Tail items: `min`/`max` bound the occurrence count (consumed by the + /// caller); only `bounds`/`unit` refine the item's numeric schema. + Occurrence, + /// Contexts where numeric refinements are intentionally not applied: a + /// `value_is` comparand (numeric bounds don't change the value variant) and a + /// map option (whose author-facing numeric keys are rejected up front by + /// `reject_map_value_refinements`). + Forbidden, +} + +/// Builds a `SchemaGraph` expression for `inner_ty`, applying the `#[arg]` +/// refinements (text/path/url/numeric) that match the attribute keys present. +fn value_graph_tokens( + inner_ty: &Type, + arg: Option<&ArgIr>, + min_max: MinMaxRole, + position: &str, +) -> Result { + let base = quote! { + golem_rust::agentic::tool_value_schema::<#inner_ty>(#position)? + }; + let Some(arg) = arg else { + return Ok(base); + }; + + let mut steps = Vec::new(); + + if arg.regex.is_some() || arg.min_length.is_some() || arg.max_length.is_some() { + // Text refinements apply to a string-backed schema. A recognized + // non-text type would be coerced to a `Text` schema, producing metadata + // that disagrees with the implementation signature. + if is_known_non_text(inner_ty) { + return Err(Error::new( + arg.param.span(), + "text refinements (`regex`/`min_length`/`max_length`) require a text-typed parameter", + )); + } + let regex = opt_str(arg.regex.as_ref()); + let min_len = opt_u32(arg.min_length); + let max_len = opt_u32(arg.max_length); + steps.push(quote! { + __g.root = golem_rust::agentic::refine_text(__g.root, #regex, #min_len, #max_len)?; + }); + } + if arg.path_kind.is_some() || arg.direction.is_some() || arg.mime.is_some() { + // Path refinements apply to a path-backed schema. A recognized non-path + // type would be coerced to a `Path` schema, producing metadata that + // disagrees with the implementation signature. + if is_known_non_path(inner_ty) { + return Err(Error::new( + arg.param.span(), + "path refinements (`kind`/`direction`/`mime`) require a path-typed parameter", + )); + } + let direction = opt_direction(arg.direction); + let kind = opt_path_kind(arg.path_kind); + let mime = opt_str_vec(arg.mime.as_ref()); + steps.push(quote! { + __g.root = golem_rust::agentic::refine_path(__g.root, #direction, #kind, #mime)?; + }); + } + if arg.schemes.is_some() { + // Url refinements apply to a url-backed schema. A recognized non-url + // type would be coerced to a `Url` schema, producing metadata that + // disagrees with the implementation signature. + if is_known_non_url(inner_ty) { + return Err(Error::new( + arg.param.span(), + "url refinements (`schemes`) require a url-typed parameter", + )); + } + let schemes = opt_str_vec(arg.schemes.as_ref()); + steps.push(quote! { + __g.root = golem_rust::agentic::refine_url(__g.root, #schemes)?; + }); + } + // `bounds`/`unit` always refine the value's numeric schema. `min`/`max` + // refine it only when this slot interprets them as numeric bounds; on a tail + // they bound the occurrence count (consumed by the caller) and on a map value + // no numeric refinement applies at all. + let (min_max_are_bounds, numeric_allowed) = match min_max { + MinMaxRole::Bound => (true, true), + MinMaxRole::Occurrence => (false, true), + MinMaxRole::Forbidden => (false, false), + }; + let slot_min = min_max_are_bounds.then_some(arg.raw_min.as_ref()).flatten(); + let slot_max = min_max_are_bounds.then_some(arg.raw_max.as_ref()).flatten(); + if numeric_allowed + && (arg.bounds.is_some() || arg.unit.is_some() || slot_min.is_some() || slot_max.is_some()) + { + // Numeric refinements apply to a numeric schema. A recognized + // non-numeric type would have its restrictions silently dropped by + // `refine_numeric`, producing metadata that disagrees with the authored + // `#[arg]`. + if is_known_non_numeric(inner_ty) { + return Err(Error::new( + arg.param.span(), + "numeric refinements (`min`/`max`/`bounds`/`unit`) require a numeric parameter", + )); + } + if arg.bounds.is_some() && (slot_min.is_some() || slot_max.is_some()) { + return Err(Error::new( + arg.param.span(), + "use either `bounds = (min, max)` or `min`/`max`, not both", + )); + } + let (min, max) = if let Some((lo, hi)) = &arg.bounds { + let lo_b = numeric_bound(inner_ty, lo); + let hi_b = numeric_bound(inner_ty, hi); + ( + quote! { ::std::option::Option::Some(#lo_b) }, + quote! { ::std::option::Option::Some(#hi_b) }, + ) + } else { + let min = match slot_min { + Some(e) => { + let b = numeric_bound(inner_ty, e); + quote! { ::std::option::Option::Some(#b) } + } + None => quote! { ::std::option::Option::None }, + }; + let max = match slot_max { + Some(e) => { + let b = numeric_bound(inner_ty, e); + quote! { ::std::option::Option::Some(#b) } + } + None => quote! { ::std::option::Option::None }, + }; + (min, max) + }; + let unit = opt_str(arg.unit.as_ref()); + steps.push(quote! { + __g.root = golem_rust::agentic::refine_numeric(__g.root, #min, #max, #unit)?; + }); + } + + if steps.is_empty() { + Ok(base) + } else { + Ok(quote! { + { + let mut __g = #base; + #(#steps)* + __g + } + }) + } +} + +fn numeric_bound(inner_ty: &Type, expr: &Expr) -> TokenStream { + quote! { + { + let __v: #inner_ty = #expr; + golem_rust::agentic::IntoNumericBound::into_numeric_bound(__v)? + } + } +} + +fn build_constraints(cmd: &CommandIr) -> Result, Error> { + cmd.constraints.iter().map(constraint_tokens).collect() +} + +fn constraint_tokens(c: &ConstraintIr) -> Result { + Ok(match c { + ConstraintIr::RequiresAll(refs) => { + let r = refs_tokens(refs)?; + quote! { golem_rust::agentic::ExtendedConstraint::RequiresAll(#r) } + } + ConstraintIr::AllOrNone(refs) => { + let r = refs_tokens(refs)?; + quote! { golem_rust::agentic::ExtendedConstraint::AllOrNone(#r) } + } + ConstraintIr::RequiresAny(refs) => { + let r = refs_tokens(refs)?; + quote! { golem_rust::agentic::ExtendedConstraint::RequiresAny(#r) } + } + ConstraintIr::MutexGroups(groups) => { + let gs = groups + .iter() + .map(|g| { + let r = refs_tokens(g)?; + Ok(quote! { golem_rust::agentic::ExtendedRefGroup { refs: #r } }) + }) + .collect::, Error>>()?; + quote! { golem_rust::agentic::ExtendedConstraint::MutexGroups(::std::vec![ #(#gs),* ]) } + } + ConstraintIr::Implies { + lhs_quant, + lhs, + rhs_quant, + rhs, + } => { + let lq = quantifier_tokens(*lhs_quant); + let l = refs_tokens(lhs)?; + let rq = quantifier_tokens(*rhs_quant); + let r = refs_tokens(rhs)?; + quote! { + golem_rust::agentic::ExtendedConstraint::Implies(golem_rust::agentic::ExtendedImpliesC { + lhs_quant: #lq, + lhs: #l, + rhs_quant: #rq, + rhs: #r, + }) + } + } + ConstraintIr::Forbids { + lhs_quant, + lhs, + rhs, + } => { + let lq = quantifier_tokens(*lhs_quant); + let l = refs_tokens(lhs)?; + let r = refs_tokens(rhs)?; + quote! { + golem_rust::agentic::ExtendedConstraint::Forbids(golem_rust::agentic::ExtendedForbidsC { + lhs_quant: #lq, + lhs: #l, + rhs: #r, + }) + } + } + }) +} + +fn refs_tokens(refs: &[RefIr]) -> Result { + let items = refs + .iter() + .map(ref_tokens) + .collect::, Error>>()?; + Ok(quote! { ::std::vec![ #(#items),* ] }) +} + +fn ref_tokens(r: &RefIr) -> Result { + match r { + RefIr::Present(name) => { + Ok(quote! { golem_rust::agentic::ExtendedRef::Present(#name.to_string()) }) + } + // A `value-is` literal is always carried as a raw, un-typed literal and + // resolved + type-checked at composition time against the effective + // constraint scope (`resolve_deferred_value_is`), which is the single + // source of truth shared with validation. The macro never re-derives the + // comparand graph: doing so duplicated the runtime's option/list/map/tail + // and refinement-placement rules and drifted from them. Resolution still + // runs inside the generated descriptor fn (via `normalize_inherited_globals`), + // so a literal that is incompatible with a *locally* known argument is + // still reported when the descriptor is built; a name supplied only by an + // ancestor subtree method is resolved once that global is in scope. + RefIr::ValueIs { name, value } => { + let lit = tool_literal_tokens(value)?; + Ok(quote! { + golem_rust::agentic::ExtendedRef::ValueIs(golem_rust::agentic::ExtendedValueIsRef { + name: #name.to_string(), + value: golem_rust::agentic::ExtendedValueIsLiteral::Deferred(#lit), + }) + }) + } + } +} + +fn quantifier_tokens(q: QuantifierIr) -> TokenStream { + match q { + QuantifierIr::All => { + quote! { golem_rust::golem_agentic::golem::tool::common::Quantifier::All } + } + QuantifierIr::Any => { + quote! { golem_rust::golem_agentic::golem::tool::common::Quantifier::Any } + } + } +} + +/// Builds the `(result_spec, errors)` tokens from the method return type. +fn build_result(cmd: &CommandIr) -> Result<(TokenStream, TokenStream), Error> { + let (ok_ty, err_ty) = split_result(&cmd.output); + + let errors = match err_ty { + Some(e) => quote! { <#e as golem_rust::agentic::ToolErrorSchema>::error_cases()? }, + None => quote! { ::std::vec::Vec::new() }, + }; + + let result_spec = match ok_ty { + Some(t) => { + let graph = quote! { + golem_rust::agentic::tool_value_schema::<#t>("result")? + }; + let (formatters, default_formatter) = build_formatters(cmd.result.as_ref()); + let empty_doc = doc_tokens(&DocIr::default()); + quote! { + ::std::option::Option::Some(golem_rust::agentic::ExtendedResultSpec { + type_: #graph, + doc: #empty_doc, + formatters: #formatters, + default_formatter: #default_formatter, + }) + } + } + None => { + // A unit `()` success carries no result value, so there is no result + // slot for formatters to render. An explicit `#[result(...)]` would be + // silently dropped; reject it instead. + if cmd.result.is_some() { + return Err(Error::new( + cmd.method_ident.span(), + "#[result(...)] is not valid on a method with a unit `()` success type: \ + there is no result value to format", + )); + } + quote! { ::std::option::Option::None } + } + }; + + Ok((result_spec, errors)) +} + +/// Builds `(formatters, default_formatter)`. A result with no `#[result]` +/// formatters gets a synthesized single `default` formatter so it always +/// resolves. +fn build_formatters(result: Option<&ResultIr>) -> (TokenStream, TokenStream) { + let formatters: Vec = result.map(|r| r.formatters.clone()).unwrap_or_default(); + let explicit_default = result.and_then(|r| r.default_formatter.clone()); + + if formatters.is_empty() { + let empty_doc = doc_tokens(&DocIr::default()); + let f = quote! { + ::std::vec![ golem_rust::agentic::ToolFormatter { + name: "default".to_string(), + doc: #empty_doc, + } ] + }; + let d = explicit_default.unwrap_or_else(|| "default".to_string()); + return (f, quote! { #d.to_string() }); + } + + let default = explicit_default.unwrap_or_else(|| formatters[0].clone()); + let items = formatters.iter().map(|name| { + let empty_doc = doc_tokens(&DocIr::default()); + quote! { + golem_rust::agentic::ToolFormatter { + name: #name.to_string(), + doc: #empty_doc, + } + } + }); + ( + quote! { ::std::vec![ #(#items),* ] }, + quote! { #default.to_string() }, + ) +} + +fn build_annotations(ann: Option<&CommandAnnotationsIr>) -> TokenStream { + match ann { + None => quote! { ::std::option::Option::None }, + Some(a) => { + // MCP defaults for unspecified fields. + let read_only = a.read_only.unwrap_or(false); + let destructive = a.destructive.unwrap_or(true); + let idempotent = a.idempotent.unwrap_or(false); + let open_world = a.open_world.unwrap_or(true); + quote! { + ::std::option::Option::Some(golem_rust::agentic::CommandAnnotations { + read_only: #read_only, + destructive: #destructive, + idempotent: #idempotent, + open_world: #open_world, + }) + } + } + } +} + +// --- literal lowering ------------------------------------------------------- + +/// Lowers a metadata literal expression to a `golem_rust::agentic::ToolLiteral`. +fn tool_literal_tokens(expr: &Expr) -> Result { + match expr { + Expr::Lit(syn::ExprLit { lit, .. }) => lit_tokens(lit, expr.span(), false), + Expr::Unary(u) if matches!(u.op, syn::UnOp::Neg(_)) => { + if let Expr::Lit(syn::ExprLit { lit, .. }) = &*u.expr { + lit_tokens(lit, expr.span(), true) + } else { + Err(Error::new(expr.span(), "unsupported negated literal")) + } + } + Expr::Group(g) => tool_literal_tokens(&g.expr), + Expr::Paren(p) => tool_literal_tokens(&p.expr), + Expr::Array(a) => array_tokens(&a.elems, expr.span()), + other => Err(Error::new( + other.span(), + "unsupported metadata literal for a default / value_is", + )), + } +} + +fn lit_tokens(lit: &syn::Lit, span: proc_macro2::Span, negate: bool) -> Result { + match lit { + syn::Lit::Bool(b) => { + let v = b.value; + Ok(quote! { golem_rust::agentic::ToolLiteral::Bool(#v) }) + } + syn::Lit::Str(s) => { + let v = s.value(); + Ok(quote! { golem_rust::agentic::ToolLiteral::Str(#v.to_string()) }) + } + syn::Lit::Char(c) => { + let v = c.value(); + Ok(quote! { golem_rust::agentic::ToolLiteral::Char(#v) }) + } + syn::Lit::Int(i) => { + let value: i128 = i + .base10_parse::() + .map_err(|e| Error::new(span, e.to_string()))?; + let value = if negate { -value } else { value }; + Ok(quote! { golem_rust::agentic::ToolLiteral::Int(#value) }) + } + syn::Lit::Float(f) => { + let value: f64 = f + .base10_parse::() + .map_err(|e| Error::new(span, e.to_string()))?; + let value = if negate { -value } else { value }; + Ok(quote! { golem_rust::agentic::ToolLiteral::Float(#value) }) + } + other => Err(Error::new(span, format!("unsupported literal {other:?}"))), + } +} + +fn array_tokens( + elems: &syn::punctuated::Punctuated, + span: proc_macro2::Span, +) -> Result { + // A non-empty array whose elements are all 2-tuples is a map literal; + // otherwise it is a list literal. This is a syntactic heuristic: a default + // for a `Vec<(A, B)>` (list-of-pairs) cannot be expressed via an array + // literal, but tuple/record element schemas are not interpretable as default + // values anyway (`literal_to_schema_value` rejects them), so the only + // array-of-pairs target reachable today is a `Map`, which this matches. + let all_pairs = !elems.is_empty() + && elems + .iter() + .all(|e| matches!(e, Expr::Tuple(t) if t.elems.len() == 2)); + if all_pairs { + let entries = elems + .iter() + .map(|e| { + let Expr::Tuple(t) = e else { unreachable!() }; + let mut it = t.elems.iter(); + let k = tool_literal_tokens(it.next().unwrap())?; + let v = tool_literal_tokens(it.next().unwrap())?; + Ok(quote! { (#k, #v) }) + }) + .collect::, Error>>()?; + Ok(quote! { golem_rust::agentic::ToolLiteral::Map(::std::vec![ #(#entries),* ]) }) + } else { + let items = elems + .iter() + .map(tool_literal_tokens) + .collect::, Error>>()?; + let _ = span; + Ok(quote! { golem_rust::agentic::ToolLiteral::List(::std::vec![ #(#items),* ]) }) + } +} + +// --- small token helpers ---------------------------------------------------- + +fn arg_doc_tokens(arg: Option<&ArgIr>) -> TokenStream { + let summary = arg.and_then(|a| a.doc.clone()).unwrap_or_default(); + let doc = DocIr { + summary, + description: String::new(), + examples: Vec::new(), + }; + doc_tokens(&doc) +} + +fn alias_tokens(arg: Option<&ArgIr>) -> TokenStream { + let aliases = arg + .map(|a| a.aliases.clone()) + .unwrap_or_default() + .into_iter() + .map(|a| quote! { #a.to_string() }); + quote! { ::std::vec![ #(#aliases),* ] } +} + +fn opt_char(c: Option) -> TokenStream { + match c { + Some(c) => quote! { ::std::option::Option::Some(#c) }, + None => quote! { ::std::option::Option::None }, + } +} + +fn opt_str(s: Option<&String>) -> TokenStream { + match s { + Some(s) => quote! { ::std::option::Option::Some(#s.to_string()) }, + None => quote! { ::std::option::Option::None }, + } +} + +fn opt_u32(n: Option) -> TokenStream { + match n { + Some(n) => quote! { ::std::option::Option::Some(#n) }, + None => quote! { ::std::option::Option::None }, + } +} + +fn opt_str_vec(v: Option<&Vec>) -> TokenStream { + match v { + Some(v) => { + let items = v.iter().map(|s| quote! { #s.to_string() }); + quote! { ::std::option::Option::Some(::std::vec![ #(#items),* ]) } + } + None => quote! { ::std::option::Option::None }, + } +} + +fn opt_direction(d: Option) -> TokenStream { + match d { + Some(PathDirectionIr::Input) => { + quote! { ::std::option::Option::Some(golem_rust::schema::PathDirection::Input) } + } + Some(PathDirectionIr::Output) => { + quote! { ::std::option::Option::Some(golem_rust::schema::PathDirection::Output) } + } + Some(PathDirectionIr::InOut) => { + quote! { ::std::option::Option::Some(golem_rust::schema::PathDirection::InOut) } + } + None => quote! { ::std::option::Option::None }, + } +} + +fn opt_path_kind(k: Option) -> TokenStream { + match k { + Some(PathKindIr::File) => { + quote! { ::std::option::Option::Some(golem_rust::schema::PathKind::File) } + } + Some(PathKindIr::Directory) => { + quote! { ::std::option::Option::Some(golem_rust::schema::PathKind::Directory) } + } + Some(PathKindIr::Any) => { + quote! { ::std::option::Option::Some(golem_rust::schema::PathKind::Any) } + } + None => quote! { ::std::option::Option::None }, + } +} + +// --- type inspection -------------------------------------------------------- + +/// The built-in/standard type family a parameter's value graph resolves to, +/// when it can be recognized syntactically from the type's last path segment +/// (peeling a single reference so `&str` classifies as text). Returns `None` for +/// custom or otherwise unrecognized types, whose `IntoSchema` could resolve to +/// any schema kind — those are never rejected by the refinement guards. +#[derive(Clone, Copy, PartialEq, Eq)] +enum KnownTypeFamily { + Numeric, + Bool, + Char, + Text, + Path, + Url, +} + +fn known_type_family(ty: &Type) -> Option { + let ty = match ty { + Type::Reference(r) => &*r.elem, + other => other, + }; + if is_integer_type(ty) { + return Some(KnownTypeFamily::Numeric); + } + match type_last_ident(ty).as_deref() { + Some("f32" | "f64") => Some(KnownTypeFamily::Numeric), + Some("bool") => Some(KnownTypeFamily::Bool), + Some("char") => Some(KnownTypeFamily::Char), + Some("String" | "str") => Some(KnownTypeFamily::Text), + Some("PathBuf" | "Path") => Some(KnownTypeFamily::Path), + Some("Url") => Some(KnownTypeFamily::Url), + _ => None, + } +} + +/// Whether the type is a recognized family other than the one a refinement +/// requires. Unrecognized (custom) types are never rejected: a proc macro cannot +/// know what schema kind their `IntoSchema` produces. Refinement coercion in +/// `refine_text`/`refine_path`/`refine_url`/`refine_numeric` would otherwise +/// silently rewrite (or drop, for numeric) a recognized incompatible type, +/// producing descriptor metadata that disagrees with the implementation +/// signature. +fn is_known_non_text(ty: &Type) -> bool { + matches!(known_type_family(ty), Some(f) if f != KnownTypeFamily::Text) +} + +fn is_known_non_path(ty: &Type) -> bool { + matches!(known_type_family(ty), Some(f) if f != KnownTypeFamily::Path) +} + +fn is_known_non_url(ty: &Type) -> bool { + matches!(known_type_family(ty), Some(f) if f != KnownTypeFamily::Url) +} + +fn is_known_non_numeric(ty: &Type) -> bool { + matches!(known_type_family(ty), Some(f) if f != KnownTypeFamily::Numeric) +} + +/// Whether the type's last path segment names a built-in Rust integer type. +fn is_integer_type(ty: &Type) -> bool { + matches!( + type_last_ident(ty).as_deref(), + Some( + "u8" | "u16" + | "u32" + | "u64" + | "u128" + | "usize" + | "i8" + | "i16" + | "i32" + | "i64" + | "i128" + | "isize" + ) + ) +} + +fn type_last_ident(ty: &Type) -> Option { + if let Type::Path(tp) = ty { + tp.path.segments.last().map(|s| s.ident.to_string()) + } else { + None + } +} + +fn is_stream_type(ty: &Type) -> bool { + matches!( + type_last_ident(ty).as_deref(), + Some("InputStream" | "OutputStream") + ) +} + +/// If `ty` is `Wrapper` (matching the last path segment by name), +/// returns `Inner`. +fn unwrap_generic1<'a>(ty: &'a Type, wrapper: &str) -> Option<&'a Type> { + if let Type::Path(tp) = ty + && let Some(seg) = tp.path.segments.last() + && seg.ident == wrapper + && let PathArguments::AngleBracketed(args) = &seg.arguments + { + for ga in &args.args { + if let GenericArgument::Type(t) = ga { + return Some(t); + } + } + } + None +} + +fn is_map_type(ty: &Type) -> bool { + matches!(type_last_ident(ty).as_deref(), Some("BTreeMap" | "HashMap")) +} + +/// Splits a method return type into `(ok_type, err_type)`. A `Result` +/// yields both (with `T == ()` collapsed to `None`); a plain `-> T` yields +/// `(Some(T), None)`; `-> ()` / no return yields `(None, None)`. +fn split_result(output: &ReturnType) -> (Option<&Type>, Option<&Type>) { + let ty = match output { + ReturnType::Default => return (None, None), + ReturnType::Type(_, t) => t.as_ref(), + }; + if let Type::Path(tp) = ty + && let Some(seg) = tp.path.segments.last() + && seg.ident == "Result" + && let PathArguments::AngleBracketed(args) = &seg.arguments + { + let mut types = args.args.iter().filter_map(|ga| { + if let GenericArgument::Type(t) = ga { + Some(t) + } else { + None + } + }); + let ok = types.next(); + let err = types.next(); + let ok = ok.filter(|t| !is_unit(t)); + return (ok, err); + } + if is_unit(ty) { + (None, None) + } else { + (Some(ty), None) + } +} + +fn is_unit(ty: &Type) -> bool { + matches!(ty, Type::Tuple(t) if t.elems.is_empty()) +} diff --git a/sdks/rust/golem-rust-macro/src/tool/implementation.rs b/sdks/rust/golem-rust-macro/src/tool/implementation.rs index 178badf510..07c6d6a066 100644 --- a/sdks/rust/golem-rust-macro/src/tool/implementation.rs +++ b/sdks/rust/golem-rust-macro/src/tool/implementation.rs @@ -12,28 +12,68 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Minimal `#[tool_implementation]` entry point. +//! `#[tool_implementation]` entry point. //! -//! This only injects the hidden `tool_implementation_annotation` item that -//! satisfies the required trait item emitted by `#[tool_definition]`, making the -//! attribute a registration trigger. The `#[ctor]` that registers the tool's -//! metadata is added later. +//! This injects the hidden `tool_implementation_annotation` item that satisfies +//! the required trait item emitted by `#[tool_definition]` (so an implementation +//! that forgets the attribute is a compile error), and emits the `#[ctor]` that +//! registers the tool's metadata at startup. Because the ctor exists only on +//! implemented types, a tool with no implementation is never registered — a +//! registered tool is necessarily implemented in that wasm. use proc_macro::TokenStream; -use quote::quote; +use quote::{ToTokens, format_ident, quote}; +use std::hash::{Hash, Hasher}; use syn::{ImplItem, ItemImpl}; pub fn tool_implementation_impl(_attrs: TokenStream, item: TokenStream) -> TokenStream { let mut item_impl = syn::parse_macro_input!(item as ItemImpl); + let trait_path = match &item_impl.trait_ { + Some((_, path, _)) => path.clone(), + None => { + return syn::Error::new_spanned( + &item_impl.self_ty, + "#[tool_implementation] must be applied to a trait implementation \ + (`impl Trait for Type`)", + ) + .to_compile_error() + .into(); + } + }; + let self_ty = item_impl.self_ty.clone(); + let trait_ident = &trait_path.segments.last().unwrap().ident; + // Two impls of the same trait (for different types, or different paths with + // the same last segment) must not collide on the ctor item name, so a stable + // hash of the full `Type` + trait path is mixed in. Semantic duplicate-tool + // detection still happens at registration (`register_tool` panics). + let mut hasher = std::collections::hash_map::DefaultHasher::new(); + self_ty.to_token_stream().to_string().hash(&mut hasher); + trait_path.to_token_stream().to_string().hash(&mut hasher); + let register_fn_name = format_ident!( + "__register_tool_{}_{:016x}", + trait_ident.to_string().to_lowercase(), + hasher.finish() + ); + let annotation: ImplItem = syn::parse_quote! { #[doc(hidden)] fn tool_implementation_annotation() where Self: Sized {} }; item_impl.items.push(annotation); + // `ctor_parse!` instead of `#[ctor]` to avoid a direct dependency on the + // `ctor` crate at the user side; the re-exported helper is used like agents. quote! { #item_impl + + ::golem_rust::ctor::__support::ctor_parse!( + #[ctor] fn #register_fn_name() { + golem_rust::agentic::register_tool( + <#self_ty as #trait_path>::__tool_descriptor() + ); + } + ); } .into() } diff --git a/sdks/rust/golem-rust-macro/src/tool/mod.rs b/sdks/rust/golem-rust-macro/src/tool/mod.rs index 393de132e4..ce45fd0947 100644 --- a/sdks/rust/golem-rust-macro/src/tool/mod.rs +++ b/sdks/rust/golem-rust-macro/src/tool/mod.rs @@ -23,6 +23,7 @@ mod arg; mod command; mod constraint; mod definition; +mod descriptor; mod doc; mod helpers; mod implementation; diff --git a/sdks/rust/golem-rust-macro/src/tool/synthesis.rs b/sdks/rust/golem-rust-macro/src/tool/synthesis.rs index 0c0c486265..9eae0e1154 100644 --- a/sdks/rust/golem-rust-macro/src/tool/synthesis.rs +++ b/sdks/rust/golem-rust-macro/src/tool/synthesis.rs @@ -18,7 +18,6 @@ use crate::tool::ir::{DocIr, ErrorKindIr}; use proc_macro2::TokenStream; use quote::quote; -use syn::Type; /// Emits a `golem_rust::agentic::Doc` value from a [`DocIr`]. pub fn doc_tokens(doc: &DocIr) -> TokenStream { @@ -54,14 +53,3 @@ pub fn error_kind_tokens(kind: ErrorKindIr) -> TokenStream { }, } } - -/// Emits a `golem_rust::agentic::SchemaGraph` for a Rust type by asking its -/// `Schema` implementation at runtime. Used for positionals, options, results, -/// and error payloads (anything that contributes a value type to the tool). -pub fn schema_graph_tokens(ty: &Type) -> TokenStream { - quote! { - <#ty as golem_rust::agentic::Schema>::get_type() - .get_schema_graph() - .expect("tool value type must be a value schema, not an auto-injected type") - } -} diff --git a/sdks/rust/golem-rust-macro/src/tool/tool_error.rs b/sdks/rust/golem-rust-macro/src/tool/tool_error.rs index 4cd3b9c429..7724523de9 100644 --- a/sdks/rust/golem-rust-macro/src/tool/tool_error.rs +++ b/sdks/rust/golem-rust-macro/src/tool/tool_error.rs @@ -19,7 +19,7 @@ use crate::tool::doc::parse_doc_full; use crate::tool::helpers::{SeenKeys, expr_str, expr_u8, to_kebab_case}; use crate::tool::ir::{ErrorKindIr, ToolErrorIr, ToolErrorPayloadIr, ToolErrorVariantIr}; -use crate::tool::synthesis::{doc_tokens, error_kind_tokens, schema_graph_tokens}; +use crate::tool::synthesis::{doc_tokens, error_kind_tokens}; use proc_macro::TokenStream; use quote::quote; use syn::spanned::Spanned; @@ -42,10 +42,14 @@ fn synthesize_tool_error(ir: &ToolErrorIr) -> TokenStream { let kind = error_kind_tokens(variant.kind); let exit_code = variant.exit_code; let payload = match &variant.payload { - ToolErrorPayloadIr::None => quote! { None }, + ToolErrorPayloadIr::None => quote! { ::std::option::Option::None }, ToolErrorPayloadIr::Single { ty } => { - let graph = schema_graph_tokens(ty); - quote! { Some(#graph) } + let position = format!("error {name} payload"); + quote! { + ::std::option::Option::Some( + golem_rust::agentic::tool_value_schema::<#ty>(#position)? + ) + } } }; quote! { @@ -60,8 +64,11 @@ fn synthesize_tool_error(ir: &ToolErrorIr) -> TokenStream { }); quote! { impl golem_rust::agentic::ToolErrorSchema for #enum_ident { - fn error_cases() -> ::std::vec::Vec { - vec![ #(#cases),* ] + fn error_cases() -> ::std::result::Result< + ::std::vec::Vec, + golem_rust::agentic::ToolBuildError, + > { + ::std::result::Result::Ok(::std::vec![ #(#cases),* ]) } } } diff --git a/sdks/rust/golem-rust/Cargo.toml b/sdks/rust/golem-rust/Cargo.toml index 88508d841e..afc383347c 100644 --- a/sdks/rust/golem-rust/Cargo.toml +++ b/sdks/rust/golem-rust/Cargo.toml @@ -16,6 +16,10 @@ harness = false name = "agent" harness = false +[[test]] +name = "tool" +harness = false + [[test]] name = "ui" harness = false diff --git a/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs index cabf1bf216..3bb958bc8a 100644 --- a/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs +++ b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs @@ -13,6 +13,7 @@ // limitations under the License. use crate::agentic::schema_graph_root; +use crate::agentic::tool_literal::{ToolLiteral, value_is_literal_to_schema_value}; use crate::golem_agentic::golem::tool::common as wire; use crate::schema::validation::validate_value; use crate::schema::wit::GraphEncoder; @@ -147,8 +148,13 @@ pub struct ExtendedErrorCase { /// Implemented by `#[derive(ToolError)]` enums. A tool method returning /// `Result` reads its declared error cases from `E::error_cases()`. +/// +/// Resolving an error case can fail the same way any other tool value type can: +/// a variant payload whose type resolves to an auto-injected schema has no value +/// graph, so this returns a [`ToolBuildError`] rather than panicking during +/// descriptor synthesis. pub trait ToolErrorSchema { - fn error_cases() -> Vec; + fn error_cases() -> Result, ToolBuildError>; } #[derive(Clone, Debug)] @@ -160,7 +166,28 @@ pub enum ExtendedRef { #[derive(Clone, Debug)] pub struct ExtendedValueIsRef { pub name: String, - pub value: SchemaValue, + pub value: ExtendedValueIsLiteral, +} + +/// The literal a `value-is` constraint compares against. +/// +/// The descriptor macro always emits the raw, un-typed +/// [`ExtendedValueIsLiteral::Deferred`] literal; it never re-derives a comparand +/// graph (doing so duplicated the runtime's option/list/map/tail and +/// refinement-placement rules and drifted from them). Every deferred literal is +/// resolved against the effective constraint scope by +/// [`normalize_inherited_globals`] — which runs inside the generated descriptor +/// fn — and is type-checked there, becoming [`ExtendedValueIsLiteral::Resolved`]. +/// A literal naming a locally known argument is therefore still resolved (and any +/// type/refinement mismatch reported) when the descriptor is built; one naming a +/// global supplied only by an ancestor subtree method is resolved once that +/// global is in scope during composition. A deferred literal that survives +/// composition (the standalone subtree-child case) is reported as an unresolved +/// constraint reference by validation rather than silently accepted. +#[derive(Clone, Debug)] +pub enum ExtendedValueIsLiteral { + Resolved(SchemaValue), + Deferred(ToolLiteral), } #[derive(Clone, Debug)] @@ -194,19 +221,39 @@ pub struct ExtendedForbidsC { #[derive(Clone, Debug, PartialEq, Eq)] pub enum ToolBuildError { EmptyCommandTree, - CommandIndexOutOfBounds { index: i32, len: usize }, + CommandIndexOutOfBounds { + index: i32, + len: usize, + }, UnreachableCommandNode(i32), CommandTreeCycle(i32), DuplicateCommandParent(i32), - InvalidIdentifier { kind: &'static str, value: String }, + InvalidIdentifier { + kind: &'static str, + value: String, + }, SubtreeCycle(String), SubtreeRootHasBody(String), - SubtreeRootNameMismatch { expected: String, actual: String }, + SubtreeRootNameMismatch { + expected: String, + actual: String, + }, SubtreeAnnotationsUnsupported(String), DuplicateName(String), DuplicateShort(char), - UnresolvedTypeRef { position: String, id: String }, - IllFormedSchema { position: String, detail: String }, + InheritedGlobalConflict { + name: String, + inherited: String, + command: String, + }, + UnresolvedTypeRef { + position: String, + id: String, + }, + IllFormedSchema { + position: String, + detail: String, + }, EncodeError(String), DefaultTypeMismatch(String), ValueIsTypeMismatch(String), @@ -216,6 +263,18 @@ pub enum ToolBuildError { VariantInInputPosition(String), CommandNotFound(String), UnresolvedConstraintRef(String), + AutoInjectedToolParameter(String), + InvalidNumericBound(String), + RefinementTypeMismatch { + refinement: &'static str, + actual: &'static str, + }, + UnresolvedValueIsLiteral(String), + InvalidTailOccurrenceBounds { + name: String, + min: u32, + max: u32, + }, } impl Display for ToolBuildError { @@ -250,6 +309,17 @@ impl Display for ToolBuildError { ), ToolBuildError::DuplicateName(s) => write!(f, "duplicate tool metadata name: {s}"), ToolBuildError::DuplicateShort(c) => write!(f, "duplicate short form: {c:?}"), + ToolBuildError::InheritedGlobalConflict { + name, + inherited, + command, + } => write!( + f, + "parameter surface name {name:?} on command {command:?} conflicts with inherited \ + global {inherited:?}: it either has an incompatible shape or collides with more \ + than one distinct inherited global; rename the parameter or align it with a \ + single compatible inherited global" + ), ToolBuildError::UnresolvedTypeRef { position, id } => write!( f, "type reference {id:?} at {position} does not resolve within its schema graph" @@ -280,11 +350,46 @@ impl Display for ToolBuildError { ToolBuildError::UnresolvedConstraintRef(s) => { write!(f, "constraint references an unknown argument: {s}") } + ToolBuildError::AutoInjectedToolParameter(s) => write!( + f, + "auto-injected types are not valid tool value parameters or results: {s}" + ), + ToolBuildError::InvalidNumericBound(s) => { + write!(f, "invalid numeric bound: {s}") + } + ToolBuildError::RefinementTypeMismatch { refinement, actual } => write!( + f, + "{refinement} refinement cannot apply to a {actual} schema; the parameter's type \ + resolves to a schema kind that has no {refinement} restrictions to set" + ), + ToolBuildError::UnresolvedValueIsLiteral(s) => write!( + f, + "value-is literal for argument {s:?} was not resolved against its comparand type \ + during composition" + ), + ToolBuildError::InvalidTailOccurrenceBounds { name, min, max } => write!( + f, + "tail positional {name:?} has an impossible occurrence range: min {min} is greater \ + than max {max}" + ), } } } impl std::error::Error for ToolBuildError {} +/// Build the value schema graph for a tool parameter/result Rust type, +/// returning a [`ToolBuildError`] (instead of panicking) when the type resolves +/// to an auto-injected schema, which has no value graph. Used by macro-generated +/// descriptors so an auto-injected param/result is a clean descriptor-build +/// error rather than a panic at registration time. +pub fn tool_value_schema( + position: &str, +) -> Result { + T::get_type() + .get_schema_graph() + .ok_or_else(|| ToolBuildError::AutoInjectedToolParameter(position.to_string())) +} + #[derive(Clone, Debug)] #[allow(clippy::large_enum_variant)] pub enum EffectiveCommandField { @@ -358,24 +463,65 @@ impl ExtendedToolType { } pub fn canonical_input_fields(&self, command_index: usize) -> Vec { + // Collect the body field names first so an inherited global can be + // shadowed by a body-local declaration of the same surface name. A + // well-formed (normalized) descriptor never has such a collision, but + // this method may be called on a not-yet-validated or hand-built + // descriptor, and surfacing the body-local field is the least misleading + // fallback (it reflects the parameter the author actually wrote). + let body = self + .commands + .get(command_index) + .and_then(|c| c.body.as_ref()); + // Body surface names include option/flag aliases, so an inherited global + // is shadowed when *any* of its surface names (long or alias) collides + // with any body-local surface name. + let mut body_names: BTreeSet<&str> = BTreeSet::new(); + if let Some(body) = body { + for p in &body.positionals.fixed { + body_names.insert(p.name.as_str()); + } + if let Some(t) = &body.positionals.tail { + body_names.insert(t.name.as_str()); + } + for o in &body.options { + body_names.insert(o.long.as_str()); + body_names.extend(o.aliases.iter().map(String::as_str)); + } + for f in &body.flags { + body_names.insert(f.long.as_str()); + body_names.extend(f.aliases.iter().map(String::as_str)); + } + } + let mut fields = Vec::new(); for global in self.effective_globals(command_index) { match global { - EffectiveCommandField::Option(o) => fields.push(CanonicalInputField { - name: o.long.clone(), - schema: option_collected_graph(&o.shape), - }), - EffectiveCommandField::Flag(f) => fields.push(CanonicalInputField { - name: f.long.clone(), - schema: flag_graph(&f), - }), + EffectiveCommandField::Option(o) => { + if body_names.contains(o.long.as_str()) + || o.aliases.iter().any(|a| body_names.contains(a.as_str())) + { + continue; + } + fields.push(CanonicalInputField { + name: o.long.clone(), + schema: option_collected_graph(&o.shape), + }) + } + EffectiveCommandField::Flag(f) => { + if body_names.contains(f.long.as_str()) + || f.aliases.iter().any(|a| body_names.contains(a.as_str())) + { + continue; + } + fields.push(CanonicalInputField { + name: f.long.clone(), + schema: flag_graph(&f), + }) + } } } - if let Some(body) = self - .commands - .get(command_index) - .and_then(|c| c.body.as_ref()) - { + if let Some(body) = body { fields.extend(body.positionals.fixed.iter().map(|p| CanonicalInputField { name: p.name.clone(), schema: p.type_.clone(), @@ -675,10 +821,21 @@ fn encode_refs(r: &[ExtendedRef]) -> Result, ToolBuildError> { .map(|r| { Ok(match r { ExtendedRef::Present(n) => wire::Ref::Present(n.clone()), - ExtendedRef::ValueIs(v) => wire::Ref::ValueIs(wire::ValueIsRef { - name: v.name.clone(), - value: encode_schema_value_default(&v.value)?, - }), + ExtendedRef::ValueIs(v) => { + let value = match &v.value { + ExtendedValueIsLiteral::Resolved(sv) => encode_schema_value_default(sv)?, + // A deferred literal reaching encoding means composition + // never resolved it against a comparand type; the wire + // model only carries resolved values. + ExtendedValueIsLiteral::Deferred(_) => { + return Err(ToolBuildError::UnresolvedValueIsLiteral(v.name.clone())); + } + }; + wire::Ref::ValueIs(wire::ValueIsRef { + name: v.name.clone(), + value, + }) + } }) }) .collect() @@ -728,7 +885,7 @@ fn collect_option(s: &ExtendedOptionShape, v: &mut Vec) { /// `default`): a `repeatable-list` collects into `list`, a /// `repeatable-map` into its map node; scalar/optional-scalar use the value /// type directly. Definition graphs are preserved so refs still resolve. -fn option_collected_graph(s: &ExtendedOptionShape) -> SchemaGraph { +pub fn option_collected_graph(s: &ExtendedOptionShape) -> SchemaGraph { match s { ExtendedOptionShape::Scalar(g) | ExtendedOptionShape::OptionalScalar(g) => g.clone(), ExtendedOptionShape::RepeatableList(r) => list_wrapper_graph(&r.item_type), @@ -768,29 +925,111 @@ fn flag_graph(f: &FlagSpec) -> SchemaGraph { SchemaGraph::anonymous(ty) } -/// The comparand graph a `value-is` literal for an option is checked against, -/// per the WIT "any occurrence / entry equals this literal" rule: a scalar -/// option uses its value type, a `repeatable-list` its element type, and a -/// `repeatable-map` its map value type. Definition graphs are preserved. -fn value_is_comparand_graph(shape: &ExtendedOptionShape) -> SchemaGraph { +/// How a `value-is` literal is matched against its comparand graph. +/// +/// The distinction is whether the referenced surface *collects* multiple CLI +/// occurrences into a container. The spec says a `value-is` against a "repeated +/// or list-typed name means any occurrence / element equals this literal", so a +/// collecting surface compares exactly one collected occurrence, never the whole +/// container. +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +enum ValueIsMode { + /// The literal must be a valid value for the comparand graph exactly, with + /// no element/value relaxation. Used for *collecting* surfaces — a + /// repeatable-list option, a repeatable-map option, or a tail positional — + /// whose comparand is already the per-occurrence type (list item, map value, + /// tail item). A `Vec` repeatable option compares against `String` + /// (accepting `"x"`, rejecting `["x"]`); a `Vec>` repeatable option + /// compares against `list` (accepting `[1]`, rejecting `1` and `[[1]]`). + Exact, + /// The literal may be a valid value for the comparand graph as a whole, or — + /// after peeling leading `option` wrappers — for exactly one element of a + /// list/fixed-list comparand or one value of a map comparand. Used for + /// *non-collecting* value surfaces: scalar / optional-scalar options and + /// fixed positionals, whose declared value is the comparand itself. A + /// `BTreeMap` positional accepts the whole map or a single `u32` + /// value; a `FixedList` positional accepts the whole `[1,2]` or a + /// single element. + WholeOrOnePeel, +} + +/// A `value-is` comparand: the graph a literal is matched against, plus the +/// [`ValueIsMode`] controlling whether the one-level element/value relaxation +/// applies. +#[derive(Clone, Debug)] +struct ValueIsComparand { + graph: SchemaGraph, + mode: ValueIsMode, +} + +/// The `value-is` comparand recorded for a referenceable name. Mirrors the host +/// validator's `ValueComparand`: a value-carrying name maps to a typed +/// comparand; a name whose declared type cannot yield a comparable value (a +/// repeatable-map whose map type does not resolve to a map) is +/// [`ValueComparand::BlockedByTypeError`] so `value-is` checking is suppressed +/// and the underlying type error is reported by [`validate_tool`] instead of a +/// misleading cascading mismatch. A name absent from the scope's comparand map +/// is a flag (no value type), against which a `value-is` is a genuine mismatch. +#[derive(Clone, Debug)] +#[allow(clippy::large_enum_variant)] +enum ValueComparand { + Type(ValueIsComparand), + BlockedByTypeError, +} + +/// The `value-is` comparand for an option, keyed by whether the option collects +/// occurrences. A scalar / optional-scalar option is non-collecting: its +/// declared value graph is matched with the whole-or-one-peel relaxation. A +/// repeatable-list option collects into a list, so its comparand is the +/// per-occurrence item type matched exactly; a repeatable-map option collects +/// into a map, so its comparand is the per-entry map *value* type matched +/// exactly. A repeatable-map whose map type does not resolve to a map yields +/// [`ValueComparand::BlockedByTypeError`] (the malformed type is reported by +/// [`validate_tool`]). Definition graphs are preserved so any `Ref` still +/// resolves. +fn option_value_is_comparand(shape: &ExtendedOptionShape) -> ValueComparand { match shape { - ExtendedOptionShape::Scalar(g) | ExtendedOptionShape::OptionalScalar(g) => g.clone(), - ExtendedOptionShape::RepeatableList(r) => r.item_type.clone(), - ExtendedOptionShape::RepeatableMap(r) => map_value_graph(&r.map_type), + ExtendedOptionShape::Scalar(g) | ExtendedOptionShape::OptionalScalar(g) => { + ValueComparand::Type(ValueIsComparand { + graph: g.clone(), + mode: ValueIsMode::WholeOrOnePeel, + }) + } + ExtendedOptionShape::RepeatableList(r) => ValueComparand::Type(ValueIsComparand { + graph: r.item_type.clone(), + mode: ValueIsMode::Exact, + }), + ExtendedOptionShape::RepeatableMap(r) if resolves_to_map(&r.map_type) => { + ValueComparand::Type(ValueIsComparand { + graph: map_value_graph(&r.map_type), + mode: ValueIsMode::Exact, + }) + } + ExtendedOptionShape::RepeatableMap(_) => ValueComparand::BlockedByTypeError, } } -/// The value type of a `Map` graph (resolving the root through any `Ref`s), -/// preserving definitions. Falls back to the map's own root when it is not a -/// map (the repeatable-map shape check reports that case separately). +/// Whether a comparand graph is structurally sound (no dangling references or +/// pure-alias cycles). When it is not, [`validate_tool`] reports the schema +/// error (an [`ToolBuildError::UnresolvedTypeRef`] / [`ToolBuildError::IllFormedSchema`]), +/// so `value-is` resolution must not also report a cascading mismatch against a +/// graph that cannot be resolved. +fn comparand_graph_is_sound(graph: &SchemaGraph) -> bool { + crate::schema::validation::validate_graph(graph).is_ok() +} + +/// The per-entry value comparand for a map: a graph whose root is the map's +/// value type, with the map graph's definitions preserved so any `Ref` in the +/// value type still resolves. Falls back to the original graph when the root +/// does not resolve to a `Map` (a not-a-map repeatable-map type is reported +/// separately, so this avoids fabricating the value comparand). fn map_value_graph(map: &SchemaGraph) -> SchemaGraph { - let root = match map.resolve_ref(&map.root) { - Ok(SchemaType::Map { value, .. }) => (**value).clone(), - _ => map.root.clone(), - }; - SchemaGraph { - defs: map.defs.clone(), - root, + match map.resolve_ref(&map.root) { + Ok(SchemaType::Map { value, .. }) => SchemaGraph { + defs: map.defs.clone(), + root: (**value).clone(), + }, + _ => map.clone(), } } @@ -854,13 +1093,26 @@ fn validate_default(value: &SchemaValue, graph: &SchemaGraph) -> Result<(), Tool .map_err(|e| ToolBuildError::DefaultTypeMismatch(format!("{e:?}"))) } -/// A `value-is` literal is compatible if it is a valid value for the comparand -/// type, or — for the "any element/occurrence" relaxation — for the element -/// type of a list-shaped (optionally `option`-wrapped) comparand. -fn value_is_compatible(graph: &SchemaGraph, value: &SchemaValue) -> bool { +/// Whether a `value-is` literal is compatible with its [`ValueIsComparand`]. +/// +/// The literal is always compatible if it is a valid value for the comparand +/// graph as a whole. For a [`ValueIsMode::WholeOrOnePeel`] comparand (a +/// non-collecting value surface) it is *also* compatible — under the WIT "any +/// element / entry equals this literal" relaxation — if it is a valid value for +/// the element type of a list-shaped, or the value type of a map-shaped, +/// (optionally `option`-wrapped) comparand. A [`ValueIsMode::Exact`] comparand +/// (a collecting surface, whose graph is already the per-occurrence type) gets +/// no relaxation: matching one more level would descend past a single +/// occurrence (e.g. accept `1` against a `Vec>` option whose occurrence +/// is `list`). +fn value_is_compatible(comparand: &ValueIsComparand, value: &SchemaValue) -> bool { + let graph = &comparand.graph; if validate_value(graph, &graph.root, value).is_ok() { return true; } + if comparand.mode == ValueIsMode::Exact { + return false; + } let Ok(mut peeled) = graph.resolve_ref(&graph.root) else { return false; }; @@ -870,10 +1122,15 @@ fn value_is_compatible(graph: &SchemaGraph, value: &SchemaValue) -> bool { Err(_) => return false, } } - if let SchemaType::List { element, .. } | SchemaType::FixedList { element, .. } = peeled { - return validate_value(graph, element, value).is_ok(); + match peeled { + SchemaType::List { element, .. } | SchemaType::FixedList { element, .. } => { + validate_value(graph, element, value).is_ok() + } + SchemaType::Map { + value: map_value, .. + } => validate_value(graph, map_value, value).is_ok(), + _ => false, } - false } /// `^[a-z][a-z0-9]*(-[a-z0-9]+)*$`: lowercase kebab-case starting with a letter, @@ -1118,11 +1375,47 @@ fn seed_global_tokens( } } -/// Per-name comparand graph for `value-is` resolution (only value-typed names). +/// Per-name `value-is` comparand for constraint resolution (only value-typed +/// names; a name in `names` but absent from `typed` is a flag). #[derive(Default)] struct NameScope { names: BTreeSet, - typed: BTreeMap, + typed: BTreeMap, +} + +/// Registers a flag's referenceable names. A flag carries no value type, so it +/// is never added to [`NameScope::typed`]; a `value-is` against it is rejected. +fn register_flag_scope(scope: &mut NameScope, flag: &FlagSpec) { + scope.names.insert(flag.long.clone()); + scope.names.extend(flag.aliases.iter().cloned()); +} + +/// Registers a fixed positional's name and its whole-or-one-peel comparand (a +/// fixed positional is a non-collecting value surface: its declared type is the +/// comparand). +fn register_fixed_positional_scope(scope: &mut NameScope, positional: &ExtendedPositional) { + scope.names.insert(positional.name.clone()); + scope.typed.insert( + positional.name.clone(), + ValueComparand::Type(ValueIsComparand { + graph: positional.type_.clone(), + mode: ValueIsMode::WholeOrOnePeel, + }), + ); +} + +/// Registers a tail positional's name and its per-occurrence comparand. A tail +/// collects occurrences into a `list`, so a `value-is` literal matches one +/// item exactly (the tail's `item_type`), never the whole collected list. +fn register_tail_scope(scope: &mut NameScope, tail: &ExtendedTailPositional) { + scope.names.insert(tail.name.clone()); + scope.typed.insert( + tail.name.clone(), + ValueComparand::Type(ValueIsComparand { + graph: tail.item_type.clone(), + mode: ValueIsMode::Exact, + }), + ); } fn check_body( @@ -1139,8 +1432,7 @@ fn check_body( register_option_scope(&mut scope, opt); } for flag in &globals.flags { - scope.names.insert(flag.long.clone()); - scope.names.extend(flag.aliases.iter().cloned()); + register_flag_scope(&mut scope, flag); } } @@ -1165,8 +1457,7 @@ fn check_body( if let Some(short) = flag.short { insert_unique_short(&mut shorts, short)?; } - scope.names.insert(flag.long.clone()); - scope.names.extend(flag.aliases.iter().cloned()); + register_flag_scope(&mut scope, flag); } for positional in &body.positionals.fixed { @@ -1176,10 +1467,7 @@ fn check_body( &format!("positional {}", positional.name), )?; insert_unique(&mut names, &positional.name)?; - scope.names.insert(positional.name.clone()); - scope - .typed - .insert(positional.name.clone(), positional.type_.clone()); + register_fixed_positional_scope(&mut scope, positional); if let Some(default) = &positional.default { validate_default(default, &positional.type_)?; } @@ -1194,17 +1482,22 @@ fn check_body( check_identifier("positional name", &tail.name)?; check_graph_closed(&tail.item_type, &format!("tail {}", tail.name))?; insert_unique(&mut names, &tail.name)?; - scope.names.insert(tail.name.clone()); - // A tail positional is list-like; a value-is literal matches an item. - scope - .typed - .insert(tail.name.clone(), tail.item_type.clone()); + register_tail_scope(&mut scope, tail); if graph_reaches_variant(&tail.item_type) { return Err(ToolBuildError::VariantInInputPosition(tail.name.clone())); } if tail.verbatim && tail.separator.is_none() { return Err(ToolBuildError::VerbatimWithoutSeparator(tail.name.clone())); } + if let Some(max) = tail.max + && tail.min > max + { + return Err(ToolBuildError::InvalidTailOccurrenceBounds { + name: tail.name.clone(), + min: tail.min, + max, + }); + } } for constraint in &body.constraints { @@ -1240,7 +1533,7 @@ fn check_body( fn register_option_scope(scope: &mut NameScope, opt: &ExtendedOptionSpec) { scope.names.insert(opt.long.clone()); scope.names.extend(opt.aliases.iter().cloned()); - let comparand = value_is_comparand_graph(&opt.shape); + let comparand = option_value_is_comparand(&opt.shape); scope.typed.insert(opt.long.clone(), comparand.clone()); for alias in &opt.aliases { scope.typed.insert(alias.clone(), comparand.clone()); @@ -1296,13 +1589,27 @@ fn check_refs(refs: &[ExtendedRef], scope: &NameScope) -> Result<(), ToolBuildEr if !scope.names.contains(&v.name) { return Err(ToolBuildError::UnresolvedConstraintRef(v.name.clone())); } - // A name with no value type (a flag) cannot carry a value-is. - let graph = scope - .typed - .get(&v.name) - .ok_or_else(|| ToolBuildError::ValueIsTypeMismatch(v.name.clone()))?; - if !value_is_compatible(graph, &v.value) { - return Err(ToolBuildError::ValueIsTypeMismatch(v.name.clone())); + match scope.typed.get(&v.name) { + // A name with no value type (a flag) cannot carry a value-is. + None => return Err(ToolBuildError::ValueIsTypeMismatch(v.name.clone())), + // A repeatable-map whose type is not a map: the malformed + // type is reported by the structural checks; suppress the + // cascading value-is mismatch. + Some(ValueComparand::BlockedByTypeError) => {} + Some(ValueComparand::Type(comparand)) => match &v.value { + ExtendedValueIsLiteral::Resolved(value) => { + if !value_is_compatible(comparand, value) { + return Err(ToolBuildError::ValueIsTypeMismatch(v.name.clone())); + } + } + // The name is in scope, so composition (which carries the + // comparand type) should have resolved this literal. A + // surviving deferred literal is a resolution gap, not a + // silently acceptable ref. + ExtendedValueIsLiteral::Deferred(_) => { + return Err(ToolBuildError::UnresolvedValueIsLiteral(v.name.clone())); + } + }, } } } @@ -1562,6 +1869,24 @@ impl ToolBuildCtx { pub fn pop_descriptor(&mut self) { self.stack.pop(); } + /// True when no ancestor descriptor is currently on the recursion stack — + /// i.e. this is the outermost `__golem_tool_descriptor_for_*` invocation. + /// Must be called from inside [`Self::with_descriptor`] (the current + /// descriptor's identity is then on top of the stack), so a value of `1` + /// means there is exactly one descriptor in flight: this one. + /// + /// A nested subtree child descriptor (called from a parent's subtree link) + /// returns `false`. The child therefore skips composition/normalization and + /// returns its raw command tree, with `value-is` literals still deferred; + /// the outermost descriptor normalizes the fully grafted tree once, when all + /// ancestor subtree globals and inherited-global de-projections are in scope. + /// Normalizing a nested child against its standalone scope would resolve (and + /// type-check) its constraints against child-local declarations that parent + /// composition may widen or replace, rejecting a constraint that is valid in + /// the composed tool. + pub fn is_outermost_descriptor(&self) -> bool { + self.stack.len() == 1 + } /// Build a child descriptor while the given identity is pushed on the /// recursion stack, always popping afterwards. Preferred over manual /// [`Self::push_descriptor`] / [`Self::pop_descriptor`] so an early return @@ -1647,6 +1972,694 @@ pub fn graft_subtree( Ok(nodes) } +/// Normalize a whole tool's command tree against inherited globals. +/// +/// A subtree child trait is synthesized independently, so a child command whose +/// Rust signature repeats a parameter an ancestor declares as a global projects +/// it as a body option/flag/positional (or as its own global) in the standalone +/// descriptor. Likewise a leaf command in the same trait as the root may repeat +/// a root global. Once composed under the ancestor that supplies that name as a +/// global, the local re-declaration must be reconciled, otherwise the canonical +/// shape carries a body-local (or nested-global) name colliding with an +/// effective inherited global. +/// +/// This is the single source of truth for that reconciliation. It traverses the +/// tree root→leaf, carrying the *strict ancestor* globals in scope. For every +/// node it reconciles the node's own globals and its body arguments against the +/// strict-ancestor globals: +/// +/// * a same-name re-declaration whose canonical input shape is *compatible* with +/// the inherited global is removed — the ancestor global is the single source +/// of truth for docs, defaults, requiredness, aliases, and parse behavior; +/// * a same-name re-declaration whose shape is *incompatible* is an +/// [`ToolBuildError::InheritedGlobalConflict`]: the composition is invalid and +/// is rejected rather than silently dropping or replacing the local parameter. +/// +/// Body arguments are reconciled only against *strict ancestors*, never the +/// node's own globals; a body argument colliding with a global declared on the +/// same command is an ordinary authoring error left for [`validate_tool`]. +/// +/// The traversal guards against malformed (cyclic / out-of-bounds) trees so it +/// is safe to run before [`validate_tool`] proves the tree well-formed. +pub fn normalize_inherited_globals(tool: &mut ExtendedToolType) -> Result<(), ToolBuildError> { + if tool.commands.is_empty() { + return Ok(()); + } + let mut visited = vec![false; tool.commands.len()]; + normalize_command(tool, 0, &[], &mut visited) +} + +fn normalize_command( + tool: &mut ExtendedToolType, + index: usize, + ancestor_globals: &[EffectiveCommandField], + visited: &mut [bool], +) -> Result<(), ToolBuildError> { + if index >= tool.commands.len() || visited[index] { + return Ok(()); + } + visited[index] = true; + + let command_name = tool.commands[index].name.clone(); + + // Reconcile this node's own globals and body args against strict ancestors. + { + let node = &mut tool.commands[index]; + reconcile_globals(&mut node.globals, ancestor_globals, &command_name)?; + if let Some(body) = node.body.as_mut() { + reconcile_body(body, ancestor_globals, &command_name)?; + } + } + + // Resolve any deferred `value-is` literals now that the constraint scope — + // strict-ancestor globals plus this node's own (surviving) globals and body + // arguments — is known. A subtree child trait names a constraint against a + // global supplied by an ancestor subtree method; the standalone child could + // not type the literal, so it was deferred until this composition step. + if tool.commands[index].body.is_some() { + let node = &mut tool.commands[index]; + let scope = value_is_scope(ancestor_globals, &node.globals, node.body.as_ref().unwrap()); + resolve_deferred_value_is(node.body.as_mut().unwrap(), &scope)?; + } + + // Children inherit the strict-ancestor globals plus this node's surviving + // globals (the ones not removed as compatible re-declarations). + let mut child_globals = ancestor_globals.to_vec(); + { + let node = &tool.commands[index]; + child_globals.extend( + node.globals + .options + .iter() + .cloned() + .map(EffectiveCommandField::Option), + ); + child_globals.extend( + node.globals + .flags + .iter() + .cloned() + .map(EffectiveCommandField::Flag), + ); + } + + let subcommands = tool.commands[index].subcommands.clone(); + for sub in subcommands { + if sub >= 0 { + normalize_command(tool, sub as usize, &child_globals, visited)?; + } + } + Ok(()) +} + +/// Builds the `value-is` resolution scope for a command body: strict-ancestor +/// globals, the node's own globals, and the body's own arguments. This mirrors +/// the constraint scope assembled by [`check_body`] (via [`register_option_scope`] +/// and the positional/tail/flag handling) so deferred-literal resolution and +/// validation agree on which names are value-carrying and on each name's +/// comparand graph. +fn value_is_scope( + ancestors: &[EffectiveCommandField], + node_globals: &ExtendedGlobals, + body: &ExtendedCommandBody, +) -> NameScope { + let mut scope = NameScope::default(); + for field in ancestors { + match field { + EffectiveCommandField::Option(opt) => register_option_scope(&mut scope, opt), + EffectiveCommandField::Flag(flag) => register_flag_scope(&mut scope, flag), + } + } + for opt in &node_globals.options { + register_option_scope(&mut scope, opt); + } + for flag in &node_globals.flags { + register_flag_scope(&mut scope, flag); + } + for opt in &body.options { + register_option_scope(&mut scope, opt); + } + for flag in &body.flags { + register_flag_scope(&mut scope, flag); + } + for positional in &body.positionals.fixed { + register_fixed_positional_scope(&mut scope, positional); + } + if let Some(tail) = &body.positionals.tail { + register_tail_scope(&mut scope, tail); + } + scope +} + +/// Resolves every [`ExtendedValueIsLiteral::Deferred`] literal in `body`'s +/// constraints against `scope`, the effective constraint scope assembled by +/// [`value_is_scope`] (and mirrored by [`check_body`]). This is the single +/// source of truth for typing a `value-is` literal: the descriptor macro carries +/// the raw literal and never re-derives a comparand graph, so resolution always +/// agrees with the validation performed by [`check_refs`]. +/// +/// For a name with a value-carrying comparand graph the literal is interpreted +/// into a [`SchemaValue`] and then checked against the graph with +/// [`value_is_compatible`], so a literal whose *value* is incompatible (a wrong +/// type or one that violates the option's refinements — e.g. a regex/numeric +/// bound) is rejected here rather than slipping through to a later stage. A name +/// in scope but without a comparand (a flag) is a +/// [`ToolBuildError::ValueIsTypeMismatch`]. A name not in scope is left deferred +/// — it is reported as an unresolved constraint reference by [`check_refs`] (the +/// standalone subtree-child case where the ancestor global is not present). +fn resolve_deferred_value_is( + body: &mut ExtendedCommandBody, + scope: &NameScope, +) -> Result<(), ToolBuildError> { + for constraint in &mut body.constraints { + for_each_ref_mut(constraint, &mut |r| { + let ExtendedRef::ValueIs(v) = r else { + return Ok(()); + }; + let ExtendedValueIsLiteral::Deferred(lit) = &v.value else { + return Ok(()); + }; + match scope.typed.get(&v.name) { + Some(ValueComparand::Type(comparand)) => { + // The structural validator owns schema soundness. If the + // comparand graph is unsound (a dangling or pure-alias-cycle + // ref) leave the literal deferred so `validate_tool` reports + // the real schema error instead of a cascading value-is + // mismatch against a graph that cannot be resolved. + if comparand_graph_is_sound(&comparand.graph) { + let value = value_is_literal_to_schema_value(&comparand.graph, lit) + .map_err(|_| ToolBuildError::ValueIsTypeMismatch(v.name.clone()))?; + if !value_is_compatible(comparand, &value) { + return Err(ToolBuildError::ValueIsTypeMismatch(v.name.clone())); + } + v.value = ExtendedValueIsLiteral::Resolved(value); + } + } + // A repeatable-map whose type is not a map: `validate_tool` + // reports the malformed type. Leave the literal deferred and + // suppress the cascading value-is mismatch. + Some(ValueComparand::BlockedByTypeError) => {} + // A flag (in scope, no value type) cannot carry a value-is. A + // name not in scope is left deferred — `check_refs` reports it as + // an unresolved constraint reference. + None => { + if scope.names.contains(&v.name) { + return Err(ToolBuildError::ValueIsTypeMismatch(v.name.clone())); + } + } + } + Ok(()) + })?; + } + Ok(()) +} + +/// Applies `f` to every [`ExtendedRef`] referenced by a constraint, regardless of +/// its variant, short-circuiting on the first error. +fn for_each_ref_mut( + constraint: &mut ExtendedConstraint, + f: &mut impl FnMut(&mut ExtendedRef) -> Result<(), ToolBuildError>, +) -> Result<(), ToolBuildError> { + match constraint { + ExtendedConstraint::RequiresAll(v) + | ExtendedConstraint::AllOrNone(v) + | ExtendedConstraint::RequiresAny(v) => { + for r in v.iter_mut() { + f(r)?; + } + } + ExtendedConstraint::MutexGroups(groups) => { + for group in groups.iter_mut() { + for r in group.refs.iter_mut() { + f(r)?; + } + } + } + ExtendedConstraint::Implies(i) => { + for r in i.lhs.iter_mut() { + f(r)?; + } + for r in i.rhs.iter_mut() { + f(r)?; + } + } + ExtendedConstraint::Forbids(fb) => { + for r in fb.lhs.iter_mut() { + f(r)?; + } + for r in fb.rhs.iter_mut() { + f(r)?; + } + } + } + Ok(()) +} + +fn reconcile_globals( + globals: &mut ExtendedGlobals, + ancestors: &[EffectiveCommandField], + command: &str, +) -> Result<(), ToolBuildError> { + if ancestors.is_empty() { + return Ok(()); + } + let mut kept_options = Vec::with_capacity(globals.options.len()); + for opt in std::mem::take(&mut globals.options) { + let shape = FieldShape::Value(option_collected_graph(&opt.shape)); + if !reconcile_local(&option_surface_names(&opt), &shape, ancestors, command)? { + kept_options.push(opt); + } + } + globals.options = kept_options; + + let mut kept_flags = Vec::with_capacity(globals.flags.len()); + for flag in std::mem::take(&mut globals.flags) { + let shape = flag_field_shape(&flag); + if !reconcile_local(&flag_surface_names(&flag), &shape, ancestors, command)? { + kept_flags.push(flag); + } + } + globals.flags = kept_flags; + Ok(()) +} + +fn reconcile_body( + body: &mut ExtendedCommandBody, + ancestors: &[EffectiveCommandField], + command: &str, +) -> Result<(), ToolBuildError> { + if ancestors.is_empty() { + return Ok(()); + } + let mut kept_options = Vec::with_capacity(body.options.len()); + for opt in std::mem::take(&mut body.options) { + let shape = FieldShape::Value(option_collected_graph(&opt.shape)); + if !reconcile_local(&option_surface_names(&opt), &shape, ancestors, command)? { + kept_options.push(opt); + } + } + body.options = kept_options; + + let mut kept_flags = Vec::with_capacity(body.flags.len()); + for flag in std::mem::take(&mut body.flags) { + let shape = flag_field_shape(&flag); + if !reconcile_local(&flag_surface_names(&flag), &shape, ancestors, command)? { + kept_flags.push(flag); + } + } + body.flags = kept_flags; + + let mut kept_fixed = Vec::with_capacity(body.positionals.fixed.len()); + for positional in std::mem::take(&mut body.positionals.fixed) { + let shape = FieldShape::Value(positional.type_.clone()); + if !reconcile_local( + std::slice::from_ref(&positional.name), + &shape, + ancestors, + command, + )? { + kept_fixed.push(positional); + } + } + body.positionals.fixed = kept_fixed; + + if let Some(tail) = body.positionals.tail.take() { + let shape = FieldShape::Value(list_wrapper_graph(&tail.item_type)); + if !reconcile_local(std::slice::from_ref(&tail.name), &shape, ancestors, command)? { + body.positionals.tail = Some(tail); + } + } + Ok(()) +} + +/// Decide the fate of one local declaration against the inherited globals in +/// scope. Returns `Ok(true)` when the local is a compatible re-declaration that +/// should be removed (the inherited global covers it), `Ok(false)` when no +/// inherited global shares a surface name (keep the local), and +/// [`ToolBuildError::InheritedGlobalConflict`] when a surface name matches but +/// the input shapes are incompatible. +fn reconcile_local( + local_names: &[String], + local_shape: &FieldShape, + ancestors: &[EffectiveCommandField], + command: &str, +) -> Result { + // A local may share a surface name with more than one inherited global (its + // long name with one, an alias with another). All ancestors are scanned so + // that an incompatible collision — even one found after a compatible one — is + // reported immediately as a conflict. The local can be de-projected onto an + // inherited global only when it collides with exactly one *distinct* inherited + // global (matching the same global through both its long name and an alias is + // a single ancestor entry, hence still one global). Colliding compatibly with + // two or more distinct inherited globals is ambiguous — there is no single + // global to inherit from, and silently dropping the local would leave the Rust + // parameter with no canonical body field — so that is also a conflict. + let mut compatible: Vec = Vec::new(); + for inherited in ancestors { + let inherited_names = effective_field_surface_names(inherited); + let Some(colliding) = local_names + .iter() + .find(|l| inherited_names.iter().any(|n| n == *l)) + else { + continue; + }; + if !field_shapes_compatible(&effective_field_shape(inherited), local_shape) { + return Err(ToolBuildError::InheritedGlobalConflict { + name: colliding.clone(), + inherited: effective_field_primary_name(inherited), + command: command.to_string(), + }); + } + compatible.push(effective_field_primary_name(inherited)); + } + if compatible.len() > 1 { + return Err(ToolBuildError::InheritedGlobalConflict { + name: local_names.first().cloned().unwrap_or_default(), + inherited: compatible.join(", "), + command: command.to_string(), + }); + } + Ok(!compatible.is_empty()) +} + +/// The primary (long) surface name of an inherited effective global, used to +/// name the colliding global in [`ToolBuildError::InheritedGlobalConflict`]. +fn effective_field_primary_name(g: &EffectiveCommandField) -> String { + match g { + EffectiveCommandField::Option(o) => o.long.clone(), + EffectiveCommandField::Flag(f) => f.long.clone(), + } +} + +/// The canonical input "surface family" of a command field, used to decide +/// whether a local re-declaration is compatible with an inherited global. Flags +/// are distinguished by their flag family (a bool flag and a count flag carry +/// different values, and neither is interchangeable with a value-bearing option +/// or positional of the same name); every value-bearing form (scalar/optional +/// option, repeatable list/map option, fixed positional, tail positional) is +/// compared by its canonical input value graph. +#[allow(clippy::large_enum_variant)] +enum FieldShape { + BoolFlag, + CountFlag, + Value(SchemaGraph), +} + +fn flag_field_shape(f: &FlagSpec) -> FieldShape { + match f.shape { + wire::FlagShape::BoolFlag(_) => FieldShape::BoolFlag, + wire::FlagShape::CountFlag(_) => FieldShape::CountFlag, + } +} + +fn effective_field_shape(g: &EffectiveCommandField) -> FieldShape { + match g { + EffectiveCommandField::Option(o) => FieldShape::Value(option_collected_graph(&o.shape)), + EffectiveCommandField::Flag(f) => flag_field_shape(f), + } +} + +fn field_shapes_compatible(a: &FieldShape, b: &FieldShape) -> bool { + match (a, b) { + (FieldShape::BoolFlag, FieldShape::BoolFlag) => true, + (FieldShape::CountFlag, FieldShape::CountFlag) => true, + (FieldShape::Value(ga), FieldShape::Value(gb)) => schema_shapes_match(ga, gb), + _ => false, + } +} + +fn option_surface_names(o: &ExtendedOptionSpec) -> Vec { + let mut names = Vec::with_capacity(1 + o.aliases.len()); + names.push(o.long.clone()); + names.extend(o.aliases.iter().cloned()); + names +} + +fn flag_surface_names(f: &FlagSpec) -> Vec { + let mut names = Vec::with_capacity(1 + f.aliases.len()); + names.push(f.long.clone()); + names.extend(f.aliases.iter().cloned()); + names +} + +fn effective_field_surface_names(g: &EffectiveCommandField) -> Vec { + match g { + EffectiveCommandField::Option(o) => option_surface_names(o), + EffectiveCommandField::Flag(f) => flag_surface_names(f), + } +} + +/// Maximum recursion depth for structural shape comparison; deeper than this the +/// comparison gives up and reports "not a match". This keeps the comparison +/// terminating on pathological (deeply nested or recursive) types. Reporting +/// "not a match" on exhaustion is the safe direction: a non-match between two +/// same-named declarations surfaces as an explicit +/// [`ToolBuildError::InheritedGlobalConflict`] rather than silently dropping a +/// local parameter that might actually differ. Real CLI input schemas (strings, +/// numbers, bools, lists, maps, small records) are far shallower than this. +const SHAPE_MATCH_MAX_DEPTH: u32 = 32; + +/// Whether two canonical input value graphs describe the same value *shape*, +/// ignoring metadata and validation restrictions (docs, numeric/text bounds, +/// etc.) but honoring structure and exact primitive representation. References +/// are resolved against their respective graphs. +/// +/// Recursive (cyclic) graphs are compared coinductively: when the same pair of +/// referenced definitions is reached again along a path, the two shapes are +/// assumed to match (the cycle has already been established structurally). This +/// makes an identical recursive type re-declaration compare equal instead of +/// being falsely rejected once the structural recursion bottoms out. The +/// per-pair memo is what guarantees termination; the depth counter is a defensive +/// secondary guard for pathologically deep finite types. +fn schema_shapes_match(a: &SchemaGraph, b: &SchemaGraph) -> bool { + let mut visiting = std::collections::HashSet::new(); + schema_types_match(a, &a.root, b, &b.root, SHAPE_MATCH_MAX_DEPTH, &mut visiting) +} + +fn schema_types_match( + a_graph: &SchemaGraph, + a_ty: &SchemaType, + b_graph: &SchemaGraph, + b_ty: &SchemaType, + depth: u32, + visiting: &mut std::collections::HashSet<(crate::schema::TypeId, crate::schema::TypeId)>, +) -> bool { + // Break recursion at reference boundaries before resolving: revisiting the + // same pair of named definitions means we have already entered comparing + // them, so the recursive shapes coincide along this path. + if let (SchemaType::Ref { id: a_id, .. }, SchemaType::Ref { id: b_id, .. }) = (a_ty, b_ty) + && !visiting.insert((a_id.clone(), b_id.clone())) + { + return true; + } + let (Ok(a_ty), Ok(b_ty)) = (a_graph.resolve_ref(a_ty), b_graph.resolve_ref(b_ty)) else { + return false; + }; + if depth == 0 { + return false; + } + let next = depth - 1; + match (a_ty, b_ty) { + (SchemaType::List { element: ea, .. }, SchemaType::List { element: eb, .. }) => { + schema_types_match(a_graph, ea, b_graph, eb, next, visiting) + } + ( + SchemaType::FixedList { + element: ea, + length: la, + .. + }, + SchemaType::FixedList { + element: eb, + length: lb, + .. + }, + ) => la == lb && schema_types_match(a_graph, ea, b_graph, eb, next, visiting), + (SchemaType::Option { inner: ia, .. }, SchemaType::Option { inner: ib, .. }) => { + schema_types_match(a_graph, ia, b_graph, ib, next, visiting) + } + ( + SchemaType::Map { + key: ka, value: va, .. + }, + SchemaType::Map { + key: kb, value: vb, .. + }, + ) => { + schema_types_match(a_graph, ka, b_graph, kb, next, visiting) + && schema_types_match(a_graph, va, b_graph, vb, next, visiting) + } + (SchemaType::Tuple { elements: ea, .. }, SchemaType::Tuple { elements: eb, .. }) => { + ea.len() == eb.len() + && ea + .iter() + .zip(eb) + .all(|(x, y)| schema_types_match(a_graph, x, b_graph, y, next, visiting)) + } + (SchemaType::Record { fields: fa, .. }, SchemaType::Record { fields: fb, .. }) => { + fa.len() == fb.len() + && fa.iter().zip(fb).all(|(x, y)| { + x.name == y.name + && schema_types_match(a_graph, &x.body, b_graph, &y.body, next, visiting) + }) + } + (SchemaType::Variant { cases: ca, .. }, SchemaType::Variant { cases: cb, .. }) => { + ca.len() == cb.len() + && ca.iter().zip(cb).all(|(x, y)| { + x.name == y.name + && match (&x.payload, &y.payload) { + (None, None) => true, + (Some(px), Some(py)) => { + schema_types_match(a_graph, px, b_graph, py, next, visiting) + } + _ => false, + } + }) + } + (SchemaType::Union { spec: sa, .. }, SchemaType::Union { spec: sb, .. }) => { + sa.branches.len() == sb.branches.len() + && sa.branches.iter().zip(&sb.branches).all(|(x, y)| { + x.tag == y.tag + && x.discriminator == y.discriminator + && schema_types_match(a_graph, &x.body, b_graph, &y.body, next, visiting) + }) + } + (SchemaType::Enum { cases: ca, .. }, SchemaType::Enum { cases: cb, .. }) => ca == cb, + (SchemaType::Flags { flags: fa, .. }, SchemaType::Flags { flags: fb, .. }) => fa == fb, + // Rich leaf types whose spec carries *type identity* (not just refinable + // validation restrictions) must compare those identity fields. Otherwise + // a leaf could de-project an inherited global onto a genuinely different + // Rust type — e.g. `Quantity` vs `Quantity`, which + // share the `Quantity` discriminant but are not interchangeable values. + // Identity here means the parts of the spec derived from the Rust type + // (not overlaid by `#[arg]`): the quantity unit set, the secret category, + // the quota-token resource, and the unstructured text languages / binary + // MIME sets. Pure validation restrictions (numeric/text/url bounds, path + // direction/kind — all `#[arg]`-refinable) stay ignored per this + // function's contract. + (SchemaType::Quantity { spec: sa, .. }, SchemaType::Quantity { spec: sb, .. }) => { + sa.base_unit == sb.base_unit + && str_sets_match( + &effective_quantity_units(&sa.base_unit, &sa.allowed_suffixes), + &effective_quantity_units(&sb.base_unit, &sb.allowed_suffixes), + ) + } + (SchemaType::Secret { spec: sa, .. }, SchemaType::Secret { spec: sb, .. }) => { + sa.category == sb.category + } + (SchemaType::QuotaToken { spec: sa, .. }, SchemaType::QuotaToken { spec: sb, .. }) => { + sa.resource_name == sb.resource_name + } + ( + SchemaType::Text { + restrictions: ra, .. + }, + SchemaType::Text { + restrictions: rb, .. + }, + ) => opt_str_sets_match(&ra.languages, &rb.languages), + ( + SchemaType::Binary { + restrictions: ra, .. + }, + SchemaType::Binary { + restrictions: rb, .. + }, + ) => opt_str_sets_match(&ra.mime_types, &rb.mime_types), + // A plain `String` and a `Text` differ only by the latter carrying + // refinable restrictions (regex/min/max), which `#[arg]` overlays via + // `refine_text` (the only `String`→`Text` promotion). So an inherited + // refined-`String` global (`Text`) and a leaf redeclaring the same plain + // `String` describe the same shape and must de-project. The exception is + // a `languages`-restricted `Text`, which reflects a different Rust type + // (`UnstructuredText<…>`) and stays incompatible with a plain `String`. + (SchemaType::String { .. }, SchemaType::Text { restrictions, .. }) + | (SchemaType::Text { restrictions, .. }, SchemaType::String { .. }) => { + restrictions.languages.is_none() + } + (SchemaType::Result { spec: sa, .. }, SchemaType::Result { spec: sb, .. }) => { + schema_opt_box_match( + a_graph, + sa.ok.as_deref(), + b_graph, + sb.ok.as_deref(), + next, + visiting, + ) && schema_opt_box_match( + a_graph, + sa.err.as_deref(), + b_graph, + sb.err.as_deref(), + next, + visiting, + ) + } + (SchemaType::Future { inner: ia, .. }, SchemaType::Future { inner: ib, .. }) + | (SchemaType::Stream { inner: ia, .. }, SchemaType::Stream { inner: ib, .. }) => { + schema_opt_box_match( + a_graph, + ia.as_deref(), + b_graph, + ib.as_deref(), + next, + visiting, + ) + } + // Primitives and the remaining rich leaf types (incl. distinct numeric + // widths/signs, `Url`, `Path`, `Datetime`, `Duration`) are compared by + // kind, which already ignores their refinable restrictions. + _ => std::mem::discriminant(a_ty) == std::mem::discriminant(b_ty), + } +} + +/// Whether two string collections describe the same *set* of values (order- and +/// duplicate-insensitive). Used to compare rich-type identity fields that are +/// authored as ordered lists but semantically unordered (quantity units, allowed +/// languages, allowed MIME types). +fn str_sets_match(a: &[String], b: &[String]) -> bool { + let sa: std::collections::HashSet<&str> = a.iter().map(String::as_str).collect(); + let sb: std::collections::HashSet<&str> = b.iter().map(String::as_str).collect(); + sa == sb +} + +/// Set comparison for an optional restriction (`None` = unrestricted). An +/// unrestricted side never matches a restricted side: they describe different +/// accepted value sets. +fn opt_str_sets_match(a: &Option>, b: &Option>) -> bool { + match (a, b) { + (None, None) => true, + (Some(a), Some(b)) => str_sets_match(a, b), + _ => false, + } +} + +/// The set of units a [`SchemaType::Quantity`] accepts: its explicit +/// `allowed_suffixes`, or just the canonical `base_unit` when no suffixes are +/// declared. Two quantities with the same base unit but different accepted unit +/// sets are not interchangeable, so de-projection must treat them as distinct. +fn effective_quantity_units(base_unit: &str, allowed_suffixes: &[String]) -> Vec { + if allowed_suffixes.is_empty() { + vec![base_unit.to_string()] + } else { + allowed_suffixes.to_vec() + } +} + +fn schema_opt_box_match( + a_graph: &SchemaGraph, + a_ty: Option<&SchemaType>, + b_graph: &SchemaGraph, + b_ty: Option<&SchemaType>, + depth: u32, + visiting: &mut std::collections::HashSet<(crate::schema::TypeId, crate::schema::TypeId)>, +) -> bool { + match (a_ty, b_ty) { + (None, None) => true, + (Some(x), Some(y)) => schema_types_match(a_graph, x, b_graph, y, depth, visiting), + _ => false, + } +} + /// Append a graft (graft-local command nodes whose index 0 is the dispatcher /// placeholder) to `parent`, offsetting every internal subcommand index, and /// return the parent index of the placeholder. The caller links this index as a @@ -1666,8 +2679,12 @@ pub fn append_grafted_subtree( #[cfg(test)] mod tests { use super::*; - use crate::agentic::tool_refinement::{refine_numeric, refine_text, refine_url}; + use crate::agentic::tool_refinement::{refine_numeric, refine_path, refine_text, refine_url}; use crate::schema::schema_type::{NumericBound, NumericRestrictions}; + use crate::schema::{ + BinaryRestrictions, PathDirection, PathKind, PathSpec, QuantitySpec, QuotaTokenSpec, + SecretSpec, TextRestrictions, + }; use test_r::test; fn doc(summary: &str) -> Doc { @@ -1795,6 +2812,116 @@ mod tests { assert_eq!(names, vec!["verbose", "input", "config", "force"]); } + /// Builds a two-node tool: a root carrying one inherited global option, and a + /// single `leaf` body whose only option is described by `(long, aliases)`. + /// Used to exercise alias-aware body-vs-inherited-global shadowing on an + /// unnormalized descriptor. + fn tool_with_inherited_global_and_body_option( + global_long: &str, + global_aliases: Vec, + body_long: &str, + body_aliases: Vec, + ) -> ExtendedToolType { + ExtendedToolType { + version: "0.1.0".to_string(), + commands: vec![ + ExtendedCommandNode { + name: "root".to_string(), + aliases: vec![], + doc: doc("root"), + globals: ExtendedGlobals { + options: vec![ExtendedOptionSpec { + long: global_long.to_string(), + short: None, + aliases: global_aliases, + doc: doc("global"), + value_name: None, + shape: ExtendedOptionShape::Scalar(u32_graph()), + default: None, + required: false, + env_var: None, + }], + flags: vec![], + }, + subcommands: vec![1], + body: None, + }, + ExtendedCommandNode { + name: "leaf".to_string(), + aliases: vec![], + doc: doc("leaf"), + globals: ExtendedGlobals::default(), + subcommands: vec![], + body: Some(ExtendedCommandBody { + positionals: ExtendedPositionals::default(), + options: vec![ExtendedOptionSpec { + long: body_long.to_string(), + short: None, + aliases: body_aliases, + doc: doc("body"), + value_name: None, + shape: ExtendedOptionShape::Scalar(str_graph()), + default: None, + required: false, + env_var: None, + }], + flags: vec![], + constraints: vec![], + stdin: None, + stdout: None, + result: None, + errors: vec![], + annotations: None, + }), + }, + ], + } + } + + #[test] + fn canonical_input_fields_body_alias_shadows_inherited_global() { + // A body option whose ALIAS equals an inherited global's long name + // shadows that global on an unnormalized descriptor. + let tool = tool_with_inherited_global_and_body_option( + "verbose", + vec![], + "local", + vec!["verbose".to_string()], + ); + let names: Vec<_> = tool + .canonical_input_fields(1) + .into_iter() + .map(|f| f.name) + .collect(); + assert_eq!( + names, + vec!["local"], + "an inherited global must be shadowed by a body option aliased to its name" + ); + } + + #[test] + fn canonical_input_fields_inherited_global_alias_is_shadowed() { + // The reverse: an inherited global whose ALIAS equals a body option's + // long name is shadowed too. + let tool = tool_with_inherited_global_and_body_option( + "global", + vec!["v".to_string()], + "v", + vec![], + ); + let names: Vec<_> = tool + .canonical_input_fields(1) + .into_iter() + .map(|f| f.name) + .collect(); + assert_eq!( + names, + vec!["v"], + "an inherited global aliased to a body option's name must be shadowed" + ); + } + #[test] fn help_contains_names() { let help = render_help(&sample_tool(), &["run".to_string()]).unwrap(); @@ -1913,23 +3040,56 @@ mod tests { ctx.push_descriptor("a"), Err(ToolBuildError::SubtreeCycle(_)) )); - let text = refine_text(SchemaType::string(), Some("x+".into()), Some(1), Some(3)); + let text = refine_text(SchemaType::string(), Some("x+".into()), Some(1), Some(3)).unwrap(); assert!(matches!(text, SchemaType::Text { .. })); let url = refine_url( SchemaType::url(Default::default()), Some(vec!["https".into()]), - ); + ) + .unwrap(); assert!(matches!(url, SchemaType::Url { .. })); let num = refine_numeric( SchemaType::u32(), Some(NumericBound::Unsigned(1)), None, Some("ms".into()), - ); + ) + .unwrap(); assert_eq!( num.numeric_restrictions().unwrap().unit.as_deref(), Some("ms") ); + + // Refinements reject schema kinds that cannot carry their restrictions + // (the runtime backstop for macro-opaque types). + assert!(matches!( + refine_numeric(SchemaType::string(), None, None, Some("ms".into())), + Err(ToolBuildError::RefinementTypeMismatch { + refinement: "numeric", + .. + }) + )); + assert!(matches!( + refine_path(SchemaType::string(), None, None, None), + Err(ToolBuildError::RefinementTypeMismatch { + refinement: "path", + .. + }) + )); + assert!(matches!( + refine_url(SchemaType::string(), Some(vec!["https".into()])), + Err(ToolBuildError::RefinementTypeMismatch { + refinement: "url", + .. + }) + )); + assert!(matches!( + refine_text(SchemaType::u32(), Some("x+".into()), None, None), + Err(ToolBuildError::RefinementTypeMismatch { + refinement: "text", + .. + }) + )); } #[test] @@ -1941,8 +3101,9 @@ mod tests { Some(NumericBound::Unsigned(10)), None, Some("items".into()), - ); - let refined = refine_numeric(base, None, Some(NumericBound::Unsigned(20)), None); + ) + .unwrap(); + let refined = refine_numeric(base, None, Some(NumericBound::Unsigned(20)), None).unwrap(); let r = refined.numeric_restrictions().unwrap(); assert_eq!(r.min, Some(NumericBound::Unsigned(10))); assert_eq!(r.max, Some(NumericBound::Unsigned(20))); @@ -1961,7 +3122,7 @@ mod tests { metadata: Default::default(), }; - let refined = refine_numeric(base, None, Some(NumericBound::Unsigned(200)), None); + let refined = refine_numeric(base, None, Some(NumericBound::Unsigned(200)), None).unwrap(); let restrictions = refined.numeric_restrictions().unwrap(); assert_eq!(restrictions.min, Some(NumericBound::Unsigned(10))); @@ -2059,7 +3220,7 @@ mod tests { let ok = leaf_tool_with_body(map_config_option(vec![ExtendedConstraint::RequiresAll( vec![ExtendedRef::ValueIs(ExtendedValueIsRef { name: "config".to_string(), - value: SchemaValue::U32(1), + value: ExtendedValueIsLiteral::Resolved(SchemaValue::U32(1)), })], )])); assert!(ok.try_to_tool().is_ok()); @@ -2067,7 +3228,7 @@ mod tests { let bad = leaf_tool_with_body(map_config_option(vec![ExtendedConstraint::RequiresAll( vec![ExtendedRef::ValueIs(ExtendedValueIsRef { name: "config".to_string(), - value: SchemaValue::String("x".to_string()), + value: ExtendedValueIsLiteral::Resolved(SchemaValue::String("x".to_string())), })], )])); assert!(matches!( @@ -2087,6 +3248,148 @@ mod tests { )); } + /// Builds a parent-dispatcher + child-leaf tool where the child's body carries + /// `constraints` referencing names that only exist on the parent's globals (a + /// subtree-style composition). The parent declares the given `parent_globals`. + fn deferred_value_is_tree( + parent_globals: ExtendedGlobals, + constraints: Vec, + ) -> ExtendedToolType { + let mut child_body = empty_body(); + child_body.constraints = constraints; + tool_with_nodes(vec![ + ExtendedCommandNode { + name: "root".into(), + aliases: vec![], + doc: doc(""), + globals: parent_globals, + subcommands: vec![1], + body: None, + }, + ExtendedCommandNode { + name: "leaf".into(), + aliases: vec![], + doc: doc(""), + globals: ExtendedGlobals::default(), + subcommands: vec![], + body: Some(child_body), + }, + ]) + } + + fn first_value_is(body: &ExtendedCommandBody) -> &ExtendedValueIsRef { + match &body.constraints[0] { + ExtendedConstraint::RequiresAll(refs) => match &refs[0] { + ExtendedRef::ValueIs(v) => v, + other => panic!("expected a value-is ref, got {other:?}"), + }, + other => panic!("expected a requires-all constraint, got {other:?}"), + } + } + + #[test] + fn deferred_value_is_resolves_against_ancestor_global() { + let mut tool = deferred_value_is_tree( + ExtendedGlobals { + options: vec![scalar_opt("format", None)], + flags: vec![], + }, + vec![ExtendedConstraint::RequiresAll(vec![ExtendedRef::ValueIs( + ExtendedValueIsRef { + name: "format".into(), + value: ExtendedValueIsLiteral::Deferred(ToolLiteral::Str("json".into())), + }, + )])], + ); + normalize_inherited_globals(&mut tool) + .expect("composition should resolve the deferred literal against the parent global"); + let resolved = first_value_is(tool.commands[1].body.as_ref().unwrap()); + assert!( + matches!(&resolved.value, ExtendedValueIsLiteral::Resolved(SchemaValue::String(s)) if s == "json"), + "deferred literal should be resolved to a string, got {:?}", + resolved.value + ); + assert!(tool.try_to_tool().is_ok()); + } + + #[test] + fn deferred_value_is_unknown_name_is_rejected() { + let mut tool = deferred_value_is_tree( + ExtendedGlobals::default(), + vec![ExtendedConstraint::RequiresAll(vec![ExtendedRef::ValueIs( + ExtendedValueIsRef { + name: "missing".into(), + value: ExtendedValueIsLiteral::Deferred(ToolLiteral::Str("json".into())), + }, + )])], + ); + // Normalization leaves a name absent from every scope deferred; the + // dangling reference is reported by validation. + normalize_inherited_globals(&mut tool).expect("normalization tolerates unknown names"); + assert!(matches!( + tool.try_to_tool().unwrap_err(), + ToolBuildError::UnresolvedConstraintRef(name) if name == "missing" + )); + } + + #[test] + fn deferred_value_is_incompatible_literal_is_rejected() { + let mut tool = deferred_value_is_tree( + ExtendedGlobals { + options: vec![scalar_opt("format", None)], + flags: vec![], + }, + vec![ExtendedConstraint::RequiresAll(vec![ExtendedRef::ValueIs( + ExtendedValueIsRef { + name: "format".into(), + value: ExtendedValueIsLiteral::Deferred(ToolLiteral::Bool(true)), + }, + )])], + ); + assert!(matches!( + normalize_inherited_globals(&mut tool).unwrap_err(), + ToolBuildError::ValueIsTypeMismatch(name) if name == "format" + )); + } + + #[test] + fn deferred_value_is_against_ancestor_flag_is_rejected() { + let mut tool = deferred_value_is_tree( + ExtendedGlobals { + options: vec![], + flags: vec![bool_flag("force", None)], + }, + vec![ExtendedConstraint::RequiresAll(vec![ExtendedRef::ValueIs( + ExtendedValueIsRef { + name: "force".into(), + value: ExtendedValueIsLiteral::Deferred(ToolLiteral::Bool(true)), + }, + )])], + ); + assert!(matches!( + normalize_inherited_globals(&mut tool).unwrap_err(), + ToolBuildError::ValueIsTypeMismatch(name) if name == "force" + )); + } + + #[test] + fn deferred_value_is_unresolved_at_validation_is_rejected() { + // A deferred literal whose name *is* in scope but was never resolved + // (composition skipped) is a resolution gap, not a silently accepted ref. + let mut body = empty_body(); + body.options = vec![scalar_opt("format", None)]; + body.constraints = vec![ExtendedConstraint::RequiresAll(vec![ExtendedRef::ValueIs( + ExtendedValueIsRef { + name: "format".into(), + value: ExtendedValueIsLiteral::Deferred(ToolLiteral::Str("json".into())), + }, + )])]; + assert!(matches!( + validate_tool(&leaf_tool_with_body(body)), + Err(ToolBuildError::UnresolvedValueIsLiteral(name)) if name == "format" + )); + } + fn bare_node(name: &str, subcommands: Vec) -> ExtendedCommandNode { ExtendedCommandNode { name: name.into(), @@ -2284,7 +3587,7 @@ mod tests { body.constraints = vec![ExtendedConstraint::RequiresAll(vec![ExtendedRef::ValueIs( ExtendedValueIsRef { name: "force".into(), - value: SchemaValue::Bool(true), + value: ExtendedValueIsLiteral::Resolved(SchemaValue::Bool(true)), }, )])]; assert!(matches!( @@ -2317,6 +3620,41 @@ mod tests { )); } + #[test] + fn deferred_value_is_does_not_mask_repeatable_map_type_error() { + let mut body = empty_body(); + body.options = vec![ExtendedOptionSpec { + long: "config".into(), + short: None, + aliases: vec![], + doc: doc(""), + value_name: None, + shape: ExtendedOptionShape::RepeatableMap(ExtendedRepeatableMapShape { + repetition: wire::Repetition::Repeated, + map_type: str_graph(), + duplicate_key_policy: wire::DuplicateKeyPolicy::Reject, + }), + default: None, + required: false, + env_var: None, + }]; + body.constraints = vec![ExtendedConstraint::RequiresAll(vec![ExtendedRef::ValueIs( + ExtendedValueIsRef { + name: "config".into(), + value: ExtendedValueIsLiteral::Deferred(ToolLiteral::Int(1)), + }, + )])]; + + let mut tool = leaf_tool_with_body(body); + normalize_inherited_globals(&mut tool).expect( + "normalization must not report a value-is mismatch before validation can report the malformed repeatable-map type", + ); + assert!(matches!( + validate_tool(&tool), + Err(ToolBuildError::RepeatableMapTypeNotMap(name)) if name == "config" + )); + } + fn ref_graph(id: &str) -> SchemaGraph { SchemaGraph::anonymous(SchemaType::Ref { id: id.into(), @@ -2354,6 +3692,29 @@ mod tests { )); } + #[test] + fn deferred_value_is_does_not_mask_dangling_option_type_ref() { + let mut body = empty_body(); + body.options = vec![scalar_opt("name", None)]; + body.options[0].shape = ExtendedOptionShape::Scalar(ref_graph("nope")); + body.constraints = vec![ExtendedConstraint::RequiresAll(vec![ExtendedRef::ValueIs( + ExtendedValueIsRef { + name: "name".into(), + value: ExtendedValueIsLiteral::Deferred(ToolLiteral::Str("x".into())), + }, + )])]; + + let mut tool = leaf_tool_with_body(body); + normalize_inherited_globals(&mut tool).expect( + "normalization must not report a value-is mismatch before schema validation can report the dangling type ref", + ); + assert!(matches!( + validate_tool(&tool), + Err(ToolBuildError::UnresolvedTypeRef { position, id }) + if position == "option --name" && id == "nope" + )); + } + #[test] fn dangling_type_ref_in_definition_body_is_rejected() { // The root resolves, but a definition body references a missing id. @@ -2461,4 +3822,159 @@ mod tests { Err(ToolBuildError::CommandNotFound(_)) )); } + + fn shapes_match(a: SchemaType, b: SchemaType) -> bool { + schema_shapes_match(&SchemaGraph::anonymous(a), &SchemaGraph::anonymous(b)) + } + + fn quantity(base_unit: &str, allowed_suffixes: &[&str]) -> SchemaType { + SchemaType::quantity(QuantitySpec { + base_unit: base_unit.to_string(), + allowed_suffixes: allowed_suffixes.iter().map(|s| s.to_string()).collect(), + min: None, + max: None, + }) + } + + #[test] + fn rich_leaf_quantity_identity_is_compared_but_bounds_ignored() { + // Different base unit: not interchangeable. + assert!(!shapes_match(quantity("m", &[]), quantity("s", &[]))); + // Same base unit, different accepted unit sets: not interchangeable. + assert!(!shapes_match( + quantity("m", &["m", "km"]), + quantity("m", &["m"]) + )); + // Same identity, suffix order irrelevant. + assert!(shapes_match( + quantity("m", &["m", "km"]), + quantity("m", &["km", "m"]) + )); + // Bounds (min/max) are validation restrictions and stay ignored. + let lo = SchemaType::quantity(QuantitySpec { + base_unit: "m".to_string(), + allowed_suffixes: vec![], + min: None, + max: None, + }); + let hi = SchemaType::quantity(QuantitySpec { + base_unit: "m".to_string(), + allowed_suffixes: vec![], + min: Some(crate::schema::QuantityValue { + mantissa: 0, + scale: 0, + unit: "m".to_string(), + }), + max: None, + }); + assert!(shapes_match(lo, hi)); + } + + #[test] + fn rich_leaf_secret_and_quota_identity_is_compared() { + assert!(shapes_match( + SchemaType::secret(SecretSpec { + category: Some("api-key".into()) + }), + SchemaType::secret(SecretSpec { + category: Some("api-key".into()) + }), + )); + assert!(!shapes_match( + SchemaType::secret(SecretSpec { + category: Some("api-key".into()) + }), + SchemaType::secret(SecretSpec { + category: Some("oauth-token".into()) + }), + )); + assert!(!shapes_match( + SchemaType::quota_token(QuotaTokenSpec { + resource_name: Some("tokens".into()) + }), + SchemaType::quota_token(QuotaTokenSpec { + resource_name: Some("requests".into()) + }), + )); + } + + #[test] + fn rich_leaf_text_and_binary_identity_is_compared_but_other_bounds_ignored() { + let text = |languages: Option<&[&str]>, regex: Option<&str>| { + SchemaType::text(TextRestrictions { + languages: languages.map(|ls| ls.iter().map(|s| s.to_string()).collect()), + min_length: None, + max_length: None, + regex: regex.map(|s| s.to_string()), + }) + }; + // Language set is type identity. + assert!(!shapes_match( + text(Some(&["en"]), None), + text(Some(&["de"]), None) + )); + assert!(!shapes_match(text(None, None), text(Some(&["en"]), None))); + // Regex is a refinable restriction and stays ignored. + assert!(shapes_match( + text(Some(&["en"]), Some("a+")), + text(Some(&["en"]), Some("b+")) + )); + + let binary = |mime: Option<&[&str]>, max_bytes: Option| { + SchemaType::binary(BinaryRestrictions { + mime_types: mime.map(|ms| ms.iter().map(|s| s.to_string()).collect()), + min_bytes: None, + max_bytes, + }) + }; + assert!(!shapes_match( + binary(Some(&["image/png"]), None), + binary(Some(&["image/jpeg"]), None) + )); + // Byte bounds are refinable restrictions and stay ignored. + assert!(shapes_match( + binary(Some(&["image/png"]), Some(10)), + binary(Some(&["image/png"]), Some(20)) + )); + } + + #[test] + fn rich_leaf_path_direction_and_kind_are_refinable_and_ignored() { + let path = |direction: PathDirection, kind: PathKind| { + SchemaType::path(PathSpec { + direction, + kind, + allowed_mime_types: None, + allowed_extensions: None, + }) + }; + // direction/kind are `#[arg]`-refinable, so a leaf may re-specify them; + // de-projection still treats them as the same inherited global. + assert!(shapes_match( + path(PathDirection::Input, PathKind::File), + path(PathDirection::Output, PathKind::Directory) + )); + } + + #[test] + fn plain_string_matches_unrestricted_text_but_not_language_restricted() { + let unrestricted = SchemaType::text(TextRestrictions { + languages: None, + min_length: None, + max_length: None, + regex: Some("^x$".to_string()), + }); + let language_restricted = SchemaType::text(TextRestrictions { + languages: Some(vec!["en".to_string()]), + min_length: None, + max_length: None, + regex: None, + }); + // A leaf `String` de-projects onto an inherited refined-`String` (`Text`) + // global; the regex is a refinable restriction and is ignored. + assert!(shapes_match(SchemaType::string(), unrestricted.clone())); + assert!(shapes_match(unrestricted, SchemaType::string())); + // A language-restricted `Text` is a different Rust type and must conflict. + assert!(!shapes_match(SchemaType::string(), language_restricted)); + } } diff --git a/sdks/rust/golem-rust/src/agentic/tool_literal.rs b/sdks/rust/golem-rust/src/agentic/tool_literal.rs index d518bc17da..b52de9e1e0 100644 --- a/sdks/rust/golem-rust/src/agentic/tool_literal.rs +++ b/sdks/rust/golem-rust/src/agentic/tool_literal.rs @@ -49,6 +49,52 @@ pub fn literal_to_schema_value( interpret(graph, &root, lit) } +/// Interprets `lit` as a `value-is` comparand literal against `graph`, honoring +/// the WIT "any occurrence / element equals this literal" rule: when the literal +/// is not a whole-value match and the comparand resolves (through `Option` +/// wrappers) to a list, the literal is interpreted as a single element value; to +/// a map, as a single map-value. +/// +/// `graph` is the comparand graph the runtime registered for the referenced +/// argument (`value_is_comparand_graph` for an option, the declared type for a +/// fixed positional, `list` for a tail). Because this peels exactly one +/// element/value level from the *whole declared type*, `value-is("xs", item)` is +/// accepted as an item literal whether `xs` is a `Vec`, a `type Alias = +/// Vec`, a map, or an ancestor-supplied global, and stays consistent with the +/// `value_is_compatible` check applied next. +pub fn value_is_literal_to_schema_value( + graph: &SchemaGraph, + lit: &ToolLiteral, +) -> Result { + let direct = match literal_to_schema_value(graph, lit) { + Ok(value) => return Ok(value), + Err(direct) => direct, + }; + // The literal is not a whole-value match; for a list-shaped comparand, + // interpret it as one element. + let mut ty = match graph.resolve_ref(&graph.root) { + Ok(ty) => ty, + Err(_) => return Err(direct), + }; + while let SchemaType::Option { inner, .. } = ty { + match graph.resolve_ref(inner) { + Ok(next) => ty = next, + Err(_) => return Err(direct), + } + } + match ty { + SchemaType::List { element, .. } | SchemaType::FixedList { element, .. } => { + let element = (**element).clone(); + interpret(graph, &element, lit).map_err(|_| direct) + } + SchemaType::Map { value, .. } => { + let map_value = (**value).clone(); + interpret(graph, &map_value, lit).map_err(|_| direct) + } + _ => Err(direct), + } +} + fn mismatch(ty: &SchemaType, lit: &ToolLiteral) -> ToolBuildError { ToolBuildError::DefaultTypeMismatch(format!("literal {lit:?} is not valid for type {ty:?}")) } @@ -158,6 +204,18 @@ fn interpret( } _ => Err(mismatch(resolved, lit)), }, + SchemaType::FixedList { + element, length, .. + } => match lit { + ToolLiteral::List(items) if items.len() == *length as usize => { + let elements = items + .iter() + .map(|item| interpret(graph, element, item)) + .collect::>()?; + Ok(SchemaValue::FixedList { elements }) + } + _ => Err(mismatch(resolved, lit)), + }, SchemaType::Map { key, value, .. } => match lit { ToolLiteral::Map(entries) => { let entries = entries @@ -166,6 +224,12 @@ fn interpret( .collect::>()?; Ok(SchemaValue::Map { entries }) } + // An empty array literal `[]` is the natural way to author an empty + // map default; it parses as a (List) literal but carries no entries, + // so it interprets as an empty map. + ToolLiteral::List(items) if items.is_empty() => { + Ok(SchemaValue::Map { entries: vec![] }) + } _ => Err(mismatch(resolved, lit)), }, _ => Err(ToolBuildError::DefaultTypeMismatch(format!( @@ -314,4 +378,28 @@ mod tests { } ); } + + #[test] + fn fixed_list_of_matching_length() { + let v = literal_to_schema_value( + &graph(SchemaType::fixed_list(SchemaType::u32(), 2)), + &ToolLiteral::List(vec![ToolLiteral::Int(1), ToolLiteral::Int(2)]), + ) + .unwrap(); + assert_eq!( + v, + SchemaValue::FixedList { + elements: vec![SchemaValue::U32(1), SchemaValue::U32(2)] + } + ); + } + + #[test] + fn fixed_list_of_wrong_length_is_rejected() { + let err = literal_to_schema_value( + &graph(SchemaType::fixed_list(SchemaType::u32(), 2)), + &ToolLiteral::List(vec![ToolLiteral::Int(1)]), + ); + assert!(err.is_err()); + } } diff --git a/sdks/rust/golem-rust/src/agentic/tool_refinement.rs b/sdks/rust/golem-rust/src/agentic/tool_refinement.rs index ca17c9c9eb..37acd25a3f 100644 --- a/sdks/rust/golem-rust/src/agentic/tool_refinement.rs +++ b/sdks/rust/golem-rust/src/agentic/tool_refinement.rs @@ -12,22 +12,32 @@ // See the License for the specific language governing permissions and // limitations under the License. +use crate::agentic::extended_tool_type::ToolBuildError; use crate::schema::schema_type::NumericBound; -use crate::schema::{ - MetadataEnvelope, PathDirection, PathKind, PathSpec, SchemaType, TextRestrictions, - UrlRestrictions, -}; +use crate::schema::{MetadataEnvelope, PathDirection, PathKind, SchemaType, TextRestrictions}; +/// Applies text refinements (`regex`/`min_length`/`max_length`) to a text-backed +/// schema. A plain `String` is promoted to `Text` (it has nowhere to store +/// restrictions); a `Text` overlays only the authored fields. Any other schema +/// kind is rejected with [`ToolBuildError::RefinementTypeMismatch`] rather than +/// silently rewritten — this is the runtime backstop for types the macro cannot +/// classify syntactically (e.g. a `type Alias = SomeRecord`). pub fn refine_text( base: SchemaType, regex: Option, min_len: Option, max_len: Option, -) -> SchemaType { +) -> Result { let metadata = base.metadata().clone(); let mut restrictions = match base { SchemaType::Text { restrictions, .. } => restrictions, - _ => TextRestrictions::default(), + SchemaType::String { .. } => TextRestrictions::default(), + other => { + return Err(ToolBuildError::RefinementTypeMismatch { + refinement: "text", + actual: schema_kind_name(&other), + }); + } }; if regex.is_some() { restrictions.regex = regex; @@ -38,30 +48,31 @@ pub fn refine_text( if max_len.is_some() { restrictions.max_length = max_len; } - SchemaType::Text { + Ok(SchemaType::Text { restrictions, metadata, - } + }) } /// Applies path refinements to a `Path` schema type. `accepts-stdio` is not a /// property of the schema type; it lives on the positional that carries the -/// path, so it is set on the command argument rather than here. +/// path, so it is set on the command argument rather than here. A non-`Path` +/// schema is rejected (no `String`→`Path` coercion). pub fn refine_path( base: SchemaType, direction: Option, kind: Option, mime: Option>, -) -> SchemaType { +) -> Result { let metadata = base.metadata().clone(); let mut spec = match base { SchemaType::Path { spec, .. } => spec, - _ => PathSpec { - direction: PathDirection::InOut, - kind: PathKind::Any, - allowed_mime_types: None, - allowed_extensions: None, - }, + other => { + return Err(ToolBuildError::RefinementTypeMismatch { + refinement: "path", + actual: schema_kind_name(&other), + }); + } }; if let Some(direction) = direction { spec.direction = direction; @@ -72,30 +83,44 @@ pub fn refine_path( if mime.is_some() { spec.allowed_mime_types = mime; } - SchemaType::Path { spec, metadata } + Ok(SchemaType::Path { spec, metadata }) } -pub fn refine_url(base: SchemaType, schemes: Option>) -> SchemaType { +/// Applies url refinements to a `Url` schema type. A non-`Url` schema is rejected +/// (no `String`→`Url` coercion). +pub fn refine_url( + base: SchemaType, + schemes: Option>, +) -> Result { let metadata = base.metadata().clone(); let mut restrictions = match base { SchemaType::Url { restrictions, .. } => restrictions, - _ => UrlRestrictions::default(), + other => { + return Err(ToolBuildError::RefinementTypeMismatch { + refinement: "url", + actual: schema_kind_name(&other), + }); + } }; if schemes.is_some() { restrictions.allowed_schemes = schemes; } - SchemaType::Url { + Ok(SchemaType::Url { restrictions, metadata, - } + }) } +/// Applies numeric refinements (`min`/`max`/`unit`) to one of the ten numeric +/// primitive schema variants, preserving the exact variant and overlaying only +/// the authored fields onto any existing restrictions. A non-numeric schema is +/// rejected rather than silently dropping the restrictions. pub fn refine_numeric( base: SchemaType, min: Option, max: Option, unit: Option, -) -> SchemaType { +) -> Result { let metadata = base.metadata().clone(); // Overlay only the specified fields onto any restrictions the base type // already carries (consistent with `refine_text`/`refine_path`/`refine_url`), @@ -111,7 +136,7 @@ pub fn refine_numeric( restrictions.unit = unit; } let restrictions = restrictions.normalize(); - match base { + let refined = match base { SchemaType::S8 { .. } => SchemaType::S8 { restrictions, metadata, @@ -152,10 +177,108 @@ pub fn refine_numeric( restrictions, metadata, }, - other => other.with_metadata(metadata), + other => { + return Err(ToolBuildError::RefinementTypeMismatch { + refinement: "numeric", + actual: schema_kind_name(&other), + }); + } + }; + Ok(refined) +} + +/// A short, stable name for a schema kind, used in +/// [`ToolBuildError::RefinementTypeMismatch`] messages. Exhaustive so adding a +/// `SchemaType` variant forces an update here. +fn schema_kind_name(ty: &SchemaType) -> &'static str { + match ty { + SchemaType::Ref { .. } => "ref", + SchemaType::Bool { .. } => "bool", + SchemaType::S8 { .. } + | SchemaType::S16 { .. } + | SchemaType::S32 { .. } + | SchemaType::S64 { .. } + | SchemaType::U8 { .. } + | SchemaType::U16 { .. } + | SchemaType::U32 { .. } + | SchemaType::U64 { .. } + | SchemaType::F32 { .. } + | SchemaType::F64 { .. } => "numeric", + SchemaType::Char { .. } => "char", + SchemaType::String { .. } => "string", + SchemaType::Text { .. } => "text", + SchemaType::Path { .. } => "path", + SchemaType::Url { .. } => "url", + SchemaType::Record { .. } => "record", + SchemaType::Variant { .. } => "variant", + SchemaType::Enum { .. } => "enum", + SchemaType::Flags { .. } => "flags", + SchemaType::Tuple { .. } => "tuple", + SchemaType::List { .. } => "list", + SchemaType::FixedList { .. } => "fixed-list", + SchemaType::Map { .. } => "map", + SchemaType::Option { .. } => "option", + SchemaType::Result { .. } => "result", + SchemaType::Binary { .. } => "binary", + SchemaType::Datetime { .. } => "datetime", + SchemaType::Duration { .. } => "duration", + SchemaType::Quantity { .. } => "quantity", + SchemaType::Union { .. } => "union", + SchemaType::Secret { .. } => "secret", + SchemaType::QuotaToken { .. } => "quota-token", + SchemaType::Future { .. } => "future", + SchemaType::Stream { .. } => "stream", } } pub fn empty_metadata() -> MetadataEnvelope { MetadataEnvelope::default() } + +/// Converts a concrete Rust numeric value into the matching [`NumericBound`] +/// family for its representation. Used by the tool macro to lower +/// `#[arg(min = …, max = …, bounds = (…, …))]` literals to bounds whose family +/// (`Signed`/`Unsigned`/`FloatBits`) matches the argument's numeric type, +/// without the macro having to classify the representation itself. +/// +/// Fallible because a float bound literal can be `NaN`/`inf`, which must surface +/// as a [`ToolBuildError`] from the descriptor build rather than panicking. +pub trait IntoNumericBound { + fn into_numeric_bound(self) -> Result; +} + +macro_rules! impl_into_numeric_bound_signed { + ($($t:ty),*) => { + $(impl IntoNumericBound for $t { + fn into_numeric_bound(self) -> Result { + Ok(NumericBound::Signed(self as i64)) + } + })* + }; +} +macro_rules! impl_into_numeric_bound_unsigned { + ($($t:ty),*) => { + $(impl IntoNumericBound for $t { + fn into_numeric_bound(self) -> Result { + Ok(NumericBound::Unsigned(self as u64)) + } + })* + }; +} +macro_rules! impl_into_numeric_bound_float { + ($($t:ty),*) => { + $(impl IntoNumericBound for $t { + fn into_numeric_bound(self) -> Result { + NumericBound::float(self as f64) + .map_err(|e| ToolBuildError::InvalidNumericBound(e.to_string())) + } + })* + }; +} + +// `usize` is the only platform-width integer with a schema value mapping +// (modeled as `u64`); `isize` has no `IntoSchema`/`FromSchema`, so it is not a +// usable tool value type and intentionally has no bound conversion here. +impl_into_numeric_bound_signed!(i8, i16, i32, i64); +impl_into_numeric_bound_unsigned!(u8, u16, u32, u64, usize); +impl_into_numeric_bound_float!(f32, f64); diff --git a/sdks/rust/golem-rust/tests/tool.rs b/sdks/rust/golem-rust/tests/tool.rs new file mode 100644 index 0000000000..7f4fd457af --- /dev/null +++ b/sdks/rust/golem-rust/tests/tool.rs @@ -0,0 +1,2734 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +test_r::enable!(); + +#[cfg(test)] +#[cfg(feature = "export_golem_agentic")] +#[test_r::sequential] +#[allow(clippy::disallowed_names, dead_code)] +mod tests { + use golem_rust::agentic::{ + ExtendedOptionShape, ExtendedToolType, ToolBuildCtx, ToolBuildError, ToolErrorSchema, + }; + use golem_rust::{ + FromSchema, IntoSchema, Quantity, QuantityUnit, tool_definition, tool_implementation, + }; + use golem_rust_macro::ToolError; + use std::collections::BTreeMap; + use std::fs; + use std::path::Path; + use std::process::Command; + use test_r::test; + + #[derive(ToolError)] + enum GrepError { + #[tool_error(kind = "usage-error", exit_code = 2)] + BadPattern(String), + #[tool_error(kind = "runtime-error", exit_code = 1)] + Io(String), + } + + /// Search files for a regex pattern. + #[tool_definition(version = "1.2.3")] + trait Grep { + #[arg(case_sensitive = "global", short = 'i', kind = "flag")] + #[arg(pattern = "positional", regex = r"^.+$")] + #[arg(files = "tail", accepts_stdio = true)] + fn grep( + &self, + case_sensitive: bool, + pattern: String, + files: Vec, + ) -> Result, GrepError>; + } + + struct GrepImpl; + + #[tool_implementation] + impl Grep for GrepImpl { + fn grep( + &self, + _case_sensitive: bool, + _pattern: String, + _files: Vec, + ) -> Result, GrepError> { + Ok(vec![]) + } + } + + fn descriptor() -> ExtendedToolType { + ::__tool_descriptor() + } + + #[test] + fn grep_descriptor_builds() { + let tool = descriptor::(); + assert_eq!(tool.version, "1.2.3"); + assert_eq!(tool.tool_name(), "grep"); + // Root command has a body (implicit-body method). + let root = &tool.commands[0]; + assert_eq!(root.name, "grep"); + let body = root.body.as_ref().expect("root has a body"); + // `case_sensitive` is a global flag (declared global on the root). + assert_eq!(root.globals.flags.len(), 1); + assert_eq!(root.globals.flags[0].long, "case-sensitive"); + assert_eq!(root.globals.flags[0].short, Some('i')); + // `pattern` is a fixed positional; `files` is the tail positional. + assert_eq!(body.positionals.fixed.len(), 1); + assert_eq!(body.positionals.fixed[0].name, "pattern"); + let tail = body.positionals.tail.as_ref().expect("tail positional"); + assert_eq!(tail.name, "files"); + assert!(tail.accepts_stdio); + // Error cases are read from the `#[derive(ToolError)]` enum. + assert_eq!(body.errors.len(), 2); + assert_eq!(body.errors[0].name, "bad-pattern"); + assert_eq!(body.errors[0].exit_code, 2); + // The whole thing converts to a valid wire tool. + tool.try_to_tool().expect("grep tool is valid"); + } + + #[test] + fn grep_error_cases() { + let cases = GrepError::error_cases().expect("error cases build"); + assert_eq!(cases.len(), 2); + assert_eq!(cases[0].name, "bad-pattern"); + assert_eq!(cases[1].name, "io"); + } + + // --- subtree: git + remote --------------------------------------------- + + /// Manage remotes. + #[tool_definition] + trait Remote { + /// Add a remote. + fn add(&self, verbose: bool, name: String, url: String) -> Result<(), RemoteError>; + /// Remove a remote. + #[command(name = "rm")] + fn remove(&self, name: String) -> Result<(), RemoteError>; + } + + #[derive(ToolError)] + enum RemoteError { + #[tool_error(kind = "runtime-error", exit_code = 1)] + Failed(String), + } + + struct RemoteImpl; + + #[tool_implementation] + impl Remote for RemoteImpl { + fn add(&self, _verbose: bool, _name: String, _url: String) -> Result<(), RemoteError> { + Ok(()) + } + fn remove(&self, _name: String) -> Result<(), RemoteError> { + Ok(()) + } + } + + /// The stupid content tracker. + #[tool_definition] + trait Git { + #[arg(config = "option", repeatable = "repeated")] + #[command(aliases = ["ci"])] + fn commit( + &self, + message: String, + config: BTreeMap, + ) -> Result<(), CommitError>; + + // The subtree method declares `verbose` as a propagating global; the + // child `Remote::add` repeats it as a body parameter, which must be + // de-projected (suppressed) when grafted under this inherited global. + #[command(subtree = Remote)] + fn remote(&self, verbose: bool) -> RemoteSubtree; + } + + // A placeholder return type for the subtree dispatcher method; never used. + struct RemoteSubtree; + + #[derive(ToolError)] + enum CommitError { + #[tool_error(kind = "runtime-error", exit_code = 1)] + Failed(String), + } + + struct GitImpl; + + #[tool_implementation] + impl Git for GitImpl { + fn commit( + &self, + _message: String, + _config: BTreeMap, + ) -> Result<(), CommitError> { + Ok(()) + } + fn remote(&self, _verbose: bool) -> RemoteSubtree { + RemoteSubtree + } + } + + #[test] + fn git_subtree_grafts_remote() { + // Build with an explicit ctx so the subtree graft path is exercised. + let tool = __golem_tool_descriptor_for_Git(&mut ToolBuildCtx::new()) + .expect("git descriptor builds"); + assert_eq!(tool.tool_name(), "git"); + let root = &tool.commands[0]; + // git has two subcommands: commit and remote. + assert_eq!(root.subcommands.len(), 2); + + // The `commit` command carries a repeatable-map option for `config`. + let commit = root + .subcommands + .iter() + .map(|&i| &tool.commands[i as usize]) + .find(|c| c.name == "commit") + .expect("commit command"); + assert_eq!(commit.aliases, vec!["ci".to_string()]); + let commit_body = commit.body.as_ref().expect("commit body"); + let config_opt = commit_body + .options + .iter() + .find(|o| o.long == "config") + .expect("config option"); + assert!(matches!( + config_opt.shape, + ExtendedOptionShape::RepeatableMap(_) + )); + + // The `remote` graft is a pure dispatcher (no body) with `add` and `rm`. + let remote = root + .subcommands + .iter() + .map(|&i| &tool.commands[i as usize]) + .find(|c| c.name == "remote") + .expect("remote command"); + assert!(remote.body.is_none()); + // The subtree method's `verbose` parameter became a global flag on the + // `remote` dispatcher, propagating to every descendant body. + assert!( + remote.globals.flags.iter().any(|f| f.long == "verbose"), + "remote dispatcher carries the inherited `verbose` global flag" + ); + let sub_names: Vec<&str> = remote + .subcommands + .iter() + .map(|&i| tool.commands[i as usize].name.as_str()) + .collect(); + assert!(sub_names.contains(&"add")); + assert!(sub_names.contains(&"rm")); + + // `Remote::add` repeats `verbose` in its Rust signature; once grafted + // under the inherited global it must be de-projected from the body so + // the canonical shape stays valid (no body-local / inherited-global + // collision). + let add = remote + .subcommands + .iter() + .map(|&i| &tool.commands[i as usize]) + .find(|c| c.name == "add") + .expect("add command"); + let add_body = add.body.as_ref().expect("add body"); + assert!( + !add_body.flags.iter().any(|f| f.long == "verbose"), + "inherited `verbose` global must be suppressed from the `add` body" + ); + + tool.try_to_tool().expect("git tool is valid"); + } + + // --- multi-level subtree: inherited-global suppression at depth --------- + // + // outer -> mid -> inner -> leaf, where each dispatcher level re-declares the + // same propagating `verbose` global. Every child trait is synthesized + // standalone, so the intermediate `inner` dispatcher carries its own + // `verbose` global; once grafted under `mid` (which already supplies + // `verbose`), that nested duplicate must be pruned or the validator rejects + // the colliding inherited global. + + #[tool_definition] + trait Inner { + /// A leaf under inner. + fn leaf(&self, verbose: bool, name: String) -> Result<(), RemoteError>; + } + + // Placeholder return types for the subtree dispatcher methods; never used. + struct InnerSubtree; + struct MidSubtree; + + #[tool_definition] + trait Mid { + #[command(subtree = Inner)] + fn inner(&self, verbose: bool) -> InnerSubtree; + } + + #[tool_definition] + trait Outer { + #[command(subtree = Mid)] + fn mid(&self, verbose: bool) -> MidSubtree; + } + + #[test] + fn multilevel_subtree_suppresses_inherited_globals_at_depth() { + let tool = __golem_tool_descriptor_for_Outer(&mut ToolBuildCtx::new()) + .expect("outer descriptor builds"); + assert_eq!(tool.tool_name(), "outer"); + + let find = |name: &str| { + tool.commands + .iter() + .find(|c| c.name == name) + .unwrap_or_else(|| panic!("command `{name}` present")) + }; + + // `verbose` is supplied once at the `mid` dispatcher (the top subtree + // method's global). + let mid = find("mid"); + assert!( + mid.globals.flags.iter().any(|f| f.long == "verbose"), + "the `mid` dispatcher carries the `verbose` global" + ); + // The nested `inner` dispatcher independently declared `verbose` when + // synthesized standalone; grafted under `mid` it must be pruned. + let inner = find("inner"); + assert!( + !inner.globals.flags.iter().any(|f| f.long == "verbose"), + "nested dispatcher must not redeclare the inherited `verbose` global" + ); + // The `leaf` body repeated `verbose`; it must be suppressed too. + let leaf = find("leaf"); + let leaf_body = leaf.body.as_ref().expect("leaf body"); + assert!( + !leaf_body.flags.iter().any(|f| f.long == "verbose"), + "inherited `verbose` global must be suppressed from the `leaf` body" + ); + + // Valid only if both the nested duplicate global and the body copy were + // pruned. + tool.try_to_tool() + .expect("multi-level subtree tool is valid"); + } + + // --- subtree inheriting a global from the parent ROOT command ----------- + // + // `verbose` is declared once on the `cli` root command. It is in effective + // scope for the whole `mid` subtree even though the `mid` dispatcher method + // contributes no globals of its own, so the nested `inner` dispatcher's + // standalone `verbose` global (and any body copy) must still be suppressed. + + #[tool_definition] + trait Cli { + #[arg(verbose = "global", kind = "flag")] + fn cli(&self, verbose: bool, target: String) -> Result<(), RemoteError>; + + #[command(subtree = Mid)] + fn mid(&self) -> MidSubtree; + } + + #[test] + fn subtree_inherits_global_from_parent_root_command() { + let tool = __golem_tool_descriptor_for_Cli(&mut ToolBuildCtx::new()) + .expect("cli descriptor builds"); + assert_eq!(tool.tool_name(), "cli"); + + let find = |name: &str| { + tool.commands + .iter() + .find(|c| c.name == name) + .unwrap_or_else(|| panic!("command `{name}` present")) + }; + + // `verbose` is declared once, on the `cli` root command. + let root = find("cli"); + assert!( + root.globals.flags.iter().any(|f| f.long == "verbose"), + "the `cli` root command carries the `verbose` global" + ); + + // The nested `inner` dispatcher (from Mid) redeclared `verbose` when + // synthesized standalone; under `cli`'s inherited root global it must be + // pruned even though `cli`'s `mid` dispatcher method contributes no + // globals of its own. + let inner = find("inner"); + assert!( + !inner.globals.flags.iter().any(|f| f.long == "verbose"), + "nested dispatcher must not redeclare the root-inherited `verbose` global" + ); + + tool.try_to_tool() + .expect("subtree inheriting a root global is valid"); + } + + #[tool_definition] + trait TypeMismatchChild { + fn leaf(&self, verbose: String, name: String) -> Result<(), RemoteError>; + } + + struct TypeMismatchChildSubtree; + + #[tool_definition] + trait TypeMismatchParent { + #[command(subtree = TypeMismatchChild)] + fn type_mismatch_child(&self, verbose: bool) -> TypeMismatchChildSubtree; + } + + #[test] + fn inherited_global_conflict_with_different_typed_child_parameter_is_rejected() { + // The child `leaf` declares `verbose: String` while the parent subtree + // method declares the propagating global `verbose: bool`. The shapes are + // incompatible, so the composition is invalid: the descriptor build must + // reject it rather than silently dropping or replacing either `verbose`. + let err = __golem_tool_descriptor_for_TypeMismatchParent(&mut ToolBuildCtx::new()) + .expect_err("a child parameter colliding with an inherited global of a different shape must be rejected"); + assert!( + matches!( + err, + ToolBuildError::InheritedGlobalConflict { ref name, ref inherited, ref command } + if name == "verbose" && inherited == "verbose" && command == "leaf" + ), + "expected an InheritedGlobalConflict for `verbose` on `leaf`, got {err:?}", + ); + } + + struct Meters; + + impl QuantityUnit for Meters { + fn type_id() -> golem_rust::schema::TypeId { + golem_rust::schema::TypeId::new("golem.test.Meters") + } + + fn base_unit() -> &'static str { + "m" + } + } + + struct Seconds; + + impl QuantityUnit for Seconds { + fn type_id() -> golem_rust::schema::TypeId { + golem_rust::schema::TypeId::new("golem.test.Seconds") + } + + fn base_unit() -> &'static str { + "s" + } + } + + #[tool_definition] + trait QuantityGlobalMismatch { + #[arg(amount = "global")] + fn quantity_global_mismatch( + &self, + amount: Quantity, + target: String, + ) -> Result<(), RemoteError>; + + fn leaf(&self, amount: Quantity, name: String) -> Result<(), RemoteError>; + } + + #[test] + fn leaf_redeclaring_quantity_root_global_with_different_unit_is_rejected() { + let err = __golem_tool_descriptor_for_QuantityGlobalMismatch(&mut ToolBuildCtx::new()) + .expect_err( + "a leaf re-declaring a quantity root global with a different unit spec must be rejected", + ); + assert!( + matches!( + err, + ToolBuildError::InheritedGlobalConflict { ref name, ref inherited, ref command } + if name == "amount" && inherited == "amount" && command == "leaf" + ), + "expected an InheritedGlobalConflict for quantity `amount` on `leaf`, got {err:?}", + ); + } + + // A leaf command in the SAME trait as the root command re-declaring a root + // global with an incompatible type is rejected (the root-global inheritance + // path, not the subtree path). + #[tool_definition] + trait RootGlobalLeafMismatch { + #[arg(verbose = "global", kind = "flag")] + fn root_global_leaf_mismatch( + &self, + verbose: bool, + target: String, + ) -> Result<(), RemoteError>; + fn leaf(&self, verbose: String, name: String) -> Result<(), RemoteError>; + } + + #[test] + fn leaf_redeclaring_root_global_with_mismatched_type_is_rejected() { + let err = __golem_tool_descriptor_for_RootGlobalLeafMismatch(&mut ToolBuildCtx::new()) + .expect_err( + "a leaf re-declaring a root global with an incompatible type must be rejected", + ); + assert!( + matches!( + err, + ToolBuildError::InheritedGlobalConflict { ref name, ref inherited, ref command } + if name == "verbose" && inherited == "verbose" && command == "leaf" + ), + "expected an InheritedGlobalConflict for `verbose` on `leaf`, got {err:?}", + ); + } + + // A leaf command in the same trait as the root re-declaring a root global + // with a COMPATIBLE type has the body copy removed; the inherited global is + // the single declaration. + #[tool_definition] + trait RootGlobalLeafMatch { + #[arg(verbose = "global", kind = "flag")] + fn root_global_leaf_match(&self, verbose: bool, target: String) -> Result<(), RemoteError>; + fn leaf(&self, verbose: bool, name: String) -> Result<(), RemoteError>; + } + + #[tool_definition] + trait RootGlobalLeafMatchInferredBool { + #[arg(verbose = "global")] + fn root_global_leaf_match_inferred_bool( + &self, + verbose: bool, + target: String, + ) -> Result<(), RemoteError>; + fn leaf(&self, verbose: bool, name: String) -> Result<(), RemoteError>; + } + + #[test] + fn leaf_redeclaring_root_global_with_matching_type_is_suppressed() { + let tool = __golem_tool_descriptor_for_RootGlobalLeafMatch(&mut ToolBuildCtx::new()) + .expect("matching root-global re-declaration builds"); + let leaf = tool + .commands + .iter() + .find(|c| c.name == "leaf") + .expect("leaf command"); + let body = leaf.body.as_ref().expect("leaf body"); + assert!( + !body.flags.iter().any(|f| f.long == "verbose"), + "the inherited `verbose` root global must be suppressed from the leaf body" + ); + let root = &tool.commands[0]; + assert!( + root.globals.flags.iter().any(|f| f.long == "verbose"), + "the root command keeps the `verbose` global" + ); + tool.try_to_tool() + .expect("matching root-global re-declaration is valid"); + } + + #[test] + fn explicit_global_bool_still_infers_global_flag() { + let tool = + __golem_tool_descriptor_for_RootGlobalLeafMatchInferredBool(&mut ToolBuildCtx::new()) + .expect( + "a bool global should project as a flag and de-project a matching leaf flag", + ); + let root = &tool.commands[0]; + assert!( + root.globals.flags.iter().any(|f| f.long == "verbose"), + "a bool global should be exposed as a global flag" + ); + assert!( + root.globals.options.iter().all(|o| o.long != "verbose"), + "a bool global should not be exposed as a value-taking global option" + ); + let leaf = tool + .commands + .iter() + .find(|c| c.name == "leaf") + .expect("leaf command"); + let body = leaf.body.as_ref().expect("leaf body"); + assert!( + !body.flags.iter().any(|f| f.long == "verbose"), + "the matching inherited bool global must be suppressed from the leaf body" + ); + tool.try_to_tool() + .expect("matching inferred bool global re-declaration is valid"); + } + + #[derive(Clone, Debug, IntoSchema, FromSchema)] + struct RecursiveNode { + next: Option>, + } + + #[tool_definition] + trait RootGlobalRecursiveLeafMatch { + #[arg(node = "global")] + fn root_global_recursive_leaf_match( + &self, + node: RecursiveNode, + target: String, + ) -> Result<(), RemoteError>; + fn leaf(&self, node: RecursiveNode, name: String) -> Result<(), RemoteError>; + } + + #[test] + fn leaf_redeclaring_recursive_root_global_with_matching_type_is_suppressed() { + let tool = + __golem_tool_descriptor_for_RootGlobalRecursiveLeafMatch(&mut ToolBuildCtx::new()) + .expect("the exact same recursive root-global re-declaration should be compatible"); + let leaf = tool + .commands + .iter() + .find(|c| c.name == "leaf") + .expect("leaf command"); + let body = leaf.body.as_ref().expect("leaf body"); + assert!( + !body.positionals.fixed.iter().any(|p| p.name == "node"), + "the inherited recursive `node` root global must be suppressed from the leaf body" + ); + tool.try_to_tool() + .expect("matching recursive root-global re-declaration is valid"); + } + + // A subtree dispatcher param repeating a root global with an incompatible + // type is rejected (the subtree-method global path). + #[tool_definition] + trait DispatcherMismatchChild { + fn leaf(&self, name: String) -> Result<(), RemoteError>; + } + + struct DispatcherMismatchSubtree; + + #[tool_definition] + trait DispatcherMismatchParent { + #[arg(format = "global")] + fn dispatcher_mismatch_parent( + &self, + format: String, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = DispatcherMismatchChild)] + fn dispatcher_mismatch_child(&self, format: bool) -> DispatcherMismatchSubtree; + } + + #[test] + fn subtree_dispatcher_param_conflicting_with_root_global_is_rejected() { + let err = __golem_tool_descriptor_for_DispatcherMismatchParent(&mut ToolBuildCtx::new()) + .expect_err( + "a subtree dispatcher param conflicting with a root global must be rejected", + ); + assert!( + matches!( + err, + ToolBuildError::InheritedGlobalConflict { ref name, .. } if name == "format" + ), + "expected an InheritedGlobalConflict for `format`, got {err:?}", + ); + } + + // An inherited re-declaration that is explicitly marked as a tail must not + // steal the body's single tail slot from a genuine `Vec` body tail: it is + // lowered to a droppable repeatable-list option surrogate and removed by + // normalization (when shape-compatible with the inherited global). + #[tool_definition] + trait InheritedExplicitTail { + #[arg(items = "global")] + fn inherited_explicit_tail( + &self, + items: Vec, + target: String, + ) -> Result<(), RemoteError>; + + #[arg(items = "tail")] + fn collect(&self, items: Vec, rest: Vec) -> Result<(), RemoteError>; + } + + #[test] + fn inherited_explicit_tail_does_not_steal_genuine_tail_slot() { + let tool = __golem_tool_descriptor_for_InheritedExplicitTail(&mut ToolBuildCtx::new()) + .expect("inherited explicit tail descriptor builds"); + let collect = tool + .commands + .iter() + .find(|c| c.name == "collect") + .expect("collect command"); + let body = collect.body.as_ref().expect("collect body"); + assert_eq!( + body.positionals.tail.as_ref().map(|t| t.name.as_str()), + Some("rest"), + "the genuine `Vec` body tail must keep the tail slot" + ); + assert!( + !body.options.iter().any(|o| o.long == "items") + && body.positionals.tail.as_ref().map(|t| t.name.as_str()) != Some("items"), + "the inherited `items` re-declaration (lowered to a surrogate option) must be removed" + ); + assert!( + tool.commands[0] + .globals + .options + .iter() + .any(|o| o.long == "items"), + "the root keeps the `items` global" + ); + tool.try_to_tool() + .expect("inherited explicit tail tool is valid"); + } + + // The same surrogate path surfaces a real shape conflict instead of silently + // dropping the parameter: an inherited `Vec` global re-declared as an + // explicit tail of `Vec` must be rejected. + #[tool_definition] + trait InheritedExplicitTailMismatch { + #[arg(items = "global")] + fn inherited_explicit_tail_mismatch( + &self, + items: Vec, + target: String, + ) -> Result<(), RemoteError>; + + #[arg(items = "tail")] + fn collect(&self, items: Vec) -> Result<(), RemoteError>; + } + + #[test] + fn inherited_explicit_tail_with_mismatched_item_type_is_rejected() { + let err = + __golem_tool_descriptor_for_InheritedExplicitTailMismatch(&mut ToolBuildCtx::new()) + .expect_err( + "an inherited explicit tail of a mismatched item type must be rejected", + ); + assert!( + matches!( + err, + ToolBuildError::InheritedGlobalConflict { ref name, ref inherited, ref command } + if name == "items" && inherited == "items" && command == "collect" + ), + "expected an InheritedGlobalConflict for `items` on `collect`, got {err:?}", + ); + } + + // A body option whose ALIAS collides with an inherited global of an + // incompatible shape is rejected, and the error names the actually-colliding + // surface token (`verbose`, the alias) plus the inherited global it hit. + #[tool_definition] + trait AliasConflict { + #[arg(verbose = "global", kind = "flag")] + fn alias_conflict(&self, verbose: bool, target: String) -> Result<(), RemoteError>; + #[arg(local = "option", aliases = ["verbose"])] + fn leaf(&self, local: String) -> Result<(), RemoteError>; + } + + #[test] + fn body_option_alias_colliding_with_inherited_global_reports_alias() { + let err = __golem_tool_descriptor_for_AliasConflict(&mut ToolBuildCtx::new()) + .expect_err("a body option alias colliding with an inherited global must be rejected"); + assert!( + matches!( + err, + ToolBuildError::InheritedGlobalConflict { ref name, ref inherited, ref command } + if name == "verbose" && inherited == "verbose" && command == "leaf" + ), + "expected the conflict to name the colliding alias `verbose`, got {err:?}", + ); + } + + // If one local declaration collides with more than one inherited global, + // normalization must not stop after the first compatible collision and miss + // a later incompatible alias collision. Here `format` is compatible with the + // inherited string global, but the same option's alias `count` is + // incompatible with the inherited u32 global. + #[tool_definition] + trait AliasMultiCollisionConflict { + #[arg(format = "global")] + #[arg(count = "global")] + fn alias_multi_collision_conflict( + &self, + format: String, + count: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[arg(format = "option", aliases = ["count"])] + fn leaf(&self, format: String) -> Result<(), RemoteError>; + } + + #[test] + fn body_option_alias_conflict_after_compatible_collision_is_rejected() { + let err = __golem_tool_descriptor_for_AliasMultiCollisionConflict(&mut ToolBuildCtx::new()) + .expect_err( + "a local option alias colliding with an incompatible inherited global must be rejected even if its long name also collides compatibly", + ); + assert!( + matches!( + err, + ToolBuildError::InheritedGlobalConflict { ref name, ref inherited, ref command } + if name == "count" && inherited == "count" && command == "leaf" + ), + "expected an InheritedGlobalConflict for alias `count` on `leaf`, got {err:?}", + ); + } + + #[tool_definition] + trait AliasMultiCompatibleCollisionConflict { + #[arg(format = "global")] + #[arg(profile = "global")] + fn alias_multi_compatible_collision_conflict( + &self, + format: String, + profile: String, + target: String, + ) -> Result<(), RemoteError>; + + #[arg(format = "option", aliases = ["profile"])] + fn leaf(&self, format: String) -> Result<(), RemoteError>; + } + + #[test] + fn body_option_alias_colliding_with_two_compatible_inherited_globals_is_rejected() { + let err = __golem_tool_descriptor_for_AliasMultiCompatibleCollisionConflict( + &mut ToolBuildCtx::new(), + ) + .expect_err( + "one local parameter must not be de-projected onto two distinct inherited globals", + ); + assert!( + matches!(err, ToolBuildError::InheritedGlobalConflict { ref command, .. } if command == "leaf"), + "expected an inherited-global conflict for the ambiguous `leaf` parameter, got {err:?}", + ); + } + + // Cross-subtree tail-inference boundary (oracle finding 2): a subtree child + // is synthesized standalone, before it knows which of its parameters the + // parent hoists into a propagating global, so a child subcommand cannot rely + // on *inferred* tail promotion that only becomes correct post-composition. + // The supported pattern is to annotate the child explicitly. This proves the + // explicit pattern survives composition: `items` stays the tail and the + // hoisted `format` option is reconciled away under the inherited global. + #[tool_definition] + trait Fetcher { + #[arg(items = "tail")] + #[arg(format = "option")] + fn collect(&self, items: Vec, format: String) -> Result<(), RemoteError>; + } + + struct FetcherSubtree; + + #[tool_definition] + trait Downloader { + #[command(subtree = Fetcher)] + fn fetcher(&self, format: String) -> FetcherSubtree; + } + + #[test] + fn explicit_child_tail_survives_subtree_global_hoisting() { + let tool = __golem_tool_descriptor_for_Downloader(&mut ToolBuildCtx::new()) + .expect("downloader subtree descriptor builds"); + let collect = tool + .commands + .iter() + .find(|c| c.name == "collect") + .expect("collect subcommand"); + let body = collect.body.as_ref().expect("collect body"); + assert_eq!( + body.positionals.tail.as_ref().map(|t| t.name.as_str()), + Some("items"), + "the explicit child tail must survive composition under the hoisted global" + ); + assert!( + !body.options.iter().any(|o| o.long == "format"), + "the child `format` option must be reconciled away under the inherited `format` global" + ); + tool.try_to_tool().expect("downloader tool is valid"); + } + + // Tail inference must survive a trailing parameter that repeats an inherited + // root global: the inherited duplicate is removed by normalization, and the + // preceding `Vec` remains a tail positional. + #[tool_definition] + trait TailWithInheritedTrailingGlobal { + #[arg(format = "global")] + fn tail_with_inherited_trailing_global( + &self, + format: String, + target: String, + ) -> Result<(), RemoteError>; + fn collect(&self, items: Vec, format: String) -> Result<(), RemoteError>; + } + + #[test] + fn tail_inference_survives_trailing_inherited_global() { + let tool = + __golem_tool_descriptor_for_TailWithInheritedTrailingGlobal(&mut ToolBuildCtx::new()) + .expect("descriptor builds"); + let collect = tool + .commands + .iter() + .find(|c| c.name == "collect") + .expect("collect command"); + let body = collect.body.as_ref().expect("collect body"); + assert_eq!( + body.positionals.tail.as_ref().map(|t| t.name.as_str()), + Some("items"), + "a trailing parameter repeating an inherited global must not prevent tail inference" + ); + assert!( + !body.positionals.fixed.iter().any(|p| p.name == "format") + && !body.options.iter().any(|o| o.long == "format"), + "the inherited `format` re-declaration must be removed from the collect body" + ); + tool.try_to_tool().expect("tool is valid"); + } + + #[tool_definition] + trait TailBeforeGlobal { + #[arg(format = "global")] + fn collect(&self, items: Vec, format: String) -> Result<(), RemoteError>; + } + + #[test] + fn trailing_global_argument_does_not_prevent_vec_tail_inference() { + let tool = __golem_tool_descriptor_for_TailBeforeGlobal(&mut ToolBuildCtx::new()) + .expect("tail-before-global descriptor builds"); + let collect = tool + .commands + .iter() + .find(|c| c.name == "collect") + .expect("collect command"); + let body = collect.body.as_ref().expect("collect body"); + + assert!( + collect.globals.options.iter().any(|o| o.long == "format"), + "the trailing scalar global should project to a global option" + ); + assert!( + body.options.iter().all(|o| o.long != "items"), + "the final non-global Vec parameter should not be projected as a repeatable option" + ); + assert_eq!( + body.positionals.tail.as_ref().map(|t| t.name.as_str()), + Some("items"), + "a global parameter after the Vec should not prevent tail positional inference" + ); + } + + #[tool_definition] + trait TailInference { + fn collect(&self, prefix: String, items: Vec) -> Result<(), RemoteError>; + } + + struct TailInferenceImpl; + + #[tool_implementation] + impl TailInference for TailInferenceImpl { + fn collect(&self, _prefix: String, _items: Vec) -> Result<(), RemoteError> { + Ok(()) + } + } + + #[test] + fn vec_parameter_in_tail_position_is_tail_positional_without_attribute() { + let tool = __golem_tool_descriptor_for_TailInference(&mut ToolBuildCtx::new()) + .expect("tail inference descriptor builds"); + let collect = tool + .commands + .iter() + .find(|c| c.name == "collect") + .expect("collect command"); + let body = collect.body.as_ref().expect("collect body"); + + assert!( + body.options.iter().all(|o| o.long != "items"), + "a trailing Vec parameter should not be projected as a repeatable option" + ); + assert_eq!( + body.positionals.tail.as_ref().map(|t| t.name.as_str()), + Some("items"), + "a trailing Vec parameter should be projected as the tail positional" + ); + } + + #[tool_definition] + trait EmptyMapDefault { + #[arg(env = "option", default = [])] + fn set_env(&self, env: BTreeMap) -> Result<(), RemoteError>; + } + + #[test] + fn empty_array_default_for_map_option_builds_empty_map() { + let tool = __golem_tool_descriptor_for_EmptyMapDefault(&mut ToolBuildCtx::new()) + .expect("an empty array default on a map option should build an empty map default"); + let set_env = tool + .commands + .iter() + .find(|c| c.name == "set-env") + .expect("set-env command"); + let body = set_env.body.as_ref().expect("set-env body"); + let env = body + .options + .iter() + .find(|o| o.long == "env") + .expect("env option"); + + assert!( + env.default.is_some(), + "map option default should be present" + ); + tool.try_to_tool() + .expect("tool with empty map default should be valid"); + } + + #[test] + fn non_bool_flag_parameter_is_rejected() { + let output = cargo_check_tool_crate( + "non-bool-flag", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(level = "flag")] + fn run(&self, level: u32) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _level: u32) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "a bool flag projected from a u32 parameter should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn count_flag_parameter_must_be_u32() { + let output = cargo_check_tool_crate( + "count-flag-u64", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(verbose = "flag", kind = "count-flag")] + fn run(&self, verbose: u64) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _verbose: u64) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "a count flag is exposed as a u32 input field, so a u64 implementation parameter should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn count_flag_parameter_must_not_be_optional_u32() { + let output = cargo_check_tool_crate( + "count-flag-option-u32", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(verbose = "flag", kind = "count-flag")] + fn run(&self, verbose: Option) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _verbose: Option) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "a count flag is exposed as a u32 input field, so an Option implementation parameter should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn explicit_tail_parameter_before_fixed_positional_is_rejected() { + let output = cargo_check_tool_crate( + "tail-before-fixed", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(items = "tail")] + fn run(&self, items: Vec, suffix: String) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _items: Vec, _suffix: String) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "an explicit tail positional before a later fixed positional should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn optional_vec_tail_is_rejected_instead_of_dropping_optionality() { + let output = cargo_check_tool_crate( + "optional-vec-tail", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(items = "tail")] + fn run(&self, items: Option>) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _items: Option>) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "an Option> tail positional cannot be represented in ExtendedTailPositional and must be rejected instead of silently dropping optionality, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn scalar_global_argument_projects_to_global_option() { + let output = cargo_check_tool_crate( + "scalar-global-option", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(format = "global")] + fn bad_tool(&self, format: String) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn bad_tool(&self, _format: String) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + output.status.success(), + "an explicitly global scalar argument should project to a global option, but cargo check failed\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn optional_fixed_positional_before_required_fixed_positional_is_rejected() { + let output = cargo_check_tool_crate( + "optional-before-required-positional", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + fn run(&self, maybe_prefix: Option, required_name: String) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run( + &self, + _maybe_prefix: Option, + _required_name: String, + ) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "an optional fixed positional before a required fixed positional should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn text_refinement_on_non_text_parameter_is_rejected() { + let output = cargo_check_tool_crate( + "text-refinement-on-non-text", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(count = "positional", regex = "^[0-9]+$")] + fn run(&self, count: u32) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _count: u32) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "a text refinement on a non-text Rust parameter should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn tail_min_max_are_occurrence_bounds_not_item_numeric_bounds() { + let output = cargo_check_tool_crate( + "tail-min-max-string-items", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait GoodTool { + #[arg(items = "tail", min = 1, max = 3)] + fn run(&self, items: Vec) -> Result<(), BadError>; +} + +struct GoodToolImpl; + +#[tool_implementation] +impl GoodTool for GoodToolImpl { + fn run(&self, _items: Vec) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + output.status.success(), + "tail min/max should constrain occurrence count only, but cargo check failed\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[tool_definition] + trait NonFiniteNumericBound { + #[arg(value = "option", min = f64::NAN)] + fn run(&self, value: f64) -> Result<(), RemoteError>; + } + + #[test] + fn non_finite_numeric_bound_returns_tool_build_error_instead_of_panicking() { + let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { + __golem_tool_descriptor_for_NonFiniteNumericBound(&mut ToolBuildCtx::new()) + })); + + assert!( + result.is_ok(), + "descriptor build should return a ToolBuildError for a non-finite numeric bound, not panic" + ); + assert!( + result.expect("panic checked above").is_err(), + "a non-finite numeric bound should be rejected" + ); + } + + #[test] + fn usize_option_numeric_bounds_compile() { + let output = cargo_check_tool_crate( + "usize-option-numeric-bounds", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait GoodTool { + #[arg(count = "option", min = 1, max = 3)] + fn run(&self, count: usize) -> Result<(), BadError>; +} + +struct GoodToolImpl; + +#[tool_implementation] +impl GoodTool for GoodToolImpl { + fn run(&self, _count: usize) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + output.status.success(), + "usize is a supported schema type, so numeric bounds on a usize option should compile\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[tool_definition] + trait ValueIsRefinedLocalOption { + #[arg(format = "option", regex = "^(json|yaml)$")] + #[constraint(requires_all = value_is("format", "json"))] + fn run(&self, format: String) -> Result<(), RemoteError>; + } + + #[test] + fn value_is_constraint_uses_refined_local_option_schema() { + let tool = __golem_tool_descriptor_for_ValueIsRefinedLocalOption(&mut ToolBuildCtx::new()) + .expect("descriptor builds"); + + tool.try_to_tool().expect( + "value_is on a refined option should validate against the refined option schema", + ); + } + + type TagsAlias = Vec; + + #[tool_definition] + trait ValueIsListAliasOption { + #[arg(tags = "option")] + #[constraint(requires_all = value_is("tags", "prod"))] + fn run(&self, tags: TagsAlias) -> Result<(), RemoteError>; + } + + #[test] + fn value_is_item_literal_works_for_list_alias_option() { + let tool = __golem_tool_descriptor_for_ValueIsListAliasOption(&mut ToolBuildCtx::new()) + .expect("a value_is item literal should build for a list-shaped option alias"); + + tool.try_to_tool() + .expect("a value_is item literal should validate for a list-shaped option alias"); + } + + // A subtree child constraint can `value_is` a global supplied only by the + // parent subtree method. The standalone child cannot type the literal, so it + // is deferred and resolved when the parent composes the child. + #[tool_definition] + trait DeferredValueIsChild { + #[constraint(requires_all = value_is("format", "json"))] + fn leaf(&self, name: String) -> Result<(), RemoteError>; + } + + struct DeferredValueIsSubtree; + + #[tool_definition] + trait DeferredValueIsParent { + #[command(subtree = DeferredValueIsChild)] + fn deferred_value_is_child(&self, format: String) -> DeferredValueIsSubtree; + } + + #[test] + fn deferred_value_is_resolves_when_parent_composes_child() { + let tool = __golem_tool_descriptor_for_DeferredValueIsParent(&mut ToolBuildCtx::new()) + .expect("parent composition should build the descriptor"); + // The deferred child `value_is("format", ...)` must resolve against the + // parent-supplied `format` global and the composed tool must build. + tool.try_to_tool() + .expect("the composed tool with a resolved deferred value_is should build"); + } + + #[tool_definition] + trait DeferredValueIsListAliasChild { + #[constraint(requires_all = value_is("tags", "prod"))] + fn leaf(&self, name: String) -> Result<(), RemoteError>; + } + + struct DeferredValueIsListAliasSubtree; + + #[tool_definition] + trait DeferredValueIsListAliasParent { + #[arg(tags = "option")] + #[command(subtree = DeferredValueIsListAliasChild)] + fn deferred_value_is_list_alias_child( + &self, + tags: TagsAlias, + ) -> DeferredValueIsListAliasSubtree; + } + + #[test] + fn deferred_value_is_item_literal_works_for_parent_list_alias_global() { + let tool = __golem_tool_descriptor_for_DeferredValueIsListAliasParent( + &mut ToolBuildCtx::new(), + ) + .expect( + "a deferred value_is item literal should resolve for a list-shaped parent global alias", + ); + + tool.try_to_tool().expect( + "a resolved deferred item literal should validate for a list-shaped parent global alias", + ); + } + + #[test] + fn standalone_subtree_child_with_parent_only_value_is_fails_to_build() { + // Built without the parent, the child's `value_is("format", ...)` names a + // global no ancestor supplies, so `format` is not in the child's + // constraint scope at all. The literal stays deferred and the build fails + // as an unresolved constraint reference (the same error a `present` + // reference to an unknown name would give), not a silent accept. + let tool = __golem_tool_descriptor_for_DeferredValueIsChild(&mut ToolBuildCtx::new()) + .expect("standalone child descriptor builds with the literal still deferred"); + let err = tool.try_to_tool().unwrap_err(); + assert!( + matches!(err, ToolBuildError::UnresolvedConstraintRef(ref name) if name == "format"), + "expected an unresolved-constraint-ref error for `format`, got {err:?}", + ); + } + + // A subtree child re-declares an argument the parent supplies as a global, + // and its `value_is` literal is invalid against the *child-local* + // restriction but valid against the *parent global's wider* restriction. + // Composition removes the compatible child-local re-declaration (shape match, + // restrictions ignored), so the constraint must resolve against the parent + // global. A nested child therefore must defer resolution until the parent + // composes it: normalizing the child standalone would reject a constraint + // that is valid in the composed tool. + #[tool_definition] + trait RestrictionWidenChild { + #[arg(count = "option", min = 0, max = 5)] + #[constraint(requires_all = value_is("count", 15))] + fn leaf(&self, count: u32) -> Result<(), RemoteError>; + } + + struct RestrictionWidenSubtree; + + #[tool_definition] + trait RestrictionWidenParent { + #[arg(count = "option", min = 10, max = 20)] + #[command(subtree = RestrictionWidenChild)] + fn restriction_widen_child(&self, count: u32) -> RestrictionWidenSubtree; + } + + #[test] + fn nested_child_value_is_resolves_against_widened_parent_global_restriction() { + let tool = __golem_tool_descriptor_for_RestrictionWidenParent(&mut ToolBuildCtx::new()) + .expect( + "parent composition should build: the child `value_is(\"count\", 15)` resolves \ + against the parent global's 10..=20 restriction, which accepts 15", + ); + tool.try_to_tool().expect( + "the composed tool must build: 15 is valid against the widened parent global restriction", + ); + } + + #[tool_definition] + trait TextRestrictionGlobalRedeclaration { + #[arg(format = "global", regex = "^(json|yaml)$")] + fn text_restriction_global_redeclaration( + &self, + format: String, + target: String, + ) -> Result<(), RemoteError>; + + fn leaf(&self, format: String, name: String) -> Result<(), RemoteError>; + } + + #[test] + fn leaf_redeclaring_text_refined_string_global_is_suppressed() { + let tool = + __golem_tool_descriptor_for_TextRestrictionGlobalRedeclaration(&mut ToolBuildCtx::new()) + .expect( + "a leaf re-declaring the same String argument should be compatible with an inherited text-refined global; regex is a refinable restriction", + ); + let leaf = tool + .commands + .iter() + .find(|c| c.name == "leaf") + .expect("leaf command"); + let body = leaf.body.as_ref().expect("leaf body"); + assert!( + !body.positionals.fixed.iter().any(|p| p.name == "format"), + "the inherited text-refined `format` global must be suppressed from the leaf body" + ); + tool.try_to_tool() + .expect("matching String redeclaration under a text refinement is valid"); + } + + #[test] + fn standalone_child_value_is_violating_local_restriction_is_rejected() { + // Built without the parent, the child's own `count` option restricts to + // 0..=5, so `value_is("count", 15)` is contradictory and must be rejected + // — the same constraint that the parent later widens to validity. + match __golem_tool_descriptor_for_RestrictionWidenChild(&mut ToolBuildCtx::new()) { + Err(ToolBuildError::ValueIsTypeMismatch(name)) if name == "count" => {} + Err(other) => panic!("expected ValueIsTypeMismatch for `count`, got {other:?}"), + Ok(tool) => panic!( + "standalone child accepted a value_is literal that violates its local restriction; \ + try_to_tool returned {:?}", + tool.try_to_tool() + ), + } + } + + #[test] + fn value_is_constraint_can_reference_inherited_global_option() { + let output = cargo_check_tool_crate( + "value-is-inherited-global-option", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait GoodTool { + #[arg(format = "global")] + fn good_tool(&self, format: String, target: String) -> Result<(), BadError>; + + #[constraint(requires_all = value_is("format", "json"))] + fn leaf(&self, name: String) -> Result<(), BadError>; +} + +struct GoodToolImpl; + +#[tool_implementation] +impl GoodTool for GoodToolImpl { + fn good_tool(&self, _format: String, _target: String) -> Result<(), BadError> { + Ok(()) + } + + fn leaf(&self, _name: String) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + output.status.success(), + "a value_is constraint should be able to reference an inherited global option, but cargo check failed\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn value_is_constraint_can_reference_parent_subtree_global_option() { + let output = cargo_check_tool_crate( + "value-is-parent-subtree-global-option", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait ChildTool { + #[constraint(requires_all = value_is("format", "json"))] + fn leaf(&self, name: String) -> Result<(), BadError>; +} + +struct ChildSubtree; + +#[tool_definition] +trait ParentTool { + #[command(subtree = ChildTool)] + fn child_tool(&self, format: String) -> ChildSubtree; +} + +struct ChildImpl; + +#[tool_implementation] +impl ChildTool for ChildImpl { + fn leaf(&self, _name: String) -> Result<(), BadError> { + Ok(()) + } +} + +struct ParentImpl; + +#[tool_implementation] +impl ParentTool for ParentImpl { + fn child_tool(&self, _format: String) -> ChildSubtree { + ChildSubtree + } +} +"#, + ); + + assert!( + output.status.success(), + "a child subtree constraint should be able to value_is a global supplied by the parent subtree method, but cargo check failed\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn subtree_dispatcher_param_explicit_positional_is_rejected() { + let output = cargo_check_tool_crate( + "subtree-dispatcher-positional-param", + r#" +use golem_rust::{tool_definition, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait ChildTool { + fn leaf(&self, name: String) -> Result<(), BadError>; +} + +struct ChildToolSubtree; + +#[tool_definition] +trait ParentTool { + #[arg(format = "positional")] + #[command(subtree = ChildTool)] + fn child_tool(&self, format: String) -> ChildToolSubtree; +} +"#, + ); + + assert!( + !output.status.success(), + "a subtree dispatcher parameter explicitly placed as positional cannot be represented on a pure dispatcher and should be rejected instead of silently becoming a global option\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn path_refinement_on_non_path_parameter_is_rejected() { + let output = cargo_check_tool_crate( + "path-refinement-on-non-path", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(count = "option", kind = "file")] + fn run(&self, count: u32) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _count: u32) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "a path refinement on a non-path Rust parameter should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn numeric_unit_on_non_numeric_parameter_is_rejected() { + let output = cargo_check_tool_crate( + "numeric-unit-on-non-numeric", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(name = "option", unit = "ms")] + fn run(&self, name: String) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _name: String) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "a numeric unit on a non-numeric Rust parameter should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[tool_definition] + trait TailNumericUnit { + #[arg(values = "tail", unit = "ms")] + fn run(&self, values: Vec) -> Result<(), RemoteError>; + } + + #[test] + fn tail_numeric_unit_on_numeric_items_is_preserved() { + let tool = __golem_tool_descriptor_for_TailNumericUnit(&mut ToolBuildCtx::new()) + .expect("numeric tail descriptor builds"); + let run = tool + .commands + .iter() + .find(|c| c.name == "run") + .expect("run command"); + let tail = run + .body + .as_ref() + .and_then(|body| body.positionals.tail.as_ref()) + .expect("tail positional"); + + assert_eq!( + tail.item_type + .root + .numeric_restrictions() + .and_then(|restrictions| restrictions.unit.as_deref()), + Some("ms"), + "numeric refinements on a tail positional's item type must not be silently dropped" + ); + } + + #[tool_definition] + trait TailItemBoundsWithOccurrenceMax { + #[arg(values = "tail", bounds = (1, 3), max = 10)] + fn run(&self, values: Vec) -> Result<(), RemoteError>; + } + + #[test] + fn tail_item_bounds_coexist_with_occurrence_max() { + let tool = + __golem_tool_descriptor_for_TailItemBoundsWithOccurrenceMax(&mut ToolBuildCtx::new()) + .expect("tail descriptor builds"); + let run = tool + .commands + .iter() + .find(|c| c.name == "run") + .expect("run command"); + let tail = run + .body + .as_ref() + .and_then(|body| body.positionals.tail.as_ref()) + .expect("tail positional"); + + // `max = 10` bounds the occurrence count, not the item value. + assert_eq!(tail.max, Some(10), "occurrence max should be preserved"); + + // `bounds = (1, 3)` refines the item's numeric schema. + let restrictions = tail + .item_type + .root + .numeric_restrictions() + .expect("item carries numeric restrictions"); + assert_eq!( + restrictions.min, + Some(golem_rust::schema::schema_type::NumericBound::Unsigned(1)), + "item lower bound should come from `bounds`" + ); + assert_eq!( + restrictions.max, + Some(golem_rust::schema::schema_type::NumericBound::Unsigned(3)), + "item upper bound should come from `bounds`" + ); + } + + #[tool_definition] + trait TailOccurrenceMinGreaterThanMax { + #[arg(values = "tail", min = 5, max = 3)] + fn run(&self, values: Vec) -> Result<(), RemoteError>; + } + + #[test] + fn tail_occurrence_min_greater_than_max_is_rejected() { + let tool = + __golem_tool_descriptor_for_TailOccurrenceMinGreaterThanMax(&mut ToolBuildCtx::new()) + .expect("descriptor should build far enough to validate tail occurrence bounds"); + + assert!( + tool.try_to_tool().is_err(), + "a tail positional with occurrence min greater than max is impossible and should be rejected" + ); + } + + #[test] + fn tail_numeric_bounds_on_non_numeric_items_are_rejected() { + let output = cargo_check_tool_crate( + "tail-numeric-bounds-on-non-numeric-items", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(values = "tail", bounds = (1, 3))] + fn run(&self, values: Vec) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _values: Vec) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "numeric bounds on a non-numeric tail item should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn text_refinement_on_bool_flag_is_rejected() { + let output = cargo_check_tool_crate( + "text-refinement-on-bool-flag", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(force = "flag", regex = "yes|no")] + fn run(&self, force: bool) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _force: bool) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "a text refinement on a bool flag should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn option_with_count_flag_kind_is_rejected_instead_of_reclassified_as_flag() { + let output = cargo_check_tool_crate( + "option-with-count-flag-kind", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(level = "option", kind = "count-flag")] + fn run(&self, level: u32) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _level: u32) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "an arg explicitly placed as an option must not be silently reclassified as a count flag by `kind = \"count-flag\"`, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn tail_default_is_rejected_instead_of_silently_dropped() { + let output = cargo_check_tool_crate( + "tail-default-is-rejected", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(items = "tail", default = ["a", "b"])] + fn run(&self, items: Vec) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _items: Vec) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "a default on a tail positional cannot be represented in ExtendedTailPositional and must be rejected instead of silently dropped, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn parenthesized_bool_flag_default_is_accepted_like_other_metadata_literals() { + let output = cargo_check_tool_crate( + "parenthesized-bool-flag-default", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait GoodTool { + #[arg(force = "flag", default = (true))] + fn run(&self, force: bool) -> Result<(), BadError>; +} + +struct GoodToolImpl; + +#[tool_implementation] +impl GoodTool for GoodToolImpl { + fn run(&self, _force: bool) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + output.status.success(), + "parenthesized bool literals are accepted by the metadata-literal grammar and should work as flag defaults, but cargo check failed\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn option_accepts_stdio_is_rejected_instead_of_silently_dropped() { + let output = cargo_check_tool_crate( + "option-accepts-stdio", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(input = "option", accepts_stdio = true)] + fn run(&self, input: String) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _input: String) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "accepts_stdio has no field on options and should be rejected instead of silently dropped, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn value_name_on_flag_is_rejected_instead_of_silently_dropped() { + let output = cargo_check_tool_crate( + "value-name-on-flag", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(force = "flag", value_name = "FORCE")] + fn run(&self, force: bool) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _force: bool) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "a flag has no value_name field and it should be rejected instead of silently dropped, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn result_attr_on_unit_success_is_rejected_instead_of_silently_dropped() { + let output = cargo_check_tool_crate( + "result-attr-on-unit-success", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[result(formatters = ["json"], default = "json")] + fn run(&self) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "#[result] on a unit-success method has no wire result slot and should be rejected instead of silently dropped, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn explicit_arg_attr_on_stdin_stream_is_rejected_instead_of_silently_dropped() { + let output = cargo_check_tool_crate( + "stream-arg-attr", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; +use golem_rust::wasip2::io::streams::InputStream; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(input = "option")] + fn run(&self, input: InputStream) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _input: InputStream) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "a stdin/stdout stream is projected only from its type and any `#[arg]` field would be silently dropped, so it must be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn delim_without_delimited_repeatable_mode_is_rejected() { + let output = cargo_check_tool_crate( + "delim-without-mode", + r#" +use golem_rust::{tool_definition, tool_implementation, ToolError}; + +#[derive(ToolError)] +enum BadError { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait BadTool { + #[arg(tags = "option", delim = ',')] + fn run(&self, tags: Vec) -> Result<(), BadError>; +} + +struct BadToolImpl; + +#[tool_implementation] +impl BadTool for BadToolImpl { + fn run(&self, _tags: Vec) -> Result<(), BadError> { + Ok(()) + } +} +"#, + ); + + assert!( + !output.status.success(), + "a `delim` with the default `repeatable = \"repeated\"` mode would be silently dropped and must be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[tool_definition] + trait ValueIsFlag { + #[arg(force = "flag")] + #[constraint(requires_all = value_is("force", true))] + fn run(&self, force: bool) -> Result<(), RemoteError>; + } + + #[test] + fn value_is_against_flag_is_rejected_by_descriptor_build() { + let err = __golem_tool_descriptor_for_ValueIsFlag(&mut ToolBuildCtx::new()) + .expect_err("value_is against a flag should be rejected during descriptor build"); + + assert!( + matches!(err, ToolBuildError::ValueIsTypeMismatch(ref name) if name == "force"), + "expected ValueIsTypeMismatch for flag `force`, got {err:?}", + ); + } + + #[tool_definition] + trait ValueIsWrongLiteralType { + #[arg(count = "option")] + #[constraint(requires_all = value_is("count", "not-a-number"))] + fn run(&self, count: u32) -> Result<(), RemoteError>; + } + + #[test] + fn value_is_literal_type_mismatch_reports_value_is_not_default() { + let err = __golem_tool_descriptor_for_ValueIsWrongLiteralType(&mut ToolBuildCtx::new()) + .expect_err("bad value_is literal should be rejected during descriptor build"); + + assert!( + matches!(err, ToolBuildError::ValueIsTypeMismatch(ref name) if name == "count"), + "expected ValueIsTypeMismatch for `count`, got {err:?}", + ); + } + + #[tool_definition] + trait ValueIsMapPositional { + #[arg(config = "positional")] + #[constraint(requires_all = value_is("config", 1))] + fn run(&self, config: BTreeMap) -> Result<(), RemoteError>; + } + + #[test] + fn value_is_map_positional_uses_map_value_type_consistently() { + let tool = __golem_tool_descriptor_for_ValueIsMapPositional(&mut ToolBuildCtx::new()) + .expect( + "descriptor build resolves the map value_is literal against the map value type", + ); + + tool.try_to_tool().expect( + "runtime validation should use the same map value comparand as descriptor build", + ); + } + + #[derive(Clone)] + struct FixedPair; + + impl golem_rust::schema::IntoSchema for FixedPair { + fn type_id() -> golem_rust::schema::TypeId { + golem_rust::schema::TypeId::new("tool_test.FixedPair") + } + + fn register_in( + _builder: &mut golem_rust::schema::SchemaBuilder, + ) -> golem_rust::schema::SchemaType { + golem_rust::schema::SchemaType::fixed_list(golem_rust::schema::SchemaType::u32(), 2) + } + + fn to_value(&self) -> golem_rust::schema::SchemaValue { + golem_rust::schema::SchemaValue::FixedList { + elements: vec![ + golem_rust::schema::SchemaValue::U32(1), + golem_rust::schema::SchemaValue::U32(2), + ], + } + } + } + + impl golem_rust::schema::FromSchema for FixedPair { + fn from_value( + value: &golem_rust::schema::SchemaValue, + ) -> Result { + match value { + golem_rust::schema::SchemaValue::FixedList { elements } + | golem_rust::schema::SchemaValue::List { elements } + if elements.len() == 2 => + { + Ok(FixedPair) + } + _ => Err(golem_rust::schema::FromSchemaError::custom( + "expected a two-element fixed list", + )), + } + } + } + + #[tool_definition] + trait ValueIsFixedListWholeValue { + #[arg(pair = "positional")] + #[constraint(requires_all = value_is("pair", [1, 2]))] + fn run(&self, pair: FixedPair) -> Result<(), RemoteError>; + } + + #[test] + fn value_is_accepts_whole_fixed_list_literal() { + let tool = __golem_tool_descriptor_for_ValueIsFixedListWholeValue(&mut ToolBuildCtx::new()) + .expect("a value_is literal compatible with the whole fixed-list type should build"); + + tool.try_to_tool() + .expect("runtime validation should also accept the whole fixed-list value"); + } + + #[tool_definition] + trait ValueIsMapPositionalWithListValue { + #[arg(config = "positional")] + #[constraint(requires_all = value_is("config", 1))] + fn run(&self, config: BTreeMap>) -> Result<(), RemoteError>; + } + + #[test] + fn value_is_map_positional_does_not_accept_nested_list_element_literal() { + let result = + __golem_tool_descriptor_for_ValueIsMapPositionalWithListValue(&mut ToolBuildCtx::new()); + + match result { + Err(ToolBuildError::ValueIsTypeMismatch(name)) if name == "config" => {} + Err(other) => panic!( + "expected ValueIsTypeMismatch for nested map-value element literal, got {other:?}" + ), + Ok(tool) => { + let validation = tool.try_to_tool(); + panic!( + "descriptor accepted a value_is literal nested inside a list-valued map entry; runtime validation returned {validation:?}" + ); + } + } + } + + #[tool_definition] + trait ValueIsNestedListOption { + #[arg(items = "option")] + #[constraint(requires_all = value_is("items", 1))] + fn run(&self, items: Vec>) -> Result<(), RemoteError>; + } + + #[tool_definition] + trait ValueIsMapOptionWithListValue { + #[arg(config = "option")] + #[constraint(requires_all = value_is("config", 1))] + fn run(&self, config: BTreeMap>) -> Result<(), RemoteError>; + } + + #[tool_definition] + trait ValueIsNestedListTail { + #[arg(items = "tail")] + #[constraint(requires_all = value_is("items", 1))] + fn run(&self, items: Vec>) -> Result<(), RemoteError>; + } + + #[tool_definition] + trait DeferredNestedListValueIsChild { + #[constraint(requires_all = value_is("items", 1))] + fn leaf(&self, name: String) -> Result<(), RemoteError>; + } + + struct DeferredNestedListSubtree; + + #[tool_definition] + trait DeferredNestedListValueIsParent { + #[arg(items = "option")] + #[command(subtree = DeferredNestedListValueIsChild)] + fn deferred_nested_list_value_is_child( + &self, + items: Vec>, + ) -> DeferredNestedListSubtree; + } + + #[test] + fn value_is_repeatable_surfaces_do_not_accept_nested_element_literals() { + let failures = [ + value_is_mismatch_failure( + __golem_tool_descriptor_for_ValueIsNestedListOption(&mut ToolBuildCtx::new()), + "items", + "Vec> repeatable option", + ), + value_is_mismatch_failure( + __golem_tool_descriptor_for_ValueIsMapOptionWithListValue(&mut ToolBuildCtx::new()), + "config", + "BTreeMap> repeatable-map option", + ), + value_is_mismatch_failure( + __golem_tool_descriptor_for_ValueIsNestedListTail(&mut ToolBuildCtx::new()), + "items", + "Vec> tail positional", + ), + value_is_mismatch_failure( + __golem_tool_descriptor_for_DeferredNestedListValueIsParent( + &mut ToolBuildCtx::new(), + ), + "items", + "deferred parent-supplied Vec> global option", + ), + ] + .into_iter() + .flatten() + .collect::>(); + + assert!( + failures.is_empty(), + "nested collection value_is literals should be rejected at descriptor build:\n{}", + failures.join("\n") + ); + } + + #[tool_definition] + trait ValueIsRepeatableListWholeCollection { + #[arg(tags = "option")] + #[constraint(requires_all = value_is("tags", ["prod"]))] + fn run(&self, tags: Vec) -> Result<(), RemoteError>; + } + + #[tool_definition] + trait ValueIsRepeatableMapWholeCollection { + #[arg(config = "option")] + #[constraint(requires_all = value_is("config", [("env", 1)]))] + fn run(&self, config: BTreeMap) -> Result<(), RemoteError>; + } + + #[tool_definition] + trait ValueIsTailWholeCollection { + #[arg(items = "tail")] + #[constraint(requires_all = value_is("items", ["prod"]))] + fn run(&self, items: Vec) -> Result<(), RemoteError>; + } + + #[test] + fn value_is_repeatable_and_tail_refs_reject_whole_collection_literals() { + let failures = [ + value_is_mismatch_failure( + __golem_tool_descriptor_for_ValueIsRepeatableListWholeCollection( + &mut ToolBuildCtx::new(), + ), + "tags", + "Vec repeatable option with a whole-list literal", + ), + value_is_mismatch_failure( + __golem_tool_descriptor_for_ValueIsRepeatableMapWholeCollection( + &mut ToolBuildCtx::new(), + ), + "config", + "BTreeMap repeatable-map option with a whole-map literal", + ), + value_is_mismatch_failure( + __golem_tool_descriptor_for_ValueIsTailWholeCollection(&mut ToolBuildCtx::new()), + "items", + "Vec tail positional with a whole-list literal", + ), + ] + .into_iter() + .flatten() + .collect::>(); + + assert!( + failures.is_empty(), + "value_is refs for repeatable options and tail positionals must compare one occurrence/item/value, not the whole collected container:\n{}", + failures.join("\n") + ); + } + + fn value_is_mismatch_failure( + result: Result, + name: &str, + context: &str, + ) -> Option { + match result { + Err(ToolBuildError::ValueIsTypeMismatch(actual)) if actual == name => None, + Err(other) => Some(format!( + "expected ValueIsTypeMismatch for `{name}` in {context}, got {other:?}" + )), + Ok(tool) => { + let validation = tool.try_to_tool(); + Some(format!( + "descriptor accepted scalar value_is for a nested collection occurrence in {context}; runtime validation returned {validation:?}" + )) + } + } + } + + type StringAliasForNumericRefinement = String; + + #[tool_definition] + trait NumericRefinementOnStringAlias { + #[arg(name = "option", unit = "ms")] + fn run(&self, name: StringAliasForNumericRefinement) -> Result<(), RemoteError>; + } + + #[test] + fn numeric_refinement_on_string_type_alias_is_rejected() { + let result = + __golem_tool_descriptor_for_NumericRefinementOnStringAlias(&mut ToolBuildCtx::new()); + + assert!( + result.is_err(), + "numeric refinements on a non-numeric type alias must be rejected instead of being silently dropped; descriptor was {result:#?}", + ); + } + + type StringAliasForTextRefinement = String; + + #[tool_definition] + trait TextRefinementOnStringAlias { + #[arg(name = "option", regex = "a+")] + fn run(&self, name: StringAliasForTextRefinement) -> Result<(), RemoteError>; + } + + #[test] + fn text_refinement_on_string_type_alias_is_applied() { + // A type alias is macro-opaque, so the macro cannot classify it; the + // runtime refinement sees the real `String` schema and legitimately + // promotes it to `Text`. This guards the common alias case against the + // fallible-refinement change. + let tool = + __golem_tool_descriptor_for_TextRefinementOnStringAlias(&mut ToolBuildCtx::new()) + .expect("text refinement on a string alias builds"); + let run = tool + .commands + .iter() + .find(|c| c.name == "run") + .expect("run command"); + let option = run + .body + .as_ref() + .and_then(|body| body.options.first()) + .expect("option"); + let graph = match &option.shape { + golem_rust::agentic::ExtendedOptionShape::Scalar(g) => g, + other => panic!("expected a scalar option shape, got {other:#?}"), + }; + assert!( + matches!(graph.root, golem_rust::schema::SchemaType::Text { .. }), + "a regex-refined string alias should resolve to a Text schema, got {:#?}", + graph.root + ); + } + + type StringAliasForUrlRefinement = String; + + #[tool_definition] + trait UrlRefinementOnStringAlias { + #[arg(name = "option", schemes = ["https"])] + fn run(&self, name: StringAliasForUrlRefinement) -> Result<(), RemoteError>; + } + + #[test] + fn url_refinement_on_string_type_alias_is_rejected() { + // A url refinement on a non-url schema must error rather than silently + // rewriting the String into a Url (the symmetric silent-rewrite case). + let result = + __golem_tool_descriptor_for_UrlRefinementOnStringAlias(&mut ToolBuildCtx::new()); + + assert!( + result.is_err(), + "url refinements on a string alias must be rejected instead of silently rewriting the schema; descriptor was {result:#?}", + ); + } + + #[tool_definition] + trait ValueIsRegexRestrictionMismatch { + #[arg(format = "option", regex = "^(json|yaml)$")] + #[constraint(requires_all = value_is("format", "toml"))] + fn run(&self, format: String) -> Result<(), RemoteError>; + } + + #[test] + fn value_is_regex_restriction_mismatch_is_rejected_during_descriptor_build() { + match __golem_tool_descriptor_for_ValueIsRegexRestrictionMismatch(&mut ToolBuildCtx::new()) + { + Err(ToolBuildError::ValueIsTypeMismatch(name)) if name == "format" => {} + Err(other) => panic!("expected ValueIsTypeMismatch for `format`, got {other:?}"), + Ok(tool) => panic!( + "descriptor accepted a value_is literal that violates the referenced regex restriction; try_to_tool returned {:?}", + tool.try_to_tool() + ), + } + } + + #[tool_definition] + trait ValueIsRefinedRepeatableListOption { + #[arg(tags = "option", regex = "^prod$")] + #[constraint(requires_all = value_is("tags", "prod"))] + fn run(&self, tags: Vec) -> Result<(), RemoteError>; + } + + #[test] + fn value_is_on_refined_repeatable_list_option_builds() { + let tool = __golem_tool_descriptor_for_ValueIsRefinedRepeatableListOption( + &mut ToolBuildCtx::new(), + ) + .expect( + "value_is on a refined repeatable-list option should interpret the literal against the refined item type", + ); + + tool.try_to_tool().expect( + "runtime validation should accept the same refined repeatable-list value_is literal", + ); + } + + fn cargo_check_tool_crate(name: &str, source: &str) -> std::process::Output { + let root = std::env::temp_dir().join(format!( + "golem-rust-tool-{name}-{}-{}", + std::process::id(), + std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .expect("system clock should be after UNIX_EPOCH") + .as_nanos() + )); + fs::create_dir_all(root.join("src")).unwrap(); + + let golem_rust_path = Path::new(env!("CARGO_MANIFEST_DIR")); + fs::write( + root.join("Cargo.toml"), + format!( + r#" +[package] +name = "{name}" +version = "0.0.0" +edition = "2024" + +[dependencies] +golem-rust = {{ path = {}, features = ["export_golem_agentic"] }} +"#, + toml_string(golem_rust_path) + ), + ) + .unwrap(); + fs::write(root.join("src/lib.rs"), source).unwrap(); + + let target_dir = golem_rust_path + .parent() + .expect("golem-rust crate should have an SDK workspace parent") + .join("target"); + let output = Command::new("cargo") + .arg("check") + .arg("--quiet") + .env("CARGO_TARGET_DIR", target_dir) + .current_dir(&root) + .output() + .expect("failed to run cargo check for temporary tool crate"); + + fs::remove_dir_all(&root).unwrap_or_else(|error| { + panic!( + "failed to remove temporary workspace {}: {error}", + root.display() + ) + }); + output + } + + fn toml_string(path: &Path) -> String { + format!("{:?}", path.display().to_string()) + } +} From a574e32a45f0cbc229e98a4c2957d235cc6a6f6e Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Sat, 27 Jun 2026 19:50:34 +0200 Subject: [PATCH 04/11] SDK updates --- .../golem_sdk/agents/agent_type_test.mbt | 7 +- .../gen/interface/golem/agent/guest/ffi.mbt | 2492 +- .../interface/golem/api/saveSnapshot/ffi.mbt | 28 +- .../gen/interface/golem/tool/guest/ffi.mbt | 3760 +- .../interface/golem/agent/host/top.mbt | 32814 +++++++----- .../interface/golem/api/oplog/top.mbt | 44316 ++++++++++++---- .../interface/golem/core/types/top.mbt | 38 +- .../golem/durability/durability/top.mbt | 8188 ++- .../interface/golem/tool/common/README.md | 14 +- .../interface/golem/tool/common/top.mbt | 35 +- .../interface/golem/tool/host/top.mbt | 29432 ++++++---- sdks/moonbit/golem_sdk/schema/primitives.mbt | 14 +- sdks/moonbit/golem_sdk/schema_model/model.mbt | 20 +- .../golem_sdk/schema_model/pkg.generated.mbti | 20 +- .../golem_sdk/schema_model/roundtrip_test.mbt | 136 +- .../golem_sdk/schema_model/validation.mbt | 20 +- .../schema_model/validation_test.mbt | 8 +- sdks/moonbit/golem_sdk/schema_model/wit.mbt | 83 +- sdks/rust/golem-rust/Cargo.toml | 4 + sdks/rust/golem-rust/tests/tool_canonical.rs | 1137 + .../ui/fail/tool_bad_arg_unknown_param.rs | 11 + .../ui/fail/tool_bad_arg_unknown_param.stderr | 5 + .../ui/fail/tool_body_name_divergence.rs | 12 + .../ui/fail/tool_body_name_divergence.stderr | 5 + .../ui/fail/tool_subtree_invalid_shape.rs | 14 + .../ui/fail/tool_subtree_invalid_shape.stderr | 5 + .../scala/golem/host/SchemaWireInterop.scala | 72 +- .../golem/host/js/schema/SchemaTypes.scala | 62 +- .../scala/golem/runtime/guest/Guest.scala | 2 +- .../scala/golem/SchemaVerificationSpec.scala | 20 +- .../golem/host/SchemaWireInteropSpec.scala | 40 +- .../macros/AgentMetadataMacroSpec.scala | 2 +- .../main/scala/golem/schema/Derivation.scala | 8 +- .../main/scala/golem/schema/SchemaType.scala | 64 +- .../src/main/scala/golem/schema/Specs.scala | 33 + .../main/scala/golem/schema/wire/Wire.scala | 26 +- .../scala/golem/schema/wire/WireCodec.scala | 45 +- .../golem/schema/SchemaDerivationSpec.scala | 20 +- .../scala/golem/schema/SchemaModelSpec.scala | 68 + .../scala/wit/dts/golem_core_2_0_0_types.d.ts | 40 + .../wit/dts/golem_tool_0_1_0_common.d.ts | 61 +- .../src/internal/schema-model/model.ts | 50 +- .../src/internal/schema-model/wit.ts | 90 +- .../tests/schema-model/edge-cases.test.ts | 2 +- .../schema-model/numericRestrictions.test.ts | 149 + .../types/golem_core_2_0_0_types.d.ts | 40 + .../types/golem_tool_0_1_0_common.d.ts | 61 +- 47 files changed, 84876 insertions(+), 38697 deletions(-) create mode 100644 sdks/rust/golem-rust/tests/tool_canonical.rs create mode 100644 sdks/rust/golem-rust/tests/ui/fail/tool_bad_arg_unknown_param.rs create mode 100644 sdks/rust/golem-rust/tests/ui/fail/tool_bad_arg_unknown_param.stderr create mode 100644 sdks/rust/golem-rust/tests/ui/fail/tool_body_name_divergence.rs create mode 100644 sdks/rust/golem-rust/tests/ui/fail/tool_body_name_divergence.stderr create mode 100644 sdks/rust/golem-rust/tests/ui/fail/tool_subtree_invalid_shape.rs create mode 100644 sdks/rust/golem-rust/tests/ui/fail/tool_subtree_invalid_shape.stderr create mode 100644 sdks/ts/packages/golem-ts-sdk/tests/schema-model/numericRestrictions.test.ts diff --git a/sdks/moonbit/golem_sdk/agents/agent_type_test.mbt b/sdks/moonbit/golem_sdk/agents/agent_type_test.mbt index 00dca87dd5..b30d592085 100644 --- a/sdks/moonbit/golem_sdk/agents/agent_type_test.mbt +++ b/sdks/moonbit/golem_sdk/agents/agent_type_test.mbt @@ -16,7 +16,10 @@ fn foo_graph() -> @model.SchemaGraph raise { () => { @model.schema_type( @model.SchemaTypeBody::Record([ - @model.field("a", @model.schema_type(@model.SchemaTypeBody::S32)), + @model.field( + "a", + @model.schema_type(@model.SchemaTypeBody::S32(None)), + ), ]), ) }, @@ -28,7 +31,7 @@ fn foo_graph() -> @model.SchemaGraph raise { ///| /// A primitive s32 graph (no named defs). fn s32_graph() -> @model.SchemaGraph { - { defs: [], root: @model.schema_type(@model.SchemaTypeBody::S32) } + { defs: [], root: @model.schema_type(@model.SchemaTypeBody::S32(None)) } } ///| diff --git a/sdks/moonbit/golem_sdk/gen/interface/golem/agent/guest/ffi.mbt b/sdks/moonbit/golem_sdk/gen/interface/golem/agent/guest/ffi.mbt index bf079c6bf5..13a096fbe7 100644 --- a/sdks/moonbit/golem_sdk/gen/interface/golem/agent/guest/ffi.mbt +++ b/sdks/moonbit/golem_sdk/gen/interface/golem/agent/guest/ffi.mbt @@ -398,7 +398,7 @@ pub fn wasmExportInitialize(p0 : Int) -> Int { } Err(payload48) => { mbt_ffi_store8((return_area) + 0, (1)) - __wit_bindgen_lower_t416((return_area) + 4, payload48) + __wit_bindgen_lower_t420((return_area) + 4, payload48) () } @@ -440,16 +440,206 @@ pub fn wasmExportInitializePostReturn(p0 : Int) -> Unit { match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () + 2 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 3 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 10 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 11 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } 12 => () 13 => () 14 => { @@ -1457,7 +1647,7 @@ pub fn wasmExportInvokeGolemAgentGuest(p0 : Int) -> Int { } Some(payload49) => { mbt_ffi_store8((return_area) + 4, (1)) - __wit_bindgen_lower_t68((return_area) + 8, payload49) + __wit_bindgen_lower_t72((return_area) + 8, payload49) () } @@ -1467,7 +1657,7 @@ pub fn wasmExportInvokeGolemAgentGuest(p0 : Int) -> Int { } Err(payload50) => { mbt_ffi_store8((return_area) + 0, (1)) - __wit_bindgen_lower_t416((return_area) + 4, payload50) + __wit_bindgen_lower_t420((return_area) + 4, payload50) () } @@ -1622,66 +1812,256 @@ pub fn wasmExportInvokeGolemAgentGuestPostReturn(p0 : Int) -> Unit { match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () - 12 => () - 13 => () - 14 => { + 2 => { - for index2 = 0; index2 < (mbt_ffi_load32((iter_base) + 12)); index2 = index2 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2 * 68) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { - match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => () - 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + } + _ => panic() } - _ => panic() - } - - for index0 = 0; index0 < (mbt_ffi_load32((iter_base) + 28)); index0 = index0 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index0 * 8) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + _ => panic() + } - for index1 = 0; index1 < (mbt_ffi_load32((iter_base) + 36)); index1 = index1 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1 * 8) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + } + 3 => { - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { - match (mbt_ffi_load8_u((iter_base) + 40)) { - 0 => () - 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + } + _ => panic() } - _ => panic() - } - match (mbt_ffi_load8_u((iter_base) + 52)) { - 0 => () - 1 => { + } + _ => panic() + } - match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => () - 1 => () - 2 => () - 3 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 10 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 11 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 12 => () + 13 => () + 14 => { + + for index2 = 0; index2 < (mbt_ffi_load32((iter_base) + 12)); index2 = index2 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2 * 68) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + } + _ => panic() + } + + for index0 = 0; index0 < (mbt_ffi_load32((iter_base) + 28)); index0 = index0 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index0 * 8) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + for index1 = 0; index1 < (mbt_ffi_load32((iter_base) + 36)); index1 = index1 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1 * 8) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + match (mbt_ffi_load8_u((iter_base) + 40)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) + + } + _ => panic() + } + + match (mbt_ffi_load8_u((iter_base) + 52)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => () + 1 => () + 2 => () + 3 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) } _ => panic() @@ -2198,78 +2578,268 @@ pub fn wasmExportInvokeGolemAgentGuestPostReturn(p0 : Int) -> Unit { } } - 25 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + 25 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + } + 26 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + } + 27 => () + 28 => () + 29 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) + + } + 30 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + } + 31 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + } + 32 => () + _ => panic() + } + + } + mbt_ffi_free(mbt_ffi_load32((p0) + 28)) + + } + _ => panic() + } + + } + _ => panic() + } + +} + +#doc(hidden) +pub fn wasmExportGetDefinition() -> Int { + + let (result) : (@common.AgentType) = get_definition(); + let return_area = mbt_ffi_malloc(176) + __wit_bindgen_lower_t417((return_area) + 0, result) + let ret = return_area + return ret + +} + +#doc(hidden) +pub fn wasmExportGetDefinitionPostReturn(p0 : Int) -> Unit { + mbt_ffi_free(mbt_ffi_load32((p0) + 0)) + mbt_ffi_free(mbt_ffi_load32((p0) + 8)) + mbt_ffi_free(mbt_ffi_load32((p0) + 16)) + + for index19 = 0; index19 < (mbt_ffi_load32((p0) + 28)); index19 = index19 + 1 { + let iter_base = (mbt_ffi_load32((p0) + 24)) + (index19 * 144) + + match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => () + 1 => () + 2 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 3 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } - } - 26 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + } + _ => panic() + } - } - 27 => () - 28 => () - 29 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) + } + 10 => { - } - 30 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { - } - 31 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) } - 32 => () _ => panic() } } - mbt_ffi_free(mbt_ffi_load32((p0) + 28)) - + _ => panic() } - _ => panic() - } - - } - _ => panic() - } -} - -#doc(hidden) -pub fn wasmExportGetDefinition() -> Int { + } + 11 => { - let (result) : (@common.AgentType) = get_definition(); - let return_area = mbt_ffi_malloc(176) - __wit_bindgen_lower_t413((return_area) + 0, result) - let ret = return_area - return ret + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { -} + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) -#doc(hidden) -pub fn wasmExportGetDefinitionPostReturn(p0 : Int) -> Unit { - mbt_ffi_free(mbt_ffi_load32((p0) + 0)) - mbt_ffi_free(mbt_ffi_load32((p0) + 8)) - mbt_ffi_free(mbt_ffi_load32((p0) + 16)) + } + _ => panic() + } - for index19 = 0; index19 < (mbt_ffi_load32((p0) + 28)); index19 = index19 + 1 { - let iter_base = (mbt_ffi_load32((p0) + 24)) + (index19 * 144) + } + _ => panic() + } - match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => () - 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () + } 12 => () 13 => () 14 => { @@ -2962,22 +3532,230 @@ pub fn wasmExportGetDefinitionPostReturn(p0 : Int) -> Unit { match (mbt_ffi_load8_u((iter_base) + 44)) { 0 => () 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + + } + _ => panic() + } + + match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => () + 1 => () + 2 => () + 3 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) + + } + _ => panic() + } + + } + mbt_ffi_free(mbt_ffi_load32((p0) + 88)) + + for index67 = 0; index67 < (mbt_ffi_load32((p0) + 100)); index67 = index67 + 1 { + let iter_base = (mbt_ffi_load32((p0) + 96)) + (index67 * 92) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + } + _ => panic() + } + + for index53 = 0; index53 < (mbt_ffi_load32((iter_base) + 24)); index53 = index53 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index53 * 144) + + match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => () + 1 => () + 2 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 3 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } } _ => panic() } - match (mbt_ffi_load8_u((iter_base) + 56)) { + } + 10 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => () 1 => { - match (mbt_ffi_load8_u((iter_base) + 60)) { + match (mbt_ffi_load8_u((iter_base) + 64)) { 0 => () - 1 => () - 2 => () - 3 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) } _ => panic() @@ -2988,44 +3766,26 @@ pub fn wasmExportGetDefinitionPostReturn(p0 : Int) -> Unit { } } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - - } - _ => panic() - } - - } - mbt_ffi_free(mbt_ffi_load32((p0) + 88)) + 11 => { - for index67 = 0; index67 < (mbt_ffi_load32((p0) + 100)); index67 = index67 + 1 { - let iter_base = (mbt_ffi_load32((p0) + 96)) + (index67 * 92) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { - match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => () - 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - } - _ => panic() - } + } + _ => panic() + } - for index53 = 0; index53 < (mbt_ffi_load32((iter_base) + 24)); index53 = index53 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index53 * 144) + } + _ => panic() + } - match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => () - 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () + } 12 => () 13 => () 14 => { @@ -3832,68 +4592,258 @@ pub fn wasmExportGetDefinitionPostReturn(p0 : Int) -> Unit { } -#doc(hidden) -pub fn wasmExportDiscoverAgentTypes() -> Int { +#doc(hidden) +pub fn wasmExportDiscoverAgentTypes() -> Int { + + let (result) : (Result[Array[@common.AgentType], @common.AgentError]) = discover_agent_types(); + let return_area = mbt_ffi_malloc(40) + + match result { + Ok(payload) => { + mbt_ffi_store8((return_area) + 0, (0)) + + let address = mbt_ffi_malloc((payload).length() * 176); + for index = 0; index < (payload).length(); index = index + 1 { + let iter_elem : @common.AgentType = (payload)[(index)] + let iter_base = address + (index * 176); + __wit_bindgen_lower_t417((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((return_area) + 8, (payload).length()) + mbt_ffi_store32((return_area) + 4, address) + + () + } + Err(payload0) => { + mbt_ffi_store8((return_area) + 0, (1)) + __wit_bindgen_lower_t420((return_area) + 4, payload0) + + () + } + } + let ret = return_area + return ret + +} + +#doc(hidden) +pub fn wasmExportDiscoverAgentTypesPostReturn(p0 : Int) -> Unit { + + match (mbt_ffi_load8_u((p0) + 0)) { + 0 => { + + for index73 = 0; index73 < (mbt_ffi_load32((p0) + 8)); index73 = index73 + 1 { + let iter_base = (mbt_ffi_load32((p0) + 4)) + (index73 * 176) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + for index19 = 0; index19 < (mbt_ffi_load32((iter_base) + 28)); index19 = index19 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index19 * 144) + + match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => () + 1 => () + 2 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 3 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } - let (result) : (Result[Array[@common.AgentType], @common.AgentError]) = discover_agent_types(); - let return_area = mbt_ffi_malloc(40) + } + _ => panic() + } - match result { - Ok(payload) => { - mbt_ffi_store8((return_area) + 0, (0)) + } + 10 => { - let address = mbt_ffi_malloc((payload).length() * 176); - for index = 0; index < (payload).length(); index = index + 1 { - let iter_elem : @common.AgentType = (payload)[(index)] - let iter_base = address + (index * 176); - __wit_bindgen_lower_t413((iter_base) + 0, iter_elem) + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { - } - mbt_ffi_store32((return_area) + 8, (payload).length()) - mbt_ffi_store32((return_area) + 4, address) + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - () - } - Err(payload0) => { - mbt_ffi_store8((return_area) + 0, (1)) - __wit_bindgen_lower_t416((return_area) + 4, payload0) + } + _ => panic() + } - () - } - } - let ret = return_area - return ret + } + _ => panic() + } -} + } + 11 => { -#doc(hidden) -pub fn wasmExportDiscoverAgentTypesPostReturn(p0 : Int) -> Unit { + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { - match (mbt_ffi_load8_u((p0) + 0)) { - 0 => { + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - for index73 = 0; index73 < (mbt_ffi_load32((p0) + 8)); index73 = index73 + 1 { - let iter_base = (mbt_ffi_load32((p0) + 4)) + (index73 * 176) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - for index19 = 0; index19 < (mbt_ffi_load32((iter_base) + 28)); index19 = index19 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index19 * 144) + } + _ => panic() + } - match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => () - 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () + } 12 => () 13 => () 14 => { @@ -4640,16 +5590,206 @@ pub fn wasmExportDiscoverAgentTypesPostReturn(p0 : Int) -> Unit { match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () + 2 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 3 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 10 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 11 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } 12 => () 13 => () 14 => { @@ -5485,16 +6625,206 @@ pub fn wasmExportDiscoverAgentTypesPostReturn(p0 : Int) -> Unit { match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () + 2 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 3 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 10 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 11 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } 12 => () 13 => () 14 => { @@ -6276,28 +7606,87 @@ fn __wit_bindgen_lower_t22(ptr : Int, value : @types.VariantCaseType) -> Unit { () } } - __wit_bindgen_lower_t19((ptr) + 16, (value).metadata) - -} - -#doc(hidden) -fn __wit_bindgen_lower_t23(ptr : Int, value : @types.FixedListSpec) -> Unit { - mbt_ffi_store32((ptr) + 0, (value).element) - mbt_ffi_store32((ptr) + 4, ((value).length).reinterpret_as_int()) - -} - -#doc(hidden) -fn __wit_bindgen_lower_t24(ptr : Int, value : @types.MapSpec) -> Unit { - mbt_ffi_store32((ptr) + 0, (value).key) - mbt_ffi_store32((ptr) + 4, (value).value) + __wit_bindgen_lower_t19((ptr) + 16, (value).metadata) + +} + +#doc(hidden) +fn __wit_bindgen_lower_t23(ptr : Int, value : @types.FixedListSpec) -> Unit { + mbt_ffi_store32((ptr) + 0, (value).element) + mbt_ffi_store32((ptr) + 4, ((value).length).reinterpret_as_int()) + +} + +#doc(hidden) +fn __wit_bindgen_lower_t24(ptr : Int, value : @types.MapSpec) -> Unit { + mbt_ffi_store32((ptr) + 0, (value).key) + mbt_ffi_store32((ptr) + 4, (value).value) + +} + +#doc(hidden) +fn __wit_bindgen_lower_t25(ptr : Int, value : @types.ResultSpec) -> Unit { + + match ((value).ok) { + None => { + mbt_ffi_store8((ptr) + 0, (0)) + + () + } + Some(payload0) => { + mbt_ffi_store8((ptr) + 0, (1)) + mbt_ffi_store32((ptr) + 4, payload0) + + () + } + } + + match ((value).err) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload2) => { + mbt_ffi_store8((ptr) + 8, (1)) + mbt_ffi_store32((ptr) + 12, payload2) + + () + } + } + +} + +#doc(hidden) +fn __wit_bindgen_lower_t26(ptr : Int, value : @types.NumericBound) -> Unit { + + match value { + Signed(payload) => { + mbt_ffi_store8((ptr) + 0, (0)) + mbt_ffi_store64((ptr) + 8, payload) + + () + } + Unsigned(payload0) => { + mbt_ffi_store8((ptr) + 0, (1)) + mbt_ffi_store64((ptr) + 8, (payload0).reinterpret_as_int64()) + + () + } + FloatBits(payload1) => { + mbt_ffi_store8((ptr) + 0, (2)) + mbt_ffi_store64((ptr) + 8, (payload1).reinterpret_as_int64()) + + () + } + } } #doc(hidden) -fn __wit_bindgen_lower_t25(ptr : Int, value : @types.ResultSpec) -> Unit { +fn __wit_bindgen_lower_t28(ptr : Int, value : @types.NumericRestrictions) -> Unit { - match ((value).ok) { + match ((value).min) { None => { mbt_ffi_store8((ptr) + 0, (0)) @@ -6305,21 +7694,38 @@ fn __wit_bindgen_lower_t25(ptr : Int, value : @types.ResultSpec) -> Unit { } Some(payload0) => { mbt_ffi_store8((ptr) + 0, (1)) - mbt_ffi_store32((ptr) + 4, payload0) + __wit_bindgen_lower_t26((ptr) + 8, payload0) () } } - match ((value).err) { + match ((value).max) { None => { - mbt_ffi_store8((ptr) + 8, (0)) + mbt_ffi_store8((ptr) + 24, (0)) () } Some(payload2) => { - mbt_ffi_store8((ptr) + 8, (1)) - mbt_ffi_store32((ptr) + 12, payload2) + mbt_ffi_store8((ptr) + 24, (1)) + __wit_bindgen_lower_t26((ptr) + 32, payload2) + + () + } + } + + match ((value).unit) { + None => { + mbt_ffi_store8((ptr) + 48, (0)) + + () + } + Some(payload4) => { + mbt_ffi_store8((ptr) + 48, (1)) + + let ptr5 = mbt_ffi_str2ptr(payload4) + mbt_ffi_store32((ptr) + 56, payload4.length()) + mbt_ffi_store32((ptr) + 52, ptr5) () } @@ -6328,7 +7734,7 @@ fn __wit_bindgen_lower_t25(ptr : Int, value : @types.ResultSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t28(ptr : Int, value : @types.TextRestrictions) -> Unit { +fn __wit_bindgen_lower_t31(ptr : Int, value : @types.TextRestrictions) -> Unit { match ((value).languages) { None => { @@ -6404,7 +7810,7 @@ fn __wit_bindgen_lower_t28(ptr : Int, value : @types.TextRestrictions) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t29(ptr : Int, value : @types.BinaryRestrictions) -> Unit { +fn __wit_bindgen_lower_t32(ptr : Int, value : @types.BinaryRestrictions) -> Unit { match ((value).mime_types) { None => { @@ -6463,7 +7869,7 @@ fn __wit_bindgen_lower_t29(ptr : Int, value : @types.BinaryRestrictions) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t32(ptr : Int, value : @types.PathSpec) -> Unit { +fn __wit_bindgen_lower_t35(ptr : Int, value : @types.PathSpec) -> Unit { mbt_ffi_store8((ptr) + 0, (value).direction.ordinal()) mbt_ffi_store8((ptr) + 1, (value).kind.ordinal()) @@ -6522,7 +7928,7 @@ fn __wit_bindgen_lower_t32(ptr : Int, value : @types.PathSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t33(ptr : Int, value : @types.UrlRestrictions) -> Unit { +fn __wit_bindgen_lower_t36(ptr : Int, value : @types.UrlRestrictions) -> Unit { match ((value).allowed_schemes) { None => { @@ -6579,7 +7985,7 @@ fn __wit_bindgen_lower_t33(ptr : Int, value : @types.UrlRestrictions) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t34(ptr : Int, value : @types.QuantityValue) -> Unit { +fn __wit_bindgen_lower_t37(ptr : Int, value : @types.QuantityValue) -> Unit { mbt_ffi_store64((ptr) + 0, (value).mantissa) mbt_ffi_store32((ptr) + 8, (value).scale) @@ -6590,7 +7996,7 @@ fn __wit_bindgen_lower_t34(ptr : Int, value : @types.QuantityValue) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t36(ptr : Int, value : @types.QuantitySpec) -> Unit { +fn __wit_bindgen_lower_t39(ptr : Int, value : @types.QuantitySpec) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).base_unit) mbt_ffi_store32((ptr) + 4, (value).base_unit.length()) @@ -6617,7 +8023,7 @@ fn __wit_bindgen_lower_t36(ptr : Int, value : @types.QuantitySpec) -> Unit { } Some(payload2) => { mbt_ffi_store8((ptr) + 16, (1)) - __wit_bindgen_lower_t34((ptr) + 24, payload2) + __wit_bindgen_lower_t37((ptr) + 24, payload2) () } @@ -6631,7 +8037,7 @@ fn __wit_bindgen_lower_t36(ptr : Int, value : @types.QuantitySpec) -> Unit { } Some(payload4) => { mbt_ffi_store8((ptr) + 48, (1)) - __wit_bindgen_lower_t34((ptr) + 56, payload4) + __wit_bindgen_lower_t37((ptr) + 56, payload4) () } @@ -6640,7 +8046,7 @@ fn __wit_bindgen_lower_t36(ptr : Int, value : @types.QuantitySpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t37(ptr : Int, value : @types.FieldDiscriminator) -> Unit { +fn __wit_bindgen_lower_t40(ptr : Int, value : @types.FieldDiscriminator) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).field_name) mbt_ffi_store32((ptr) + 4, (value).field_name.length()) @@ -6666,7 +8072,7 @@ fn __wit_bindgen_lower_t37(ptr : Int, value : @types.FieldDiscriminator) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t38(ptr : Int, value : @types.DiscriminatorRule) -> Unit { +fn __wit_bindgen_lower_t41(ptr : Int, value : @types.DiscriminatorRule) -> Unit { match value { Prefix(payload) => { @@ -6707,7 +8113,7 @@ fn __wit_bindgen_lower_t38(ptr : Int, value : @types.DiscriminatorRule) -> Unit } FieldEquals(payload7) => { mbt_ffi_store8((ptr) + 0, (4)) - __wit_bindgen_lower_t37((ptr) + 4, payload7) + __wit_bindgen_lower_t40((ptr) + 4, payload7) () } @@ -6725,25 +8131,25 @@ fn __wit_bindgen_lower_t38(ptr : Int, value : @types.DiscriminatorRule) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t39(ptr : Int, value : @types.UnionBranch) -> Unit { +fn __wit_bindgen_lower_t42(ptr : Int, value : @types.UnionBranch) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).tag) mbt_ffi_store32((ptr) + 4, (value).tag.length()) mbt_ffi_store32((ptr) + 0, ptr0) mbt_ffi_store32((ptr) + 8, (value).body) - __wit_bindgen_lower_t38((ptr) + 12, (value).discriminator) + __wit_bindgen_lower_t41((ptr) + 12, (value).discriminator) __wit_bindgen_lower_t19((ptr) + 36, (value).metadata) } #doc(hidden) -fn __wit_bindgen_lower_t41(ptr : Int, value : @types.UnionSpec) -> Unit { +fn __wit_bindgen_lower_t44(ptr : Int, value : @types.UnionSpec) -> Unit { let address = mbt_ffi_malloc(((value).branches).length() * 92); for index = 0; index < ((value).branches).length(); index = index + 1 { let iter_elem : @types.UnionBranch = ((value).branches)[(index)] let iter_base = address + (index * 92); - __wit_bindgen_lower_t39((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t42((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 4, ((value).branches).length()) @@ -6752,7 +8158,7 @@ fn __wit_bindgen_lower_t41(ptr : Int, value : @types.UnionSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t42(ptr : Int, value : @types.SecretSpec) -> Unit { +fn __wit_bindgen_lower_t45(ptr : Int, value : @types.SecretSpec) -> Unit { match ((value).category) { None => { @@ -6774,7 +8180,7 @@ fn __wit_bindgen_lower_t42(ptr : Int, value : @types.SecretSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t43(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { +fn __wit_bindgen_lower_t46(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { match ((value).resource_name) { None => { @@ -6796,7 +8202,7 @@ fn __wit_bindgen_lower_t43(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { +fn __wit_bindgen_lower_t51(ptr : Int, value : @types.SchemaTypeBody) -> Unit { match value { RefType(payload) => { @@ -6810,54 +8216,194 @@ fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { () } - S8Type => { + S8Type(payload1) => { mbt_ffi_store8((ptr) + 0, (2)) + match (payload1) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload3) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload3) + + () + } + } + () } - S16Type => { + S16Type(payload4) => { mbt_ffi_store8((ptr) + 0, (3)) + match (payload4) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload6) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload6) + + () + } + } + () } - S32Type => { + S32Type(payload7) => { mbt_ffi_store8((ptr) + 0, (4)) + match (payload7) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload9) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload9) + + () + } + } + () } - S64Type => { + S64Type(payload10) => { mbt_ffi_store8((ptr) + 0, (5)) + match (payload10) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload12) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload12) + + () + } + } + () } - U8Type => { + U8Type(payload13) => { mbt_ffi_store8((ptr) + 0, (6)) + match (payload13) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload15) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload15) + + () + } + } + () } - U16Type => { + U16Type(payload16) => { mbt_ffi_store8((ptr) + 0, (7)) + match (payload16) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload18) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload18) + + () + } + } + () } - U32Type => { + U32Type(payload19) => { mbt_ffi_store8((ptr) + 0, (8)) + match (payload19) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload21) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload21) + + () + } + } + () } - U64Type => { + U64Type(payload22) => { mbt_ffi_store8((ptr) + 0, (9)) + match (payload22) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload24) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload24) + + () + } + } + () } - F32Type => { + F32Type(payload25) => { mbt_ffi_store8((ptr) + 0, (10)) + match (payload25) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload27) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload27) + + () + } + } + () } - F64Type => { + F64Type(payload28) => { mbt_ffi_store8((ptr) + 0, (11)) + match (payload28) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload30) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload30) + + () + } + } + () } CharType => { @@ -6870,138 +8416,138 @@ fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { () } - RecordType(payload13) => { + RecordType(payload33) => { mbt_ffi_store8((ptr) + 0, (14)) - let address = mbt_ffi_malloc((payload13).length() * 68); - for index = 0; index < (payload13).length(); index = index + 1 { - let iter_elem : @types.NamedFieldType = (payload13)[(index)] + let address = mbt_ffi_malloc((payload33).length() * 68); + for index = 0; index < (payload33).length(); index = index + 1 { + let iter_elem : @types.NamedFieldType = (payload33)[(index)] let iter_base = address + (index * 68); __wit_bindgen_lower_t20((iter_base) + 0, iter_elem) } - mbt_ffi_store32((ptr) + 12, (payload13).length()) + mbt_ffi_store32((ptr) + 12, (payload33).length()) mbt_ffi_store32((ptr) + 8, address) () } - VariantType(payload14) => { + VariantType(payload34) => { mbt_ffi_store8((ptr) + 0, (15)) - let address15 = mbt_ffi_malloc((payload14).length() * 72); - for index16 = 0; index16 < (payload14).length(); index16 = index16 + 1 { - let iter_elem : @types.VariantCaseType = (payload14)[(index16)] - let iter_base = address15 + (index16 * 72); + let address35 = mbt_ffi_malloc((payload34).length() * 72); + for index36 = 0; index36 < (payload34).length(); index36 = index36 + 1 { + let iter_elem : @types.VariantCaseType = (payload34)[(index36)] + let iter_base = address35 + (index36 * 72); __wit_bindgen_lower_t22((iter_base) + 0, iter_elem) } - mbt_ffi_store32((ptr) + 12, (payload14).length()) - mbt_ffi_store32((ptr) + 8, address15) + mbt_ffi_store32((ptr) + 12, (payload34).length()) + mbt_ffi_store32((ptr) + 8, address35) () } - EnumType(payload17) => { + EnumType(payload37) => { mbt_ffi_store8((ptr) + 0, (16)) - let address19 = mbt_ffi_malloc((payload17).length() * 8); - for index20 = 0; index20 < (payload17).length(); index20 = index20 + 1 { - let iter_elem : String = (payload17)[(index20)] - let iter_base = address19 + (index20 * 8); + let address39 = mbt_ffi_malloc((payload37).length() * 8); + for index40 = 0; index40 < (payload37).length(); index40 = index40 + 1 { + let iter_elem : String = (payload37)[(index40)] + let iter_base = address39 + (index40 * 8); - let ptr18 = mbt_ffi_str2ptr(iter_elem) + let ptr38 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr18) + mbt_ffi_store32((iter_base) + 0, ptr38) } - mbt_ffi_store32((ptr) + 12, (payload17).length()) - mbt_ffi_store32((ptr) + 8, address19) + mbt_ffi_store32((ptr) + 12, (payload37).length()) + mbt_ffi_store32((ptr) + 8, address39) () } - FlagsType(payload21) => { + FlagsType(payload41) => { mbt_ffi_store8((ptr) + 0, (17)) - let address23 = mbt_ffi_malloc((payload21).length() * 8); - for index24 = 0; index24 < (payload21).length(); index24 = index24 + 1 { - let iter_elem : String = (payload21)[(index24)] - let iter_base = address23 + (index24 * 8); + let address43 = mbt_ffi_malloc((payload41).length() * 8); + for index44 = 0; index44 < (payload41).length(); index44 = index44 + 1 { + let iter_elem : String = (payload41)[(index44)] + let iter_base = address43 + (index44 * 8); - let ptr22 = mbt_ffi_str2ptr(iter_elem) + let ptr42 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr22) + mbt_ffi_store32((iter_base) + 0, ptr42) } - mbt_ffi_store32((ptr) + 12, (payload21).length()) - mbt_ffi_store32((ptr) + 8, address23) + mbt_ffi_store32((ptr) + 12, (payload41).length()) + mbt_ffi_store32((ptr) + 8, address43) () } - TupleType(payload25) => { + TupleType(payload45) => { mbt_ffi_store8((ptr) + 0, (18)) - let address26 = mbt_ffi_malloc((payload25).length() * 4); - for index27 = 0; index27 < (payload25).length(); index27 = index27 + 1 { - let iter_elem : Int = (payload25)[(index27)] - let iter_base = address26 + (index27 * 4); + let address46 = mbt_ffi_malloc((payload45).length() * 4); + for index47 = 0; index47 < (payload45).length(); index47 = index47 + 1 { + let iter_elem : Int = (payload45)[(index47)] + let iter_base = address46 + (index47 * 4); mbt_ffi_store32((iter_base) + 0, iter_elem) } - mbt_ffi_store32((ptr) + 12, (payload25).length()) - mbt_ffi_store32((ptr) + 8, address26) + mbt_ffi_store32((ptr) + 12, (payload45).length()) + mbt_ffi_store32((ptr) + 8, address46) () } - ListType(payload28) => { + ListType(payload48) => { mbt_ffi_store8((ptr) + 0, (19)) - mbt_ffi_store32((ptr) + 8, payload28) + mbt_ffi_store32((ptr) + 8, payload48) () } - FixedListType(payload29) => { + FixedListType(payload49) => { mbt_ffi_store8((ptr) + 0, (20)) - __wit_bindgen_lower_t23((ptr) + 8, payload29) + __wit_bindgen_lower_t23((ptr) + 8, payload49) () } - MapType(payload30) => { + MapType(payload50) => { mbt_ffi_store8((ptr) + 0, (21)) - __wit_bindgen_lower_t24((ptr) + 8, payload30) + __wit_bindgen_lower_t24((ptr) + 8, payload50) () } - OptionType(payload31) => { + OptionType(payload51) => { mbt_ffi_store8((ptr) + 0, (22)) - mbt_ffi_store32((ptr) + 8, payload31) + mbt_ffi_store32((ptr) + 8, payload51) () } - ResultType(payload32) => { + ResultType(payload52) => { mbt_ffi_store8((ptr) + 0, (23)) - __wit_bindgen_lower_t25((ptr) + 8, payload32) + __wit_bindgen_lower_t25((ptr) + 8, payload52) () } - TextType(payload33) => { + TextType(payload53) => { mbt_ffi_store8((ptr) + 0, (24)) - __wit_bindgen_lower_t28((ptr) + 8, payload33) + __wit_bindgen_lower_t31((ptr) + 8, payload53) () } - BinaryType(payload34) => { + BinaryType(payload54) => { mbt_ffi_store8((ptr) + 0, (25)) - __wit_bindgen_lower_t29((ptr) + 8, payload34) + __wit_bindgen_lower_t32((ptr) + 8, payload54) () } - PathType(payload35) => { + PathType(payload55) => { mbt_ffi_store8((ptr) + 0, (26)) - __wit_bindgen_lower_t32((ptr) + 8, payload35) + __wit_bindgen_lower_t35((ptr) + 8, payload55) () } - UrlType(payload36) => { + UrlType(payload56) => { mbt_ffi_store8((ptr) + 0, (27)) - __wit_bindgen_lower_t33((ptr) + 8, payload36) + __wit_bindgen_lower_t36((ptr) + 8, payload56) () } @@ -7015,42 +8561,42 @@ fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { () } - QuantityType(payload39) => { + QuantityType(payload59) => { mbt_ffi_store8((ptr) + 0, (30)) - __wit_bindgen_lower_t36((ptr) + 8, payload39) + __wit_bindgen_lower_t39((ptr) + 8, payload59) () } - UnionType(payload40) => { + UnionType(payload60) => { mbt_ffi_store8((ptr) + 0, (31)) - __wit_bindgen_lower_t41((ptr) + 8, payload40) + __wit_bindgen_lower_t44((ptr) + 8, payload60) () } - SecretType(payload41) => { + SecretType(payload61) => { mbt_ffi_store8((ptr) + 0, (32)) - __wit_bindgen_lower_t42((ptr) + 8, payload41) + __wit_bindgen_lower_t45((ptr) + 8, payload61) () } - QuotaTokenType(payload42) => { + QuotaTokenType(payload62) => { mbt_ffi_store8((ptr) + 0, (33)) - __wit_bindgen_lower_t43((ptr) + 8, payload42) + __wit_bindgen_lower_t46((ptr) + 8, payload62) () } - FutureType(payload43) => { + FutureType(payload63) => { mbt_ffi_store8((ptr) + 0, (34)) - match (payload43) { + match (payload63) { None => { mbt_ffi_store8((ptr) + 8, (0)) () } - Some(payload45) => { + Some(payload65) => { mbt_ffi_store8((ptr) + 8, (1)) - mbt_ffi_store32((ptr) + 12, payload45) + mbt_ffi_store32((ptr) + 12, payload65) () } @@ -7058,18 +8604,18 @@ fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { () } - StreamType(payload46) => { + StreamType(payload66) => { mbt_ffi_store8((ptr) + 0, (35)) - match (payload46) { + match (payload66) { None => { mbt_ffi_store8((ptr) + 8, (0)) () } - Some(payload48) => { + Some(payload68) => { mbt_ffi_store8((ptr) + 8, (1)) - mbt_ffi_store32((ptr) + 12, payload48) + mbt_ffi_store32((ptr) + 12, payload68) () } @@ -7082,20 +8628,20 @@ fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t48(ptr : Int, value : @types.SchemaTypeNode) -> Unit { - __wit_bindgen_lower_t47((ptr) + 0, (value).body) +fn __wit_bindgen_lower_t52(ptr : Int, value : @types.SchemaTypeNode) -> Unit { + __wit_bindgen_lower_t51((ptr) + 0, (value).body) __wit_bindgen_lower_t19((ptr) + 88, (value).metadata) } #doc(hidden) -fn __wit_bindgen_lower_t51(ptr : Int, value : @types.SchemaGraph) -> Unit { +fn __wit_bindgen_lower_t55(ptr : Int, value : @types.SchemaGraph) -> Unit { let address = mbt_ffi_malloc(((value).type_nodes).length() * 144); for index = 0; index < ((value).type_nodes).length(); index = index + 1 { let iter_elem : @types.SchemaTypeNode = ((value).type_nodes)[(index)] let iter_base = address + (index * 144); - __wit_bindgen_lower_t48((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t52((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 4, ((value).type_nodes).length()) @@ -7115,7 +8661,7 @@ fn __wit_bindgen_lower_t51(ptr : Int, value : @types.SchemaGraph) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t53(ptr : Int, value : @types.VariantValuePayload) -> Unit { +fn __wit_bindgen_lower_t57(ptr : Int, value : @types.VariantValuePayload) -> Unit { mbt_ffi_store32((ptr) + 0, ((value).case).reinterpret_as_int()) match ((value).payload) { @@ -7135,14 +8681,14 @@ fn __wit_bindgen_lower_t53(ptr : Int, value : @types.VariantValuePayload) -> Uni } #doc(hidden) -fn __wit_bindgen_lower_t54(ptr : Int, value : @types.MapEntry) -> Unit { +fn __wit_bindgen_lower_t58(ptr : Int, value : @types.MapEntry) -> Unit { mbt_ffi_store32((ptr) + 0, (value).key) mbt_ffi_store32((ptr) + 4, (value).value) } #doc(hidden) -fn __wit_bindgen_lower_t55(ptr : Int, value : @types.ResultValuePayload) -> Unit { +fn __wit_bindgen_lower_t59(ptr : Int, value : @types.ResultValuePayload) -> Unit { match value { OkValue(payload) => { @@ -7188,7 +8734,7 @@ fn __wit_bindgen_lower_t55(ptr : Int, value : @types.ResultValuePayload) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t56(ptr : Int, value : @types.TextValuePayload) -> Unit { +fn __wit_bindgen_lower_t60(ptr : Int, value : @types.TextValuePayload) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).text) mbt_ffi_store32((ptr) + 4, (value).text.length()) @@ -7214,7 +8760,7 @@ fn __wit_bindgen_lower_t56(ptr : Int, value : @types.TextValuePayload) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t58(ptr : Int, value : @types.BinaryValuePayload) -> Unit { +fn __wit_bindgen_lower_t62(ptr : Int, value : @types.BinaryValuePayload) -> Unit { let ptr0 = mbt_ffi_bytes2ptr((value).bytes) @@ -7241,13 +8787,13 @@ fn __wit_bindgen_lower_t58(ptr : Int, value : @types.BinaryValuePayload) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t59(ptr : Int, value : @types.DurationValuePayload) -> Unit { +fn __wit_bindgen_lower_t63(ptr : Int, value : @types.DurationValuePayload) -> Unit { mbt_ffi_store64((ptr) + 0, (value).nanoseconds) } #doc(hidden) -fn __wit_bindgen_lower_t60(ptr : Int, value : @types.UnionValuePayload) -> Unit { +fn __wit_bindgen_lower_t64(ptr : Int, value : @types.UnionValuePayload) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).tag) mbt_ffi_store32((ptr) + 4, (value).tag.length()) @@ -7257,7 +8803,7 @@ fn __wit_bindgen_lower_t60(ptr : Int, value : @types.UnionValuePayload) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t61(ptr : Int, value : @types.SecretValuePayload) -> Unit { +fn __wit_bindgen_lower_t65(ptr : Int, value : @types.SecretValuePayload) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).secret_ref) mbt_ffi_store32((ptr) + 4, (value).secret_ref.length()) @@ -7266,7 +8812,7 @@ fn __wit_bindgen_lower_t61(ptr : Int, value : @types.SecretValuePayload) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { +fn __wit_bindgen_lower_t70(ptr : Int, value : @types.SchemaValueNode) -> Unit { match value { BoolValue(payload) => { @@ -7367,7 +8913,7 @@ fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { } VariantValue(payload14) => { mbt_ffi_store8((ptr) + 0, (14)) - __wit_bindgen_lower_t53((ptr) + 8, payload14) + __wit_bindgen_lower_t57((ptr) + 8, payload14) () } @@ -7444,7 +8990,7 @@ fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { for index30 = 0; index30 < (payload28).length(); index30 = index30 + 1 { let iter_elem : @types.MapEntry = (payload28)[(index30)] let iter_base = address29 + (index30 * 8); - __wit_bindgen_lower_t54((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t58((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 12, (payload28).length()) @@ -7473,19 +9019,19 @@ fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { } ResultValue(payload34) => { mbt_ffi_store8((ptr) + 0, (22)) - __wit_bindgen_lower_t55((ptr) + 8, payload34) + __wit_bindgen_lower_t59((ptr) + 8, payload34) () } TextValue(payload35) => { mbt_ffi_store8((ptr) + 0, (23)) - __wit_bindgen_lower_t56((ptr) + 8, payload35) + __wit_bindgen_lower_t60((ptr) + 8, payload35) () } BinaryValue(payload36) => { mbt_ffi_store8((ptr) + 0, (24)) - __wit_bindgen_lower_t58((ptr) + 8, payload36) + __wit_bindgen_lower_t62((ptr) + 8, payload36) () } @@ -7515,25 +9061,25 @@ fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { } DurationValue(payload42) => { mbt_ffi_store8((ptr) + 0, (28)) - __wit_bindgen_lower_t59((ptr) + 8, payload42) + __wit_bindgen_lower_t63((ptr) + 8, payload42) () } QuantityValueNode(payload43) => { mbt_ffi_store8((ptr) + 0, (29)) - __wit_bindgen_lower_t34((ptr) + 8, payload43) + __wit_bindgen_lower_t37((ptr) + 8, payload43) () } UnionValue(payload44) => { mbt_ffi_store8((ptr) + 0, (30)) - __wit_bindgen_lower_t60((ptr) + 8, payload44) + __wit_bindgen_lower_t64((ptr) + 8, payload44) () } SecretValue(payload45) => { mbt_ffi_store8((ptr) + 0, (31)) - __wit_bindgen_lower_t61((ptr) + 8, payload45) + __wit_bindgen_lower_t65((ptr) + 8, payload45) () } @@ -7550,13 +9096,13 @@ fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t68(ptr : Int, value : @types.SchemaValueTree) -> Unit { +fn __wit_bindgen_lower_t72(ptr : Int, value : @types.SchemaValueTree) -> Unit { let address = mbt_ffi_malloc(((value).value_nodes).length() * 32); for index = 0; index < ((value).value_nodes).length(); index = index + 1 { let iter_elem : @types.SchemaValueNode = ((value).value_nodes)[(index)] let iter_base = address + (index * 32); - __wit_bindgen_lower_t66((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t70((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 4, ((value).value_nodes).length()) @@ -7566,14 +9112,14 @@ fn __wit_bindgen_lower_t68(ptr : Int, value : @types.SchemaValueTree) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t69(ptr : Int, value : @types.TypedSchemaValue) -> Unit { - __wit_bindgen_lower_t51((ptr) + 0, (value).graph) - __wit_bindgen_lower_t68((ptr) + 20, (value).value) +fn __wit_bindgen_lower_t73(ptr : Int, value : @types.TypedSchemaValue) -> Unit { + __wit_bindgen_lower_t55((ptr) + 0, (value).graph) + __wit_bindgen_lower_t72((ptr) + 20, (value).value) } #doc(hidden) -fn __wit_bindgen_lower_t372(ptr : Int, value : @common.FieldSource) -> Unit { +fn __wit_bindgen_lower_t376(ptr : Int, value : @common.FieldSource) -> Unit { match value { UserSupplied => { @@ -7592,19 +9138,19 @@ fn __wit_bindgen_lower_t372(ptr : Int, value : @common.FieldSource) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t373(ptr : Int, value : @common.NamedField) -> Unit { +fn __wit_bindgen_lower_t377(ptr : Int, value : @common.NamedField) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).name) mbt_ffi_store32((ptr) + 4, (value).name.length()) mbt_ffi_store32((ptr) + 0, ptr0) - __wit_bindgen_lower_t372((ptr) + 8, (value).source) + __wit_bindgen_lower_t376((ptr) + 8, (value).source) mbt_ffi_store32((ptr) + 12, (value).schema) __wit_bindgen_lower_t19((ptr) + 16, (value).metadata) } #doc(hidden) -fn __wit_bindgen_lower_t375(ptr : Int, value : @common.InputSchema) -> Unit { +fn __wit_bindgen_lower_t379(ptr : Int, value : @common.InputSchema) -> Unit { match value { Parameters(payload) => { @@ -7614,7 +9160,7 @@ fn __wit_bindgen_lower_t375(ptr : Int, value : @common.InputSchema) -> Unit { for index = 0; index < (payload).length(); index = index + 1 { let iter_elem : @common.NamedField = (payload)[(index)] let iter_base = address + (index * 72); - __wit_bindgen_lower_t373((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t377((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 8, (payload).length()) @@ -7627,7 +9173,7 @@ fn __wit_bindgen_lower_t375(ptr : Int, value : @common.InputSchema) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t376(ptr : Int, value : @common.OutputSchema) -> Unit { +fn __wit_bindgen_lower_t380(ptr : Int, value : @common.OutputSchema) -> Unit { match value { Unit => { @@ -7646,7 +9192,7 @@ fn __wit_bindgen_lower_t376(ptr : Int, value : @common.OutputSchema) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t377(ptr : Int, value : @common.CachePolicy) -> Unit { +fn __wit_bindgen_lower_t381(ptr : Int, value : @common.CachePolicy) -> Unit { match value { NoCache => { @@ -7670,14 +9216,14 @@ fn __wit_bindgen_lower_t377(ptr : Int, value : @common.CachePolicy) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t378(ptr : Int, value : @common.ReadOnlyConfig) -> Unit { - __wit_bindgen_lower_t377((ptr) + 0, (value).cache_policy) +fn __wit_bindgen_lower_t382(ptr : Int, value : @common.ReadOnlyConfig) -> Unit { + __wit_bindgen_lower_t381((ptr) + 0, (value).cache_policy) mbt_ffi_store8((ptr) + 16, (if (value).uses_principal { 1 } else { 0 })) } #doc(hidden) -fn __wit_bindgen_lower_t380(ptr : Int, value : @common.CorsOptions) -> Unit { +fn __wit_bindgen_lower_t384(ptr : Int, value : @common.CorsOptions) -> Unit { let address = mbt_ffi_malloc(((value).allowed_patterns).length() * 8); for index = 0; index < ((value).allowed_patterns).length(); index = index + 1 { @@ -7695,7 +9241,7 @@ fn __wit_bindgen_lower_t380(ptr : Int, value : @common.CorsOptions) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t381(ptr : Int, value : @common.HttpMethod) -> Unit { +fn __wit_bindgen_lower_t385(ptr : Int, value : @common.HttpMethod) -> Unit { match value { Get => { @@ -7757,7 +9303,7 @@ fn __wit_bindgen_lower_t381(ptr : Int, value : @common.HttpMethod) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t383(ptr : Int, value : @common.PathVariable) -> Unit { +fn __wit_bindgen_lower_t387(ptr : Int, value : @common.PathVariable) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).variable_name) mbt_ffi_store32((ptr) + 4, (value).variable_name.length()) @@ -7766,7 +9312,7 @@ fn __wit_bindgen_lower_t383(ptr : Int, value : @common.PathVariable) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t384(ptr : Int, value : @common.PathSegment) -> Unit { +fn __wit_bindgen_lower_t388(ptr : Int, value : @common.PathSegment) -> Unit { match value { Literal(payload) => { @@ -7786,13 +9332,13 @@ fn __wit_bindgen_lower_t384(ptr : Int, value : @common.PathSegment) -> Unit { } PathVariable(payload2) => { mbt_ffi_store8((ptr) + 0, (2)) - __wit_bindgen_lower_t383((ptr) + 4, payload2) + __wit_bindgen_lower_t387((ptr) + 4, payload2) () } RemainingPathVariable(payload3) => { mbt_ffi_store8((ptr) + 0, (3)) - __wit_bindgen_lower_t383((ptr) + 4, payload3) + __wit_bindgen_lower_t387((ptr) + 4, payload3) () } @@ -7801,7 +9347,7 @@ fn __wit_bindgen_lower_t384(ptr : Int, value : @common.PathSegment) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t385(ptr : Int, value : @common.HeaderVariable) -> Unit { +fn __wit_bindgen_lower_t389(ptr : Int, value : @common.HeaderVariable) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).header_name) mbt_ffi_store32((ptr) + 4, (value).header_name.length()) @@ -7814,7 +9360,7 @@ fn __wit_bindgen_lower_t385(ptr : Int, value : @common.HeaderVariable) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t386(ptr : Int, value : @common.QueryVariable) -> Unit { +fn __wit_bindgen_lower_t390(ptr : Int, value : @common.QueryVariable) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).query_param_name) mbt_ffi_store32((ptr) + 4, (value).query_param_name.length()) @@ -7827,19 +9373,19 @@ fn __wit_bindgen_lower_t386(ptr : Int, value : @common.QueryVariable) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t387(ptr : Int, value : @common.AuthDetails) -> Unit { +fn __wit_bindgen_lower_t391(ptr : Int, value : @common.AuthDetails) -> Unit { mbt_ffi_store8((ptr) + 0, (if (value).required { 1 } else { 0 })) } #doc(hidden) -fn __wit_bindgen_lower_t390(ptr : Int, value : @common.HttpMountDetails) -> Unit { +fn __wit_bindgen_lower_t394(ptr : Int, value : @common.HttpMountDetails) -> Unit { let address = mbt_ffi_malloc(((value).path_prefix).length() * 12); for index = 0; index < ((value).path_prefix).length(); index = index + 1 { let iter_elem : @common.PathSegment = ((value).path_prefix)[(index)] let iter_base = address + (index * 12); - __wit_bindgen_lower_t384((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t388((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 4, ((value).path_prefix).length()) @@ -7853,19 +9399,19 @@ fn __wit_bindgen_lower_t390(ptr : Int, value : @common.HttpMountDetails) -> Unit } Some(payload0) => { mbt_ffi_store8((ptr) + 8, (1)) - __wit_bindgen_lower_t387((ptr) + 9, payload0) + __wit_bindgen_lower_t391((ptr) + 9, payload0) () } } mbt_ffi_store8((ptr) + 10, (if (value).phantom_agent { 1 } else { 0 })) - __wit_bindgen_lower_t380((ptr) + 12, (value).cors_options) + __wit_bindgen_lower_t384((ptr) + 12, (value).cors_options) let address1 = mbt_ffi_malloc(((value).webhook_suffix).length() * 12); for index2 = 0; index2 < ((value).webhook_suffix).length(); index2 = index2 + 1 { let iter_elem : @common.PathSegment = ((value).webhook_suffix)[(index2)] let iter_base = address1 + (index2 * 12); - __wit_bindgen_lower_t384((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t388((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 24, ((value).webhook_suffix).length()) @@ -7874,14 +9420,14 @@ fn __wit_bindgen_lower_t390(ptr : Int, value : @common.HttpMountDetails) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t393(ptr : Int, value : @common.HttpEndpointDetails) -> Unit { - __wit_bindgen_lower_t381((ptr) + 0, (value).http_method) +fn __wit_bindgen_lower_t397(ptr : Int, value : @common.HttpEndpointDetails) -> Unit { + __wit_bindgen_lower_t385((ptr) + 0, (value).http_method) let address = mbt_ffi_malloc(((value).path_suffix).length() * 12); for index = 0; index < ((value).path_suffix).length(); index = index + 1 { let iter_elem : @common.PathSegment = ((value).path_suffix)[(index)] let iter_base = address + (index * 12); - __wit_bindgen_lower_t384((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t388((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 16, ((value).path_suffix).length()) @@ -7891,7 +9437,7 @@ fn __wit_bindgen_lower_t393(ptr : Int, value : @common.HttpEndpointDetails) -> U for index1 = 0; index1 < ((value).header_vars).length(); index1 = index1 + 1 { let iter_elem : @common.HeaderVariable = ((value).header_vars)[(index1)] let iter_base = address0 + (index1 * 16); - __wit_bindgen_lower_t385((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t389((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 24, ((value).header_vars).length()) @@ -7901,7 +9447,7 @@ fn __wit_bindgen_lower_t393(ptr : Int, value : @common.HttpEndpointDetails) -> U for index3 = 0; index3 < ((value).query_vars).length(); index3 = index3 + 1 { let iter_elem : @common.QueryVariable = ((value).query_vars)[(index3)] let iter_base = address2 + (index3 * 16); - __wit_bindgen_lower_t386((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t390((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 32, ((value).query_vars).length()) @@ -7915,17 +9461,17 @@ fn __wit_bindgen_lower_t393(ptr : Int, value : @common.HttpEndpointDetails) -> U } Some(payload4) => { mbt_ffi_store8((ptr) + 36, (1)) - __wit_bindgen_lower_t387((ptr) + 37, payload4) + __wit_bindgen_lower_t391((ptr) + 37, payload4) () } } - __wit_bindgen_lower_t380((ptr) + 40, (value).cors_options) + __wit_bindgen_lower_t384((ptr) + 40, (value).cors_options) } #doc(hidden) -fn __wit_bindgen_lower_t397(ptr : Int, value : @common.AgentMethod) -> Unit { +fn __wit_bindgen_lower_t401(ptr : Int, value : @common.AgentMethod) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).name) mbt_ffi_store32((ptr) + 4, (value).name.length()) @@ -7939,7 +9485,7 @@ fn __wit_bindgen_lower_t397(ptr : Int, value : @common.AgentMethod) -> Unit { for index = 0; index < ((value).http_endpoint).length(); index = index + 1 { let iter_elem : @common.HttpEndpointDetails = ((value).http_endpoint)[(index)] let iter_base = address + (index * 48); - __wit_bindgen_lower_t393((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t397((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 20, ((value).http_endpoint).length()) @@ -7961,8 +9507,8 @@ fn __wit_bindgen_lower_t397(ptr : Int, value : @common.AgentMethod) -> Unit { () } } - __wit_bindgen_lower_t375((ptr) + 36, (value).input_schema) - __wit_bindgen_lower_t376((ptr) + 48, (value).output_schema) + __wit_bindgen_lower_t379((ptr) + 36, (value).input_schema) + __wit_bindgen_lower_t380((ptr) + 48, (value).output_schema) match ((value).read_only) { None => { @@ -7972,7 +9518,7 @@ fn __wit_bindgen_lower_t397(ptr : Int, value : @common.AgentMethod) -> Unit { } Some(payload5) => { mbt_ffi_store8((ptr) + 56, (1)) - __wit_bindgen_lower_t378((ptr) + 64, payload5) + __wit_bindgen_lower_t382((ptr) + 64, payload5) () } @@ -7981,7 +9527,7 @@ fn __wit_bindgen_lower_t397(ptr : Int, value : @common.AgentMethod) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t403(ptr : Int, value : @common.AgentConstructor) -> Unit { +fn __wit_bindgen_lower_t407(ptr : Int, value : @common.AgentConstructor) -> Unit { match ((value).name) { None => { @@ -8020,12 +9566,12 @@ fn __wit_bindgen_lower_t403(ptr : Int, value : @common.AgentConstructor) -> Unit () } } - __wit_bindgen_lower_t375((ptr) + 32, (value).input_schema) + __wit_bindgen_lower_t379((ptr) + 32, (value).input_schema) } #doc(hidden) -fn __wit_bindgen_lower_t405(ptr : Int, value : @common.AgentDependency) -> Unit { +fn __wit_bindgen_lower_t409(ptr : Int, value : @common.AgentDependency) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).type_name) mbt_ffi_store32((ptr) + 4, (value).type_name.length()) @@ -8047,14 +9593,14 @@ fn __wit_bindgen_lower_t405(ptr : Int, value : @common.AgentDependency) -> Unit () } } - __wit_bindgen_lower_t51((ptr) + 20, (value).schema) - __wit_bindgen_lower_t403((ptr) + 40, (value).constructor_) + __wit_bindgen_lower_t55((ptr) + 20, (value).schema) + __wit_bindgen_lower_t407((ptr) + 40, (value).constructor_) let address = mbt_ffi_malloc(((value).methods).length() * 88); for index = 0; index < ((value).methods).length(); index = index + 1 { let iter_elem : @common.AgentMethod = ((value).methods)[(index)] let iter_base = address + (index * 88); - __wit_bindgen_lower_t397((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t401((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 88, ((value).methods).length()) @@ -8063,7 +9609,7 @@ fn __wit_bindgen_lower_t405(ptr : Int, value : @common.AgentDependency) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t406(ptr : Int, value : @common.SnapshottingConfig) -> Unit { +fn __wit_bindgen_lower_t410(ptr : Int, value : @common.SnapshottingConfig) -> Unit { match value { Default => { @@ -8088,7 +9634,7 @@ fn __wit_bindgen_lower_t406(ptr : Int, value : @common.SnapshottingConfig) -> Un } #doc(hidden) -fn __wit_bindgen_lower_t407(ptr : Int, value : @common.Snapshotting) -> Unit { +fn __wit_bindgen_lower_t411(ptr : Int, value : @common.Snapshotting) -> Unit { match value { Disabled => { @@ -8098,7 +9644,7 @@ fn __wit_bindgen_lower_t407(ptr : Int, value : @common.Snapshotting) -> Unit { } Enabled(payload0) => { mbt_ffi_store8((ptr) + 0, (1)) - __wit_bindgen_lower_t406((ptr) + 8, payload0) + __wit_bindgen_lower_t410((ptr) + 8, payload0) () } @@ -8107,7 +9653,7 @@ fn __wit_bindgen_lower_t407(ptr : Int, value : @common.Snapshotting) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t409(ptr : Int, value : @common.AgentConfigDeclaration) -> Unit { +fn __wit_bindgen_lower_t413(ptr : Int, value : @common.AgentConfigDeclaration) -> Unit { mbt_ffi_store8((ptr) + 0, (value).source.ordinal()) let address = mbt_ffi_malloc(((value).path).length() * 8); @@ -8127,7 +9673,7 @@ fn __wit_bindgen_lower_t409(ptr : Int, value : @common.AgentConfigDeclaration) - } #doc(hidden) -fn __wit_bindgen_lower_t413(ptr : Int, value : @common.AgentType) -> Unit { +fn __wit_bindgen_lower_t417(ptr : Int, value : @common.AgentType) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).type_name) mbt_ffi_store32((ptr) + 4, (value).type_name.length()) @@ -8140,14 +9686,14 @@ fn __wit_bindgen_lower_t413(ptr : Int, value : @common.AgentType) -> Unit { let ptr2 = mbt_ffi_str2ptr((value).source_language) mbt_ffi_store32((ptr) + 20, (value).source_language.length()) mbt_ffi_store32((ptr) + 16, ptr2) - __wit_bindgen_lower_t51((ptr) + 24, (value).schema) - __wit_bindgen_lower_t403((ptr) + 44, (value).constructor_) + __wit_bindgen_lower_t55((ptr) + 24, (value).schema) + __wit_bindgen_lower_t407((ptr) + 44, (value).constructor_) let address = mbt_ffi_malloc(((value).methods).length() * 88); for index = 0; index < ((value).methods).length(); index = index + 1 { let iter_elem : @common.AgentMethod = ((value).methods)[(index)] let iter_base = address + (index * 88); - __wit_bindgen_lower_t397((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t401((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 92, ((value).methods).length()) @@ -8157,7 +9703,7 @@ fn __wit_bindgen_lower_t413(ptr : Int, value : @common.AgentType) -> Unit { for index4 = 0; index4 < ((value).dependencies).length(); index4 = index4 + 1 { let iter_elem : @common.AgentDependency = ((value).dependencies)[(index4)] let iter_base = address3 + (index4 * 92); - __wit_bindgen_lower_t405((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t409((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 100, ((value).dependencies).length()) @@ -8172,18 +9718,18 @@ fn __wit_bindgen_lower_t413(ptr : Int, value : @common.AgentType) -> Unit { } Some(payload5) => { mbt_ffi_store8((ptr) + 108, (1)) - __wit_bindgen_lower_t390((ptr) + 112, payload5) + __wit_bindgen_lower_t394((ptr) + 112, payload5) () } } - __wit_bindgen_lower_t407((ptr) + 144, (value).snapshotting) + __wit_bindgen_lower_t411((ptr) + 144, (value).snapshotting) let address6 = mbt_ffi_malloc(((value).config).length() * 16); for index7 = 0; index7 < ((value).config).length(); index7 = index7 + 1 { let iter_elem : @common.AgentConfigDeclaration = ((value).config)[(index7)] let iter_base = address6 + (index7 * 16); - __wit_bindgen_lower_t409((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t413((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 172, ((value).config).length()) @@ -8192,7 +9738,7 @@ fn __wit_bindgen_lower_t413(ptr : Int, value : @common.AgentType) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t416(ptr : Int, value : @common.AgentError) -> Unit { +fn __wit_bindgen_lower_t420(ptr : Int, value : @common.AgentError) -> Unit { match value { InvalidInput(payload) => { @@ -8233,7 +9779,7 @@ fn __wit_bindgen_lower_t416(ptr : Int, value : @common.AgentError) -> Unit { } CustomError(payload7) => { mbt_ffi_store8((ptr) + 0, (4)) - __wit_bindgen_lower_t69((ptr) + 4, payload7) + __wit_bindgen_lower_t73((ptr) + 4, payload7) () } @@ -8242,17 +9788,11 @@ fn __wit_bindgen_lower_t416(ptr : Int, value : @common.AgentError) -> Unit { } ///| -extern "wasm" fn mbt_ffi_storef64(offset : Int, value : Double) = -#|(func (param i32) (param f64) local.get 0 local.get 1 f64.store) - -///| -#owned(bytes) -extern "wasm" fn mbt_ffi_bytes2ptr(bytes : FixedArray[Byte]) -> Int = -#|(func (param i32) (result i32) local.get 0) - -///| -extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.load) +extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = +#|(func (param i32) (result i32) (local i32) +#| local.get 0 i32.const 4 i32.add call $moonbit.gc.malloc +#| local.tee 1 i32.const 0 call $moonbit.init_array8 +#| local.get 1) ///| extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = @@ -8262,51 +9802,56 @@ extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = #| local.get 0) ///| -extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = -#|(func (param i32) (result f64) local.get 0 f64.load) +#owned(bytes) +extern "wasm" fn mbt_ffi_bytes2ptr(bytes : FixedArray[Byte]) -> Int = +#|(func (param i32) (result i32) local.get 0) ///| -extern "wasm" fn mbt_ffi_store8(offset : Int, value : Int) = -#|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) +extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = +#|(func (param i32) (result i64) local.get 0 i64.load) ///| -extern "wasm" fn mbt_ffi_extend16(value : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.extend16_s) +extern "wasm" fn mbt_ffi_store64(offset : Int, value : Int64) = +#|(func (param i32) (param i64) local.get 0 local.get 1 i64.store) ///| -extern "wasm" fn mbt_ffi_storef32(offset : Int, value : Float) = -#|(func (param i32) (param f32) local.get 0 local.get 1 f32.store) +extern "wasm" fn mbt_ffi_extend8(value : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.extend8_s) ///| -extern "wasm" fn mbt_ffi_load16(offset : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.load16_s) +extern "wasm" fn mbt_ffi_free(position : Int) = +#|(func (param i32) local.get 0 call $moonbit.decref) ///| -extern "wasm" fn mbt_ffi_extend8(value : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.extend8_s) +extern "wasm" fn mbt_ffi_extend16(value : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.extend16_s) ///| extern "wasm" fn mbt_ffi_store16(offset : Int, value : Int) = #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store16) ///| -extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = -#|(func (param i32) (result i32) (local i32) -#| local.get 0 i32.const 4 i32.add call $moonbit.gc.malloc -#| local.tee 1 i32.const 0 call $moonbit.init_array8 -#| local.get 1) +extern "wasm" fn mbt_ffi_store32(offset : Int, value : Int) = +#|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) ///| -extern "wasm" fn mbt_ffi_free(position : Int) = -#|(func (param i32) local.get 0 call $moonbit.decref) +extern "wasm" fn mbt_ffi_load16_u(offset : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.load16_u) ///| extern "wasm" fn mbt_ffi_load8_u(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load8_u) ///| -extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = -#|(func (param i32) (result i64) local.get 0 i64.load) +extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = +#|(func (param i32) (param i32) (result i32) +#| local.get 0 +#| local.get 1 call $moonbit.init_array16 +#| local.get 0) + +///| +extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = +#|(func (param i32) (result f64) local.get 0 f64.load) ///| #owned(str) @@ -8314,29 +9859,30 @@ extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = #|(func (param i32) (result i32) local.get 0) ///| -extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = -#|(func (param i32) (param i32) (result i32) -#| local.get 0 -#| local.get 1 call $moonbit.init_array16 -#| local.get 0) +extern "wasm" fn mbt_ffi_storef32(offset : Int, value : Float) = +#|(func (param i32) (param f32) local.get 0 local.get 1 f32.store) + +///| +extern "wasm" fn mbt_ffi_store8(offset : Int, value : Int) = +#|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) ///| extern "wasm" fn mbt_ffi_load8(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load8_s) ///| -extern "wasm" fn mbt_ffi_load16_u(offset : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.load16_u) +extern "wasm" fn mbt_ffi_load16(offset : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.load16_s) ///| -extern "wasm" fn mbt_ffi_loadf32(offset : Int) -> Float = -#|(func (param i32) (result f32) local.get 0 f32.load) +extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.load) ///| -extern "wasm" fn mbt_ffi_store64(offset : Int, value : Int64) = -#|(func (param i32) (param i64) local.get 0 local.get 1 i64.store) +extern "wasm" fn mbt_ffi_loadf32(offset : Int) -> Float = +#|(func (param i32) (result f32) local.get 0 f32.load) ///| -extern "wasm" fn mbt_ffi_store32(offset : Int, value : Int) = -#|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) +extern "wasm" fn mbt_ffi_storef64(offset : Int, value : Double) = +#|(func (param i32) (param f64) local.get 0 local.get 1 f64.store) diff --git a/sdks/moonbit/golem_sdk/gen/interface/golem/api/saveSnapshot/ffi.mbt b/sdks/moonbit/golem_sdk/gen/interface/golem/api/saveSnapshot/ffi.mbt index 5ba5faef1e..047de478f7 100644 --- a/sdks/moonbit/golem_sdk/gen/interface/golem/api/saveSnapshot/ffi.mbt +++ b/sdks/moonbit/golem_sdk/gen/interface/golem/api/saveSnapshot/ffi.mbt @@ -5,7 +5,7 @@ pub fn wasmExportSave() -> Int { let (result) : (@host.Snapshot) = save(); let return_area = mbt_ffi_malloc(16) - __wit_bindgen_lower_t148((return_area) + 0, result) + __wit_bindgen_lower_t152((return_area) + 0, result) let ret = return_area return ret @@ -19,7 +19,7 @@ pub fn wasmExportSavePostReturn(p0 : Int) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t148(ptr : Int, value : @host.Snapshot) -> Unit { +fn __wit_bindgen_lower_t152(ptr : Int, value : @host.Snapshot) -> Unit { let ptr0 = mbt_ffi_bytes2ptr((value).payload) @@ -33,17 +33,10 @@ fn __wit_bindgen_lower_t148(ptr : Int, value : @host.Snapshot) -> Unit { } ///| -#owned(str) -extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = +#owned(bytes) +extern "wasm" fn mbt_ffi_bytes2ptr(bytes : FixedArray[Byte]) -> Int = #|(func (param i32) (result i32) local.get 0) -///| -extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = -#|(func (param i32) (result i32) (local i32) -#| local.get 0 i32.const 4 i32.add call $moonbit.gc.malloc -#| local.tee 1 i32.const 0 call $moonbit.init_array8 -#| local.get 1) - ///| extern "wasm" fn mbt_ffi_free(position : Int) = #|(func (param i32) local.get 0 call $moonbit.decref) @@ -52,12 +45,19 @@ extern "wasm" fn mbt_ffi_free(position : Int) = extern "wasm" fn mbt_ffi_store32(offset : Int, value : Int) = #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) +///| +#owned(str) +extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = +#|(func (param i32) (result i32) local.get 0) + ///| extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = #|(func (param i32) (result i32) local.get 0 i32.load) ///| -#owned(bytes) -extern "wasm" fn mbt_ffi_bytes2ptr(bytes : FixedArray[Byte]) -> Int = -#|(func (param i32) (result i32) local.get 0) +extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = +#|(func (param i32) (result i32) (local i32) +#| local.get 0 i32.const 4 i32.add call $moonbit.gc.malloc +#| local.tee 1 i32.const 0 call $moonbit.init_array8 +#| local.get 1) diff --git a/sdks/moonbit/golem_sdk/gen/interface/golem/tool/guest/ffi.mbt b/sdks/moonbit/golem_sdk/gen/interface/golem/tool/guest/ffi.mbt index b723ffd5dd..c24cab55de 100644 --- a/sdks/moonbit/golem_sdk/gen/interface/golem/tool/guest/ffi.mbt +++ b/sdks/moonbit/golem_sdk/gen/interface/golem/tool/guest/ffi.mbt @@ -14,7 +14,7 @@ pub fn wasmExportDiscoverTools() -> Int { for index = 0; index < (payload).length(); index = index + 1 { let iter_elem : @common.Tool = (payload)[(index)] let iter_base = address + (index * 36); - __wit_bindgen_lower_t517((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t523((iter_base) + 0, iter_elem) } mbt_ffi_store32((return_area) + 8, (payload).length()) @@ -24,7 +24,7 @@ pub fn wasmExportDiscoverTools() -> Int { } Err(payload0) => { mbt_ffi_store8((return_area) + 0, (1)) - __wit_bindgen_lower_t518((return_area) + 4, payload0) + __wit_bindgen_lower_t524((return_area) + 4, payload0) () } @@ -66,7 +66,7 @@ pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) for index4 = 0; index4 < (mbt_ffi_load32((iter_base) + 44)); index4 = index4 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index4 * 108) + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index4 * 112) mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) for index1 = 0; index1 < (mbt_ffi_load32((iter_base) + 20)); index1 = index1 + 1 { @@ -95,12 +95,12 @@ pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { _ => panic() } - match (mbt_ffi_load8_u((iter_base) + 76)) { + match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => () 1 => { - for index3 = 0; index3 < (mbt_ffi_load32((iter_base) + 84)); index3 = index3 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index3 * 32) + for index3 = 0; index3 < (mbt_ffi_load32((iter_base) + 88)); index3 = index3 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index3 * 32) match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () @@ -200,16 +200,16 @@ pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { } } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) } _ => panic() } - match (mbt_ffi_load8_u((iter_base) + 96)) { + match (mbt_ffi_load8_u((iter_base) + 100)) { 0 => () 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 104)) } _ => panic() @@ -431,7 +431,7 @@ pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { } for index15 = 0; index15 < (mbt_ffi_load32((iter_base) + 160)); index15 = index15 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 156)) + (index15 * 108) + let iter_base = (mbt_ffi_load32((iter_base) + 156)) + (index15 * 112) mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) for index12 = 0; index12 < (mbt_ffi_load32((iter_base) + 20)); index12 = index12 + 1 { @@ -460,12 +460,12 @@ pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { _ => panic() } - match (mbt_ffi_load8_u((iter_base) + 76)) { + match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => () 1 => { - for index14 = 0; index14 < (mbt_ffi_load32((iter_base) + 84)); index14 = index14 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index14 * 32) + for index14 = 0; index14 < (mbt_ffi_load32((iter_base) + 88)); index14 = index14 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index14 * 32) match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () @@ -565,16 +565,16 @@ pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { } } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) } _ => panic() } - match (mbt_ffi_load8_u((iter_base) + 96)) { + match (mbt_ffi_load8_u((iter_base) + 100)) { 0 => () 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 104)) } _ => panic() @@ -1734,16 +1734,206 @@ pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () + 2 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 3 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 10 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 11 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } 12 => () 13 => () 14 => { @@ -2277,54 +2467,244 @@ pub fn wasmExportDiscoverToolsPostReturn(p0 : Int) -> Unit { match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () - 12 => () - 13 => () - 14 => { + 2 => { - for index73 = 0; index73 < (mbt_ffi_load32((iter_base) + 12)); index73 = index73 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index73 * 68) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { - match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => () - 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + } + _ => panic() } - _ => panic() - } - - for index71 = 0; index71 < (mbt_ffi_load32((iter_base) + 28)); index71 = index71 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index71 * 8) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + _ => panic() + } - for index72 = 0; index72 < (mbt_ffi_load32((iter_base) + 36)); index72 = index72 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index72 * 8) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + } + 3 => { - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { - match (mbt_ffi_load8_u((iter_base) + 40)) { - 0 => () - 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + } + _ => panic() } - _ => panic() + + } + _ => panic() + } + + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 10 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 11 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 12 => () + 13 => () + 14 => { + + for index73 = 0; index73 < (mbt_ffi_load32((iter_base) + 12)); index73 = index73 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index73 * 68) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + } + _ => panic() + } + + for index71 = 0; index71 < (mbt_ffi_load32((iter_base) + 28)); index71 = index71 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index71 * 8) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + for index72 = 0; index72 < (mbt_ffi_load32((iter_base) + 36)); index72 = index72 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index72 * 8) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + match (mbt_ffi_load8_u((iter_base) + 40)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) + + } + _ => panic() } match (mbt_ffi_load8_u((iter_base) + 52)) { @@ -2903,13 +3283,13 @@ pub fn wasmExportGetTool(p0 : Int, p1 : Int) -> Int { match result0 { Ok(payload) => { mbt_ffi_store8((return_area) + 0, (0)) - __wit_bindgen_lower_t517((return_area) + 4, payload) + __wit_bindgen_lower_t523((return_area) + 4, payload) () } Err(payload1) => { mbt_ffi_store8((return_area) + 0, (1)) - __wit_bindgen_lower_t518((return_area) + 4, payload1) + __wit_bindgen_lower_t524((return_area) + 4, payload1) () } @@ -2948,7 +3328,7 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) for index4 = 0; index4 < (mbt_ffi_load32((iter_base) + 44)); index4 = index4 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index4 * 108) + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index4 * 112) mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) for index1 = 0; index1 < (mbt_ffi_load32((iter_base) + 20)); index1 = index1 + 1 { @@ -2977,12 +3357,12 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { _ => panic() } - match (mbt_ffi_load8_u((iter_base) + 76)) { + match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => () 1 => { - for index3 = 0; index3 < (mbt_ffi_load32((iter_base) + 84)); index3 = index3 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index3 * 32) + for index3 = 0; index3 < (mbt_ffi_load32((iter_base) + 88)); index3 = index3 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index3 * 32) match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () @@ -3082,16 +3462,16 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { } } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) } _ => panic() } - match (mbt_ffi_load8_u((iter_base) + 96)) { + match (mbt_ffi_load8_u((iter_base) + 100)) { 0 => () 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 104)) } _ => panic() @@ -3313,7 +3693,7 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { } for index15 = 0; index15 < (mbt_ffi_load32((iter_base) + 160)); index15 = index15 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 156)) + (index15 * 108) + let iter_base = (mbt_ffi_load32((iter_base) + 156)) + (index15 * 112) mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) for index12 = 0; index12 < (mbt_ffi_load32((iter_base) + 20)); index12 = index12 + 1 { @@ -3342,12 +3722,12 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { _ => panic() } - match (mbt_ffi_load8_u((iter_base) + 76)) { + match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => () 1 => { - for index14 = 0; index14 < (mbt_ffi_load32((iter_base) + 84)); index14 = index14 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index14 * 32) + for index14 = 0; index14 < (mbt_ffi_load32((iter_base) + 88)); index14 = index14 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index14 * 32) match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () @@ -3447,16 +3827,16 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { } } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) } _ => panic() } - match (mbt_ffi_load8_u((iter_base) + 96)) { + match (mbt_ffi_load8_u((iter_base) + 100)) { 0 => () 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 104)) } _ => panic() @@ -4616,84 +4996,274 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () - 12 => () - 13 => () - 14 => { + 2 => { - for index49 = 0; index49 < (mbt_ffi_load32((iter_base) + 12)); index49 = index49 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index49 * 68) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { - match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => () - 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + } + _ => panic() } - _ => panic() - } - - for index47 = 0; index47 < (mbt_ffi_load32((iter_base) + 28)); index47 = index47 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index47 * 8) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - - for index48 = 0; index48 < (mbt_ffi_load32((iter_base) + 36)); index48 = index48 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index48 * 8) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - - match (mbt_ffi_load8_u((iter_base) + 40)) { - 0 => () - 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) + _ => panic() + } - } - _ => panic() - } + } + 3 => { - match (mbt_ffi_load8_u((iter_base) + 52)) { - 0 => () - 1 => { + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { - match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => () - 1 => () - 2 => () - 3 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - } - _ => panic() } - + _ => panic() } - _ => panic() - } + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) } - 15 => { - - for index52 = 0; index52 < (mbt_ffi_load32((iter_base) + 12)); index52 = index52 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index52 * 72) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 10 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 11 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 12 => () + 13 => () + 14 => { + + for index49 = 0; index49 < (mbt_ffi_load32((iter_base) + 12)); index49 = index49 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index49 * 68) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + } + _ => panic() + } + + for index47 = 0; index47 < (mbt_ffi_load32((iter_base) + 28)); index47 = index47 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index47 * 8) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + for index48 = 0; index48 < (mbt_ffi_load32((iter_base) + 36)); index48 = index48 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index48 * 8) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + match (mbt_ffi_load8_u((iter_base) + 40)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) + + } + _ => panic() + } + + match (mbt_ffi_load8_u((iter_base) + 52)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => () + 1 => () + 2 => () + 3 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + } + 15 => { + + for index52 = 0; index52 < (mbt_ffi_load32((iter_base) + 12)); index52 = index52 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index52 * 72) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => () @@ -5156,39 +5726,229 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () - 12 => () - 13 => () - 14 => { + 2 => { - for index72 = 0; index72 < (mbt_ffi_load32((iter_base) + 12)); index72 = index72 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index72 * 68) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { - match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => () - 1 => { - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + } + _ => panic() } - _ => panic() - } - - for index70 = 0; index70 < (mbt_ffi_load32((iter_base) + 28)); index70 = index70 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index70 * 8) - mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + _ => panic() + } + + } + 3 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 10 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 11 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 12 => () + 13 => () + 14 => { + + for index72 = 0; index72 < (mbt_ffi_load32((iter_base) + 12)); index72 = index72 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index72 * 68) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + } + _ => panic() + } + + for index70 = 0; index70 < (mbt_ffi_load32((iter_base) + 28)); index70 = index70 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index70 * 8) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) + + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) for index71 = 0; index71 < (mbt_ffi_load32((iter_base) + 36)); index71 = index71 + 1 { let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index71 * 8) @@ -5769,75 +6529,775 @@ pub fn wasmExportGetToolPostReturn(p0 : Int) -> Unit { _ => panic() } -} +} + +#doc(hidden) +pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { + + let result = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 0), mbt_ffi_load32((p0) + 4)) + + let array : Array[String] = []; + for index = 0; index < (mbt_ffi_load32((p0) + 12)); index = index + 1 { + let iter_base = (mbt_ffi_load32((p0) + 8)) + (index * 8) + + let result0 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array.push(result0) + } + mbt_ffi_free(mbt_ffi_load32((p0) + 8)) + + let array196 : Array[@types.SchemaTypeNode] = []; + for index197 = 0; index197 < (mbt_ffi_load32((p0) + 20)); index197 = index197 + 1 { + let iter_base = (mbt_ffi_load32((p0) + 16)) + (index197 * 144) + + let lifted182 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { + + @types.SchemaTypeBody::BoolType + } + 2 => { + + let lifted6 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted) + } + _ => panic() + } + + let lifted3 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2) + } + _ => panic() + } + + let lifted5 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result4 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result4) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1, max : lifted3, unit : lifted5}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted6) + } + 3 => { + + let lifted13 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted8 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted7 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted7) + } + _ => panic() + } + + let lifted10 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted9 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted9) + } + _ => panic() + } + + let lifted12 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result11 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result11) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted8, max : lifted10, unit : lifted12}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted13) + } + 4 => { + + let lifted20 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted15 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted14 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted14) + } + _ => panic() + } + + let lifted17 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted16 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted16) + } + _ => panic() + } + + let lifted19 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result18 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result18) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted15, max : lifted17, unit : lifted19}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted20) + } + 5 => { + + let lifted27 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted22 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted21 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted21) + } + _ => panic() + } + + let lifted24 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted23 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted23) + } + _ => panic() + } + + let lifted26 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result25 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result25) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted22, max : lifted24, unit : lifted26}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted27) + } + 6 => { + + let lifted34 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted29 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted28 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted28) + } + _ => panic() + } + + let lifted31 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted30 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted30) + } + _ => panic() + } + + let lifted33 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result32 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result32) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted29, max : lifted31, unit : lifted33}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted34) + } + 7 => { + + let lifted41 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted36 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted35 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted35) + } + _ => panic() + } + + let lifted38 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted37 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted37) + } + _ => panic() + } + + let lifted40 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result39 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result39) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted36, max : lifted38, unit : lifted40}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted41) + } + 8 => { + + let lifted48 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted43 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted42 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted42) + } + _ => panic() + } + + let lifted45 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted44 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted44) + } + _ => panic() + } + + let lifted47 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result46 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result46) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted43, max : lifted45, unit : lifted47}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted48) + } + 9 => { + + let lifted55 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted50 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted49 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted49) + } + _ => panic() + } + + let lifted52 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted51 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted51) + } + _ => panic() + } + + let lifted54 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result53 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result53) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted50, max : lifted52, unit : lifted54}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted55) + } + 10 => { + + let lifted62 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted57 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted56 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted56) + } + _ => panic() + } + + let lifted59 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted58 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted58) + } + _ => panic() + } + + let lifted61 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result60 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result60) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted57, max : lifted59, unit : lifted61}) + } + _ => panic() + } -#doc(hidden) -pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { + @types.SchemaTypeBody::F32Type(lifted62) + } + 11 => { - let result = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 0), mbt_ffi_load32((p0) + 4)) + let lifted69 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array : Array[String] = []; - for index = 0; index < (mbt_ffi_load32((p0) + 12)); index = index + 1 { - let iter_base = (mbt_ffi_load32((p0) + 8)) + (index * 8) + let lifted64 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result0 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted63 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array.push(result0) - } - mbt_ffi_free(mbt_ffi_load32((p0) + 8)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let array126 : Array[@types.SchemaTypeNode] = []; - for index127 = 0; index127 < (mbt_ffi_load32((p0) + 20)); index127 = index127 + 1 { - let iter_base = (mbt_ffi_load32((p0) + 16)) + (index127 * 144) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted112 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { + Option::Some(lifted63) + } + _ => panic() + } - @types.SchemaTypeBody::BoolType - } - 2 => { + let lifted66 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S8Type - } - 3 => { + let lifted65 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::S16Type - } - 4 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U8Type - } - 7 => { + Option::Some(lifted65) + } + _ => panic() + } - @types.SchemaTypeBody::U16Type - } - 8 => { + let lifted68 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + let result67 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(result67) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + Option::Some(@types.NumericRestrictions::{min : lifted64, max : lifted66, unit : lifted68}) + } + _ => panic() + } - @types.SchemaTypeBody::F64Type + @types.SchemaTypeBody::F64Type(lifted69) } 12 => { @@ -5849,59 +7309,59 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } 14 => { - let array14 : Array[@types.NamedFieldType] = []; - for index15 = 0; index15 < (mbt_ffi_load32((iter_base) + 12)); index15 = index15 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index15 * 68) + let array84 : Array[@types.NamedFieldType] = []; + for index85 = 0; index85 < (mbt_ffi_load32((iter_base) + 12)); index85 = index85 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index85 * 68) - let result1 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result70 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted72 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result2 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result71 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result2) + Option::Some(result71) } _ => panic() } - let array4 : Array[String] = []; - for index5 = 0; index5 < (mbt_ffi_load32((iter_base) + 28)); index5 = index5 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index5 * 8) + let array74 : Array[String] = []; + for index75 = 0; index75 < (mbt_ffi_load32((iter_base) + 28)); index75 = index75 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index75 * 8) - let result3 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array4.push(result3) + array74.push(result73) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array7 : Array[String] = []; - for index8 = 0; index8 < (mbt_ffi_load32((iter_base) + 36)); index8 = index8 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index8 * 8) + let array77 : Array[String] = []; + for index78 = 0; index78 < (mbt_ffi_load32((iter_base) + 36)); index78 = index78 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index78 * 8) - let result6 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result76 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array7.push(result6) + array77.push(result76) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted10 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted80 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result9 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result9) + Option::Some(result79) } _ => panic() } - let lifted13 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted83 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted12 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted82 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -5916,33 +7376,33 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } 3 => { - let result11 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result11) + @types.Role::Other(result81) } _ => panic() } - Option::Some(lifted12) + Option::Some(lifted82) } _ => panic() } - array14.push(@types.NamedFieldType::{name : result1, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted, aliases : array4, examples : array7, deprecated : lifted10, role : lifted13}}) + array84.push(@types.NamedFieldType::{name : result70, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted72, aliases : array74, examples : array77, deprecated : lifted80, role : lifted83}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array14) + @types.SchemaTypeBody::RecordType(array84) } 15 => { - let array31 : Array[@types.VariantCaseType] = []; - for index32 = 0; index32 < (mbt_ffi_load32((iter_base) + 12)); index32 = index32 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index32 * 72) + let array101 : Array[@types.VariantCaseType] = []; + for index102 = 0; index102 < (mbt_ffi_load32((iter_base) + 12)); index102 = index102 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index102 * 72) - let result16 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted17 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted87 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -5951,53 +7411,53 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - let lifted19 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted89 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result18 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result18) + Option::Some(result88) } _ => panic() } - let array21 : Array[String] = []; - for index22 = 0; index22 < (mbt_ffi_load32((iter_base) + 32)); index22 = index22 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index22 * 8) + let array91 : Array[String] = []; + for index92 = 0; index92 < (mbt_ffi_load32((iter_base) + 32)); index92 = index92 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index92 * 8) - let result20 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array21.push(result20) + array91.push(result90) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array24 : Array[String] = []; - for index25 = 0; index25 < (mbt_ffi_load32((iter_base) + 40)); index25 = index25 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index25 * 8) + let array94 : Array[String] = []; + for index95 = 0; index95 < (mbt_ffi_load32((iter_base) + 40)); index95 = index95 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index95 * 8) - let result23 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array24.push(result23) + array94.push(result93) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted27 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted97 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result26 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result96 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result26) + Option::Some(result96) } _ => panic() } - let lifted30 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted100 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted29 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted99 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -6012,63 +7472,63 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } 3 => { - let result28 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result98 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result28) + @types.Role::Other(result98) } _ => panic() } - Option::Some(lifted29) + Option::Some(lifted99) } _ => panic() } - array31.push(@types.VariantCaseType::{name : result16, payload : lifted17, metadata : @types.MetadataEnvelope::{doc : lifted19, aliases : array21, examples : array24, deprecated : lifted27, role : lifted30}}) + array101.push(@types.VariantCaseType::{name : result86, payload : lifted87, metadata : @types.MetadataEnvelope::{doc : lifted89, aliases : array91, examples : array94, deprecated : lifted97, role : lifted100}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array31) + @types.SchemaTypeBody::VariantType(array101) } 16 => { - let array34 : Array[String] = []; - for index35 = 0; index35 < (mbt_ffi_load32((iter_base) + 12)); index35 = index35 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index35 * 8) + let array104 : Array[String] = []; + for index105 = 0; index105 < (mbt_ffi_load32((iter_base) + 12)); index105 = index105 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index105 * 8) - let result33 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array34.push(result33) + array104.push(result103) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array34) + @types.SchemaTypeBody::EnumType(array104) } 17 => { - let array37 : Array[String] = []; - for index38 = 0; index38 < (mbt_ffi_load32((iter_base) + 12)); index38 = index38 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index38 * 8) + let array107 : Array[String] = []; + for index108 = 0; index108 < (mbt_ffi_load32((iter_base) + 12)); index108 = index108 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index108 * 8) - let result36 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result106 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array37.push(result36) + array107.push(result106) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array37) + @types.SchemaTypeBody::FlagsType(array107) } 18 => { - let array39 : Array[Int] = []; - for index40 = 0; index40 < (mbt_ffi_load32((iter_base) + 12)); index40 = index40 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index40 * 4) + let array109 : Array[Int] = []; + for index110 = 0; index110 < (mbt_ffi_load32((iter_base) + 12)); index110 = index110 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index110 * 4) - array39.push(mbt_ffi_load32((iter_base) + 0)) + array109.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array39) + @types.SchemaTypeBody::TupleType(array109) } 19 => { @@ -6088,7 +7548,7 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } 23 => { - let lifted41 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted111 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6097,7 +7557,7 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - let lifted42 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted112 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -6106,30 +7566,30 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted41, err : lifted42}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted111, err : lifted112}) } 24 => { - let lifted46 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted116 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array44 : Array[String] = []; - for index45 = 0; index45 < (mbt_ffi_load32((iter_base) + 16)); index45 = index45 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index45 * 8) + let array114 : Array[String] = []; + for index115 = 0; index115 < (mbt_ffi_load32((iter_base) + 16)); index115 = index115 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index115 * 8) - let result43 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array44.push(result43) + array114.push(result113) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array44) + Option::Some(array114) } _ => panic() } - let lifted47 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted117 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -6138,7 +7598,7 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - let lifted48 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted118 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -6147,41 +7607,41 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - let lifted50 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted120 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result49 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result119 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result49) + Option::Some(result119) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted46, min_length : lifted47, max_length : lifted48, regex : lifted50}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted116, min_length : lifted117, max_length : lifted118, regex : lifted120}) } 25 => { - let lifted54 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted124 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array52 : Array[String] = []; - for index53 = 0; index53 < (mbt_ffi_load32((iter_base) + 16)); index53 = index53 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index53 * 8) + let array122 : Array[String] = []; + for index123 = 0; index123 < (mbt_ffi_load32((iter_base) + 16)); index123 = index123 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index123 * 8) - let result51 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array52.push(result51) + array122.push(result121) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array52) + Option::Some(array122) } _ => panic() } - let lifted55 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted125 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -6190,7 +7650,7 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - let lifted56 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted126 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -6199,91 +7659,91 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted54, min_bytes : lifted55, max_bytes : lifted56}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted124, min_bytes : lifted125, max_bytes : lifted126}) } 26 => { - let lifted60 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted130 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array58 : Array[String] = []; - for index59 = 0; index59 < (mbt_ffi_load32((iter_base) + 20)); index59 = index59 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index59 * 8) + let array128 : Array[String] = []; + for index129 = 0; index129 < (mbt_ffi_load32((iter_base) + 20)); index129 = index129 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index129 * 8) - let result57 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array58.push(result57) + array128.push(result127) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array58) + Option::Some(array128) } _ => panic() } - let lifted64 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted134 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array62 : Array[String] = []; - for index63 = 0; index63 < (mbt_ffi_load32((iter_base) + 32)); index63 = index63 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index63 * 8) + let array132 : Array[String] = []; + for index133 = 0; index133 < (mbt_ffi_load32((iter_base) + 32)); index133 = index133 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index133 * 8) - let result61 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result131 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array62.push(result61) + array132.push(result131) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array62) + Option::Some(array132) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted60, allowed_extensions : lifted64}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted130, allowed_extensions : lifted134}) } 27 => { - let lifted68 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted138 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array66 : Array[String] = []; - for index67 = 0; index67 < (mbt_ffi_load32((iter_base) + 16)); index67 = index67 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index67 * 8) + let array136 : Array[String] = []; + for index137 = 0; index137 < (mbt_ffi_load32((iter_base) + 16)); index137 = index137 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index137 * 8) - let result65 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array66.push(result65) + array136.push(result135) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array66) + Option::Some(array136) } _ => panic() } - let lifted72 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted142 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array70 : Array[String] = []; - for index71 = 0; index71 < (mbt_ffi_load32((iter_base) + 28)); index71 = index71 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index71 * 8) + let array140 : Array[String] = []; + for index141 = 0; index141 < (mbt_ffi_load32((iter_base) + 28)); index141 = index141 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index141 * 8) - let result69 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array70.push(result69) + array140.push(result139) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array70) + Option::Some(array140) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted68, allowed_hosts : lifted72}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted138, allowed_hosts : lifted142}) } 28 => { @@ -6295,148 +7755,148 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } 30 => { - let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array75 : Array[String] = []; - for index76 = 0; index76 < (mbt_ffi_load32((iter_base) + 20)); index76 = index76 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index76 * 8) + let array145 : Array[String] = []; + for index146 = 0; index146 < (mbt_ffi_load32((iter_base) + 20)); index146 = index146 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index146 * 8) - let result74 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array75.push(result74) + array145.push(result144) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted78 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted148 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result77 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result77}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result147}) } _ => panic() } - let lifted80 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted150 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result79}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result149}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result73, allowed_suffixes : array75, min : lifted78, max : lifted80}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result143, allowed_suffixes : array145, min : lifted148, max : lifted150}) } 31 => { - let array104 : Array[@types.UnionBranch] = []; - for index105 = 0; index105 < (mbt_ffi_load32((iter_base) + 12)); index105 = index105 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index105 * 92) + let array174 : Array[@types.UnionBranch] = []; + for index175 = 0; index175 < (mbt_ffi_load32((iter_base) + 12)); index175 = index175 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index175 * 92) - let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted90 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted160 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result82 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result82) + @types.DiscriminatorRule::Prefix(result152) } 1 => { - let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result83) + @types.DiscriminatorRule::Suffix(result153) } 2 => { - let result84 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result154 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result84) + @types.DiscriminatorRule::Contains(result154) } 3 => { - let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result85) + @types.DiscriminatorRule::Regex(result155) } 4 => { - let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted88 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted158 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result87) + Option::Some(result157) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result86, literal : lifted88}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result156, literal : lifted158}) } 5 => { - let result89 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result159 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result89) + @types.DiscriminatorRule::FieldAbsent(result159) } _ => panic() } - let lifted92 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted162 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result91 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result161 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result91) + Option::Some(result161) } _ => panic() } - let array94 : Array[String] = []; - for index95 = 0; index95 < (mbt_ffi_load32((iter_base) + 52)); index95 = index95 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index95 * 8) + let array164 : Array[String] = []; + for index165 = 0; index165 < (mbt_ffi_load32((iter_base) + 52)); index165 = index165 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index165 * 8) - let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result163 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array94.push(result93) + array164.push(result163) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array97 : Array[String] = []; - for index98 = 0; index98 < (mbt_ffi_load32((iter_base) + 60)); index98 = index98 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index98 * 8) + let array167 : Array[String] = []; + for index168 = 0; index168 < (mbt_ffi_load32((iter_base) + 60)); index168 = index168 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index168 * 8) - let result96 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array97.push(result96) + array167.push(result166) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted100 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted170 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result99 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result99) + Option::Some(result169) } _ => panic() } - let lifted103 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted173 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted102 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted172 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -6451,57 +7911,57 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } 3 => { - let result101 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result171 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result101) + @types.Role::Other(result171) } _ => panic() } - Option::Some(lifted102) + Option::Some(lifted172) } _ => panic() } - array104.push(@types.UnionBranch::{tag : result81, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted90, metadata : @types.MetadataEnvelope::{doc : lifted92, aliases : array94, examples : array97, deprecated : lifted100, role : lifted103}}) + array174.push(@types.UnionBranch::{tag : result151, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted160, metadata : @types.MetadataEnvelope::{doc : lifted162, aliases : array164, examples : array167, deprecated : lifted170, role : lifted173}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array104}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array174}) } 32 => { - let lifted107 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted177 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result106 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result176 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result106) + Option::Some(result176) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted107}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted177}) } 33 => { - let lifted109 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted179 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result108 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result178 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result108) + Option::Some(result178) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted109}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted179}) } 34 => { - let lifted110 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted180 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6510,11 +7970,11 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted110) + @types.SchemaTypeBody::FutureType(lifted180) } 35 => { - let lifted111 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted181 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6523,58 +7983,58 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - @types.SchemaTypeBody::StreamType(lifted111) + @types.SchemaTypeBody::StreamType(lifted181) } _ => panic() } - let lifted114 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted184 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result113) + Option::Some(result183) } _ => panic() } - let array116 : Array[String] = []; - for index117 = 0; index117 < (mbt_ffi_load32((iter_base) + 104)); index117 = index117 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index117 * 8) + let array186 : Array[String] = []; + for index187 = 0; index187 < (mbt_ffi_load32((iter_base) + 104)); index187 = index187 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index187 * 8) - let result115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array116.push(result115) + array186.push(result185) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array119 : Array[String] = []; - for index120 = 0; index120 < (mbt_ffi_load32((iter_base) + 112)); index120 = index120 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index120 * 8) + let array189 : Array[String] = []; + for index190 = 0; index190 < (mbt_ffi_load32((iter_base) + 112)); index190 = index190 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index190 * 8) - let result118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array119.push(result118) + array189.push(result188) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted122 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted192 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result191 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result121) + Option::Some(result191) } _ => panic() } - let lifted125 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted195 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted124 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted194 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -6589,48 +8049,48 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } 3 => { - let result123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result123) + @types.Role::Other(result193) } _ => panic() } - Option::Some(lifted124) + Option::Some(lifted194) } _ => panic() } - array126.push(@types.SchemaTypeNode::{body : lifted112, metadata : @types.MetadataEnvelope::{doc : lifted114, aliases : array116, examples : array119, deprecated : lifted122, role : lifted125}}) + array196.push(@types.SchemaTypeNode::{body : lifted182, metadata : @types.MetadataEnvelope::{doc : lifted184, aliases : array186, examples : array189, deprecated : lifted192, role : lifted195}}) } mbt_ffi_free(mbt_ffi_load32((p0) + 16)) - let array131 : Array[@types.SchemaTypeDef] = []; - for index132 = 0; index132 < (mbt_ffi_load32((p0) + 28)); index132 = index132 + 1 { - let iter_base = (mbt_ffi_load32((p0) + 24)) + (index132 * 24) + let array201 : Array[@types.SchemaTypeDef] = []; + for index202 = 0; index202 < (mbt_ffi_load32((p0) + 28)); index202 = index202 + 1 { + let iter_base = (mbt_ffi_load32((p0) + 24)) + (index202 * 24) - let result128 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result198 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted130 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted200 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result199 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result129) + Option::Some(result199) } _ => panic() } - array131.push(@types.SchemaTypeDef::{id : result128, name : lifted130, body : mbt_ffi_load32((iter_base) + 20)}) + array201.push(@types.SchemaTypeDef::{id : result198, name : lifted200, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((p0) + 24)) - let array163 : Array[@types.SchemaValueNode] = []; - for index164 = 0; index164 < (mbt_ffi_load32((p0) + 40)); index164 = index164 + 1 { - let iter_base = (mbt_ffi_load32((p0) + 36)) + (index164 * 32) + let array233 : Array[@types.SchemaValueNode] = []; + for index234 = 0; index234 < (mbt_ffi_load32((p0) + 40)); index234 = index234 + 1 { + let iter_base = (mbt_ffi_load32((p0) + 36)) + (index234 * 32) - let lifted162 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted232 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -6681,25 +8141,25 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } 12 => { - let result133 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result203 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result133) + @types.SchemaValueNode::StringValue(result203) } 13 => { - let array134 : Array[Int] = []; - for index135 = 0; index135 < (mbt_ffi_load32((iter_base) + 12)); index135 = index135 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index135 * 4) + let array204 : Array[Int] = []; + for index205 = 0; index205 < (mbt_ffi_load32((iter_base) + 12)); index205 = index205 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index205 * 4) - array134.push(mbt_ffi_load32((iter_base) + 0)) + array204.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array134) + @types.SchemaValueNode::RecordValue(array204) } 14 => { - let lifted136 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted206 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6708,7 +8168,7 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted136}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted206}) } 15 => { @@ -6716,67 +8176,67 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } 16 => { - let array137 : Array[Bool] = []; - for index138 = 0; index138 < (mbt_ffi_load32((iter_base) + 12)); index138 = index138 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index138 * 1) + let array207 : Array[Bool] = []; + for index208 = 0; index208 < (mbt_ffi_load32((iter_base) + 12)); index208 = index208 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index208 * 1) - array137.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array207.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array137) + @types.SchemaValueNode::FlagsValue(array207) } 17 => { - let array139 : Array[Int] = []; - for index140 = 0; index140 < (mbt_ffi_load32((iter_base) + 12)); index140 = index140 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index140 * 4) + let array209 : Array[Int] = []; + for index210 = 0; index210 < (mbt_ffi_load32((iter_base) + 12)); index210 = index210 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index210 * 4) - array139.push(mbt_ffi_load32((iter_base) + 0)) + array209.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array139) + @types.SchemaValueNode::TupleValue(array209) } 18 => { - let array141 : Array[Int] = []; - for index142 = 0; index142 < (mbt_ffi_load32((iter_base) + 12)); index142 = index142 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index142 * 4) + let array211 : Array[Int] = []; + for index212 = 0; index212 < (mbt_ffi_load32((iter_base) + 12)); index212 = index212 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index212 * 4) - array141.push(mbt_ffi_load32((iter_base) + 0)) + array211.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array141) + @types.SchemaValueNode::ListValue(array211) } 19 => { - let array143 : Array[Int] = []; - for index144 = 0; index144 < (mbt_ffi_load32((iter_base) + 12)); index144 = index144 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index144 * 4) + let array213 : Array[Int] = []; + for index214 = 0; index214 < (mbt_ffi_load32((iter_base) + 12)); index214 = index214 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index214 * 4) - array143.push(mbt_ffi_load32((iter_base) + 0)) + array213.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array143) + @types.SchemaValueNode::FixedListValue(array213) } 20 => { - let array145 : Array[@types.MapEntry] = []; - for index146 = 0; index146 < (mbt_ffi_load32((iter_base) + 12)); index146 = index146 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index146 * 8) + let array215 : Array[@types.MapEntry] = []; + for index216 = 0; index216 < (mbt_ffi_load32((iter_base) + 12)); index216 = index216 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index216 * 8) - array145.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array215.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array145) + @types.SchemaValueNode::MapValue(array215) } 21 => { - let lifted147 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted217 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6785,14 +8245,14 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted147) + @types.SchemaValueNode::OptionValue(lifted217) } 22 => { - let lifted150 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted220 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted148 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted218 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6801,11 +8261,11 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - @types.ResultValuePayload::OkValue(lifted148) + @types.ResultValuePayload::OkValue(lifted218) } 1 => { - let lifted149 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted219 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6814,58 +8274,58 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted149) + @types.ResultValuePayload::ErrValue(lifted219) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted150) + @types.SchemaValueNode::ResultValue(lifted220) } 23 => { - let result151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result221 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted153 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted223 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result222 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result152) + Option::Some(result222) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result151, language : lifted153}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result221, language : lifted223}) } 24 => { - let result154 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result224 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted156 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted226 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result155) + Option::Some(result225) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result154, mime_type : lifted156}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result224, mime_type : lifted226}) } 25 => { - let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result157) + @types.SchemaValueNode::PathValue(result227) } 26 => { - let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result158) + @types.SchemaValueNode::UrlValue(result228) } 27 => { @@ -6877,21 +8337,21 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { } 29 => { - let result159 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result229 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result159}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result229}) } 30 => { - let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result160, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result230, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result161 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result161}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result231}) } 32 => { @@ -6900,11 +8360,11 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - array163.push(lifted162) + array233.push(lifted232) } mbt_ffi_free(mbt_ffi_load32((p0) + 36)) - let lifted165 : @streams.InputStream? = match mbt_ffi_load8_u((p0) + 48) { + let lifted235 : @streams.InputStream? = match mbt_ffi_load8_u((p0) + 48) { 0 => Option::None 1 => { @@ -6913,36 +8373,36 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - let lifted183 = match (mbt_ffi_load8_u((p0) + 56)) { + let lifted253 = match (mbt_ffi_load8_u((p0) + 56)) { 0 => { - let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 64), mbt_ffi_load32((p0) + 68)) + let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 64), mbt_ffi_load32((p0) + 68)) - let result167 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 72), mbt_ffi_load32((p0) + 76)) + let result237 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 72), mbt_ffi_load32((p0) + 76)) - let lifted169 : String? = match mbt_ffi_load8_u((p0) + 80) { + let lifted239 : String? = match mbt_ffi_load8_u((p0) + 80) { 0 => Option::None 1 => { - let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 84), mbt_ffi_load32((p0) + 88)) + let result238 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 84), mbt_ffi_load32((p0) + 88)) - Option::Some(result168) + Option::Some(result238) } _ => panic() } - let lifted171 : String? = match mbt_ffi_load8_u((p0) + 92) { + let lifted241 : String? = match mbt_ffi_load8_u((p0) + 92) { 0 => Option::None 1 => { - let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 96), mbt_ffi_load32((p0) + 100)) + let result240 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 96), mbt_ffi_load32((p0) + 100)) - Option::Some(result170) + Option::Some(result240) } _ => panic() } - let lifted172 : Bool? = match mbt_ffi_load8_u((p0) + 104) { + let lifted242 : Bool? = match mbt_ffi_load8_u((p0) + 104) { 0 => Option::None 1 => { @@ -6951,59 +8411,59 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - let lifted174 : String? = match mbt_ffi_load8_u((p0) + 108) { + let lifted244 : String? = match mbt_ffi_load8_u((p0) + 108) { 0 => Option::None 1 => { - let result173 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 112), mbt_ffi_load32((p0) + 116)) + let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 112), mbt_ffi_load32((p0) + 116)) - Option::Some(result173) + Option::Some(result243) } _ => panic() } - let lifted176 : String? = match mbt_ffi_load8_u((p0) + 120) { + let lifted246 : String? = match mbt_ffi_load8_u((p0) + 120) { 0 => Option::None 1 => { - let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 124), mbt_ffi_load32((p0) + 128)) + let result245 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 124), mbt_ffi_load32((p0) + 128)) - Option::Some(result175) + Option::Some(result245) } _ => panic() } - let lifted178 : String? = match mbt_ffi_load8_u((p0) + 132) { + let lifted248 : String? = match mbt_ffi_load8_u((p0) + 132) { 0 => Option::None 1 => { - let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 136), mbt_ffi_load32((p0) + 140)) + let result247 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 136), mbt_ffi_load32((p0) + 140)) - Option::Some(result177) + Option::Some(result247) } _ => panic() } - let lifted180 : String? = match mbt_ffi_load8_u((p0) + 144) { + let lifted250 : String? = match mbt_ffi_load8_u((p0) + 144) { 0 => Option::None 1 => { - let result179 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 148), mbt_ffi_load32((p0) + 152)) + let result249 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 148), mbt_ffi_load32((p0) + 152)) - Option::Some(result179) + Option::Some(result249) } _ => panic() } - let result181 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 156), mbt_ffi_load32((p0) + 160)) + let result251 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 156), mbt_ffi_load32((p0) + 160)) - @common0.Principal::Oidc(@common0.OidcPrincipal::{sub : result166, issuer : result167, email : lifted169, name : lifted171, email_verified : lifted172, given_name : lifted174, family_name : lifted176, picture : lifted178, preferred_username : lifted180, claims : result181}) + @common0.Principal::Oidc(@common0.OidcPrincipal::{sub : result236, issuer : result237, email : lifted239, name : lifted241, email_verified : lifted242, given_name : lifted244, family_name : lifted246, picture : lifted248, preferred_username : lifted250, claims : result251}) } 1 => { - let result182 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 80), mbt_ffi_load32((p0) + 84)) + let result252 = mbt_ffi_ptr2str(mbt_ffi_load32((p0) + 80), mbt_ffi_load32((p0) + 84)) - @common0.Principal::Agent(@common0.AgentPrincipal::{agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((p0) + 64)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((p0) + 72)).reinterpret_as_uint64()}}, agent_id : result182}}) + @common0.Principal::Agent(@common0.AgentPrincipal::{agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((p0) + 64)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((p0) + 72)).reinterpret_as_uint64()}}, agent_id : result252}}) } 2 => { @@ -7016,20 +8476,20 @@ pub fn wasmExportInvokeGolemToolGuest(p0 : Int) -> Int { _ => panic() } - let (result184) : (Result[@common.InvocationResult, @common.ToolError]) = invoke(result, array, @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array126, defs : array131, root : mbt_ffi_load32((p0) + 32)}, value : @types.SchemaValueTree::{value_nodes : array163, root : mbt_ffi_load32((p0) + 44)}}, lifted165, lifted183); + let (result254) : (Result[@common.InvocationResult, @common.ToolError]) = invoke(result, array, @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array196, defs : array201, root : mbt_ffi_load32((p0) + 32)}, value : @types.SchemaValueTree::{value_nodes : array233, root : mbt_ffi_load32((p0) + 44)}}, lifted235, lifted253); mbt_ffi_free(p0) let return_area = mbt_ffi_malloc(48) - match result184 { + match result254 { Ok(payload) => { mbt_ffi_store8((return_area) + 0, (0)) - __wit_bindgen_lower_t522((return_area) + 4, payload) + __wit_bindgen_lower_t528((return_area) + 4, payload) () } - Err(payload185) => { + Err(payload255) => { mbt_ffi_store8((return_area) + 0, (1)) - __wit_bindgen_lower_t518((return_area) + 4, payload185) + __wit_bindgen_lower_t524((return_area) + 4, payload255) () } @@ -7049,22 +8509,212 @@ pub fn wasmExportInvokeGolemToolGuestPostReturn(p0 : Int) -> Unit { 0 => () 1 => { - for index19 = 0; index19 < (mbt_ffi_load32((p0) + 12)); index19 = index19 + 1 { - let iter_base = (mbt_ffi_load32((p0) + 8)) + (index19 * 144) + for index19 = 0; index19 < (mbt_ffi_load32((p0) + 12)); index19 = index19 + 1 { + let iter_base = (mbt_ffi_load32((p0) + 8)) + (index19 * 144) + + match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => () + 1 => () + 2 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 3 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 10 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 11 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } - match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => () - 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () + } + _ => panic() + } + + } 12 => () 13 => () 14 => { @@ -7702,16 +9352,206 @@ pub fn wasmExportInvokeGolemToolGuestPostReturn(p0 : Int) -> Unit { match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => () 1 => () - 2 => () - 3 => () - 4 => () - 5 => () - 6 => () - 7 => () - 8 => () - 9 => () - 10 => () - 11 => () + 2 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 3 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 4 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 5 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 6 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 7 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 8 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 9 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 10 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } + 11 => { + + match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => () + 1 => { + + match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => () + 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + } + _ => panic() + } + + } + _ => panic() + } + + } 12 => () 13 => () 14 => { @@ -8512,9 +10352,68 @@ fn __wit_bindgen_lower_t24(ptr : Int, value : @types.MapSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t25(ptr : Int, value : @types.ResultSpec) -> Unit { +fn __wit_bindgen_lower_t25(ptr : Int, value : @types.ResultSpec) -> Unit { + + match ((value).ok) { + None => { + mbt_ffi_store8((ptr) + 0, (0)) + + () + } + Some(payload0) => { + mbt_ffi_store8((ptr) + 0, (1)) + mbt_ffi_store32((ptr) + 4, payload0) + + () + } + } + + match ((value).err) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload2) => { + mbt_ffi_store8((ptr) + 8, (1)) + mbt_ffi_store32((ptr) + 12, payload2) + + () + } + } + +} + +#doc(hidden) +fn __wit_bindgen_lower_t26(ptr : Int, value : @types.NumericBound) -> Unit { + + match value { + Signed(payload) => { + mbt_ffi_store8((ptr) + 0, (0)) + mbt_ffi_store64((ptr) + 8, payload) + + () + } + Unsigned(payload0) => { + mbt_ffi_store8((ptr) + 0, (1)) + mbt_ffi_store64((ptr) + 8, (payload0).reinterpret_as_int64()) + + () + } + FloatBits(payload1) => { + mbt_ffi_store8((ptr) + 0, (2)) + mbt_ffi_store64((ptr) + 8, (payload1).reinterpret_as_int64()) + + () + } + } + +} + +#doc(hidden) +fn __wit_bindgen_lower_t28(ptr : Int, value : @types.NumericRestrictions) -> Unit { - match ((value).ok) { + match ((value).min) { None => { mbt_ffi_store8((ptr) + 0, (0)) @@ -8522,21 +10421,38 @@ fn __wit_bindgen_lower_t25(ptr : Int, value : @types.ResultSpec) -> Unit { } Some(payload0) => { mbt_ffi_store8((ptr) + 0, (1)) - mbt_ffi_store32((ptr) + 4, payload0) + __wit_bindgen_lower_t26((ptr) + 8, payload0) () } } - match ((value).err) { + match ((value).max) { None => { - mbt_ffi_store8((ptr) + 8, (0)) + mbt_ffi_store8((ptr) + 24, (0)) () } Some(payload2) => { - mbt_ffi_store8((ptr) + 8, (1)) - mbt_ffi_store32((ptr) + 12, payload2) + mbt_ffi_store8((ptr) + 24, (1)) + __wit_bindgen_lower_t26((ptr) + 32, payload2) + + () + } + } + + match ((value).unit) { + None => { + mbt_ffi_store8((ptr) + 48, (0)) + + () + } + Some(payload4) => { + mbt_ffi_store8((ptr) + 48, (1)) + + let ptr5 = mbt_ffi_str2ptr(payload4) + mbt_ffi_store32((ptr) + 56, payload4.length()) + mbt_ffi_store32((ptr) + 52, ptr5) () } @@ -8545,7 +10461,7 @@ fn __wit_bindgen_lower_t25(ptr : Int, value : @types.ResultSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t28(ptr : Int, value : @types.TextRestrictions) -> Unit { +fn __wit_bindgen_lower_t31(ptr : Int, value : @types.TextRestrictions) -> Unit { match ((value).languages) { None => { @@ -8621,7 +10537,7 @@ fn __wit_bindgen_lower_t28(ptr : Int, value : @types.TextRestrictions) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t29(ptr : Int, value : @types.BinaryRestrictions) -> Unit { +fn __wit_bindgen_lower_t32(ptr : Int, value : @types.BinaryRestrictions) -> Unit { match ((value).mime_types) { None => { @@ -8680,7 +10596,7 @@ fn __wit_bindgen_lower_t29(ptr : Int, value : @types.BinaryRestrictions) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t32(ptr : Int, value : @types.PathSpec) -> Unit { +fn __wit_bindgen_lower_t35(ptr : Int, value : @types.PathSpec) -> Unit { mbt_ffi_store8((ptr) + 0, (value).direction.ordinal()) mbt_ffi_store8((ptr) + 1, (value).kind.ordinal()) @@ -8739,7 +10655,7 @@ fn __wit_bindgen_lower_t32(ptr : Int, value : @types.PathSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t33(ptr : Int, value : @types.UrlRestrictions) -> Unit { +fn __wit_bindgen_lower_t36(ptr : Int, value : @types.UrlRestrictions) -> Unit { match ((value).allowed_schemes) { None => { @@ -8796,7 +10712,7 @@ fn __wit_bindgen_lower_t33(ptr : Int, value : @types.UrlRestrictions) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t34(ptr : Int, value : @types.QuantityValue) -> Unit { +fn __wit_bindgen_lower_t37(ptr : Int, value : @types.QuantityValue) -> Unit { mbt_ffi_store64((ptr) + 0, (value).mantissa) mbt_ffi_store32((ptr) + 8, (value).scale) @@ -8807,7 +10723,7 @@ fn __wit_bindgen_lower_t34(ptr : Int, value : @types.QuantityValue) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t36(ptr : Int, value : @types.QuantitySpec) -> Unit { +fn __wit_bindgen_lower_t39(ptr : Int, value : @types.QuantitySpec) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).base_unit) mbt_ffi_store32((ptr) + 4, (value).base_unit.length()) @@ -8834,7 +10750,7 @@ fn __wit_bindgen_lower_t36(ptr : Int, value : @types.QuantitySpec) -> Unit { } Some(payload2) => { mbt_ffi_store8((ptr) + 16, (1)) - __wit_bindgen_lower_t34((ptr) + 24, payload2) + __wit_bindgen_lower_t37((ptr) + 24, payload2) () } @@ -8848,7 +10764,7 @@ fn __wit_bindgen_lower_t36(ptr : Int, value : @types.QuantitySpec) -> Unit { } Some(payload4) => { mbt_ffi_store8((ptr) + 48, (1)) - __wit_bindgen_lower_t34((ptr) + 56, payload4) + __wit_bindgen_lower_t37((ptr) + 56, payload4) () } @@ -8857,7 +10773,7 @@ fn __wit_bindgen_lower_t36(ptr : Int, value : @types.QuantitySpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t37(ptr : Int, value : @types.FieldDiscriminator) -> Unit { +fn __wit_bindgen_lower_t40(ptr : Int, value : @types.FieldDiscriminator) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).field_name) mbt_ffi_store32((ptr) + 4, (value).field_name.length()) @@ -8883,7 +10799,7 @@ fn __wit_bindgen_lower_t37(ptr : Int, value : @types.FieldDiscriminator) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t38(ptr : Int, value : @types.DiscriminatorRule) -> Unit { +fn __wit_bindgen_lower_t41(ptr : Int, value : @types.DiscriminatorRule) -> Unit { match value { Prefix(payload) => { @@ -8924,7 +10840,7 @@ fn __wit_bindgen_lower_t38(ptr : Int, value : @types.DiscriminatorRule) -> Unit } FieldEquals(payload7) => { mbt_ffi_store8((ptr) + 0, (4)) - __wit_bindgen_lower_t37((ptr) + 4, payload7) + __wit_bindgen_lower_t40((ptr) + 4, payload7) () } @@ -8942,25 +10858,25 @@ fn __wit_bindgen_lower_t38(ptr : Int, value : @types.DiscriminatorRule) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t39(ptr : Int, value : @types.UnionBranch) -> Unit { +fn __wit_bindgen_lower_t42(ptr : Int, value : @types.UnionBranch) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).tag) mbt_ffi_store32((ptr) + 4, (value).tag.length()) mbt_ffi_store32((ptr) + 0, ptr0) mbt_ffi_store32((ptr) + 8, (value).body) - __wit_bindgen_lower_t38((ptr) + 12, (value).discriminator) + __wit_bindgen_lower_t41((ptr) + 12, (value).discriminator) __wit_bindgen_lower_t19((ptr) + 36, (value).metadata) } #doc(hidden) -fn __wit_bindgen_lower_t41(ptr : Int, value : @types.UnionSpec) -> Unit { +fn __wit_bindgen_lower_t44(ptr : Int, value : @types.UnionSpec) -> Unit { let address = mbt_ffi_malloc(((value).branches).length() * 92); for index = 0; index < ((value).branches).length(); index = index + 1 { let iter_elem : @types.UnionBranch = ((value).branches)[(index)] let iter_base = address + (index * 92); - __wit_bindgen_lower_t39((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t42((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 4, ((value).branches).length()) @@ -8969,7 +10885,7 @@ fn __wit_bindgen_lower_t41(ptr : Int, value : @types.UnionSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t42(ptr : Int, value : @types.SecretSpec) -> Unit { +fn __wit_bindgen_lower_t45(ptr : Int, value : @types.SecretSpec) -> Unit { match ((value).category) { None => { @@ -8991,7 +10907,7 @@ fn __wit_bindgen_lower_t42(ptr : Int, value : @types.SecretSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t43(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { +fn __wit_bindgen_lower_t46(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { match ((value).resource_name) { None => { @@ -9013,7 +10929,7 @@ fn __wit_bindgen_lower_t43(ptr : Int, value : @types.QuotaTokenSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { +fn __wit_bindgen_lower_t51(ptr : Int, value : @types.SchemaTypeBody) -> Unit { match value { RefType(payload) => { @@ -9027,54 +10943,194 @@ fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { () } - S8Type => { + S8Type(payload1) => { mbt_ffi_store8((ptr) + 0, (2)) + match (payload1) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload3) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload3) + + () + } + } + () } - S16Type => { + S16Type(payload4) => { mbt_ffi_store8((ptr) + 0, (3)) + match (payload4) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload6) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload6) + + () + } + } + () } - S32Type => { + S32Type(payload7) => { mbt_ffi_store8((ptr) + 0, (4)) + match (payload7) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload9) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload9) + + () + } + } + () } - S64Type => { + S64Type(payload10) => { mbt_ffi_store8((ptr) + 0, (5)) + match (payload10) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload12) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload12) + + () + } + } + () } - U8Type => { + U8Type(payload13) => { mbt_ffi_store8((ptr) + 0, (6)) + match (payload13) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload15) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload15) + + () + } + } + () } - U16Type => { + U16Type(payload16) => { mbt_ffi_store8((ptr) + 0, (7)) + match (payload16) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload18) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload18) + + () + } + } + () } - U32Type => { + U32Type(payload19) => { mbt_ffi_store8((ptr) + 0, (8)) + match (payload19) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload21) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload21) + + () + } + } + () } - U64Type => { + U64Type(payload22) => { mbt_ffi_store8((ptr) + 0, (9)) + match (payload22) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload24) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload24) + + () + } + } + () } - F32Type => { + F32Type(payload25) => { mbt_ffi_store8((ptr) + 0, (10)) + match (payload25) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload27) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload27) + + () + } + } + () } - F64Type => { + F64Type(payload28) => { mbt_ffi_store8((ptr) + 0, (11)) + match (payload28) { + None => { + mbt_ffi_store8((ptr) + 8, (0)) + + () + } + Some(payload30) => { + mbt_ffi_store8((ptr) + 8, (1)) + __wit_bindgen_lower_t28((ptr) + 16, payload30) + + () + } + } + () } CharType => { @@ -9087,138 +11143,138 @@ fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { () } - RecordType(payload13) => { + RecordType(payload33) => { mbt_ffi_store8((ptr) + 0, (14)) - let address = mbt_ffi_malloc((payload13).length() * 68); - for index = 0; index < (payload13).length(); index = index + 1 { - let iter_elem : @types.NamedFieldType = (payload13)[(index)] + let address = mbt_ffi_malloc((payload33).length() * 68); + for index = 0; index < (payload33).length(); index = index + 1 { + let iter_elem : @types.NamedFieldType = (payload33)[(index)] let iter_base = address + (index * 68); __wit_bindgen_lower_t20((iter_base) + 0, iter_elem) } - mbt_ffi_store32((ptr) + 12, (payload13).length()) + mbt_ffi_store32((ptr) + 12, (payload33).length()) mbt_ffi_store32((ptr) + 8, address) () } - VariantType(payload14) => { + VariantType(payload34) => { mbt_ffi_store8((ptr) + 0, (15)) - let address15 = mbt_ffi_malloc((payload14).length() * 72); - for index16 = 0; index16 < (payload14).length(); index16 = index16 + 1 { - let iter_elem : @types.VariantCaseType = (payload14)[(index16)] - let iter_base = address15 + (index16 * 72); + let address35 = mbt_ffi_malloc((payload34).length() * 72); + for index36 = 0; index36 < (payload34).length(); index36 = index36 + 1 { + let iter_elem : @types.VariantCaseType = (payload34)[(index36)] + let iter_base = address35 + (index36 * 72); __wit_bindgen_lower_t22((iter_base) + 0, iter_elem) } - mbt_ffi_store32((ptr) + 12, (payload14).length()) - mbt_ffi_store32((ptr) + 8, address15) + mbt_ffi_store32((ptr) + 12, (payload34).length()) + mbt_ffi_store32((ptr) + 8, address35) () } - EnumType(payload17) => { + EnumType(payload37) => { mbt_ffi_store8((ptr) + 0, (16)) - let address19 = mbt_ffi_malloc((payload17).length() * 8); - for index20 = 0; index20 < (payload17).length(); index20 = index20 + 1 { - let iter_elem : String = (payload17)[(index20)] - let iter_base = address19 + (index20 * 8); + let address39 = mbt_ffi_malloc((payload37).length() * 8); + for index40 = 0; index40 < (payload37).length(); index40 = index40 + 1 { + let iter_elem : String = (payload37)[(index40)] + let iter_base = address39 + (index40 * 8); - let ptr18 = mbt_ffi_str2ptr(iter_elem) + let ptr38 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr18) + mbt_ffi_store32((iter_base) + 0, ptr38) } - mbt_ffi_store32((ptr) + 12, (payload17).length()) - mbt_ffi_store32((ptr) + 8, address19) + mbt_ffi_store32((ptr) + 12, (payload37).length()) + mbt_ffi_store32((ptr) + 8, address39) () } - FlagsType(payload21) => { + FlagsType(payload41) => { mbt_ffi_store8((ptr) + 0, (17)) - let address23 = mbt_ffi_malloc((payload21).length() * 8); - for index24 = 0; index24 < (payload21).length(); index24 = index24 + 1 { - let iter_elem : String = (payload21)[(index24)] - let iter_base = address23 + (index24 * 8); + let address43 = mbt_ffi_malloc((payload41).length() * 8); + for index44 = 0; index44 < (payload41).length(); index44 = index44 + 1 { + let iter_elem : String = (payload41)[(index44)] + let iter_base = address43 + (index44 * 8); - let ptr22 = mbt_ffi_str2ptr(iter_elem) + let ptr42 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr22) + mbt_ffi_store32((iter_base) + 0, ptr42) } - mbt_ffi_store32((ptr) + 12, (payload21).length()) - mbt_ffi_store32((ptr) + 8, address23) + mbt_ffi_store32((ptr) + 12, (payload41).length()) + mbt_ffi_store32((ptr) + 8, address43) () } - TupleType(payload25) => { + TupleType(payload45) => { mbt_ffi_store8((ptr) + 0, (18)) - let address26 = mbt_ffi_malloc((payload25).length() * 4); - for index27 = 0; index27 < (payload25).length(); index27 = index27 + 1 { - let iter_elem : Int = (payload25)[(index27)] - let iter_base = address26 + (index27 * 4); + let address46 = mbt_ffi_malloc((payload45).length() * 4); + for index47 = 0; index47 < (payload45).length(); index47 = index47 + 1 { + let iter_elem : Int = (payload45)[(index47)] + let iter_base = address46 + (index47 * 4); mbt_ffi_store32((iter_base) + 0, iter_elem) } - mbt_ffi_store32((ptr) + 12, (payload25).length()) - mbt_ffi_store32((ptr) + 8, address26) + mbt_ffi_store32((ptr) + 12, (payload45).length()) + mbt_ffi_store32((ptr) + 8, address46) () } - ListType(payload28) => { + ListType(payload48) => { mbt_ffi_store8((ptr) + 0, (19)) - mbt_ffi_store32((ptr) + 8, payload28) + mbt_ffi_store32((ptr) + 8, payload48) () } - FixedListType(payload29) => { + FixedListType(payload49) => { mbt_ffi_store8((ptr) + 0, (20)) - __wit_bindgen_lower_t23((ptr) + 8, payload29) + __wit_bindgen_lower_t23((ptr) + 8, payload49) () } - MapType(payload30) => { + MapType(payload50) => { mbt_ffi_store8((ptr) + 0, (21)) - __wit_bindgen_lower_t24((ptr) + 8, payload30) + __wit_bindgen_lower_t24((ptr) + 8, payload50) () } - OptionType(payload31) => { + OptionType(payload51) => { mbt_ffi_store8((ptr) + 0, (22)) - mbt_ffi_store32((ptr) + 8, payload31) + mbt_ffi_store32((ptr) + 8, payload51) () } - ResultType(payload32) => { + ResultType(payload52) => { mbt_ffi_store8((ptr) + 0, (23)) - __wit_bindgen_lower_t25((ptr) + 8, payload32) + __wit_bindgen_lower_t25((ptr) + 8, payload52) () } - TextType(payload33) => { + TextType(payload53) => { mbt_ffi_store8((ptr) + 0, (24)) - __wit_bindgen_lower_t28((ptr) + 8, payload33) + __wit_bindgen_lower_t31((ptr) + 8, payload53) () } - BinaryType(payload34) => { + BinaryType(payload54) => { mbt_ffi_store8((ptr) + 0, (25)) - __wit_bindgen_lower_t29((ptr) + 8, payload34) + __wit_bindgen_lower_t32((ptr) + 8, payload54) () } - PathType(payload35) => { + PathType(payload55) => { mbt_ffi_store8((ptr) + 0, (26)) - __wit_bindgen_lower_t32((ptr) + 8, payload35) + __wit_bindgen_lower_t35((ptr) + 8, payload55) () } - UrlType(payload36) => { + UrlType(payload56) => { mbt_ffi_store8((ptr) + 0, (27)) - __wit_bindgen_lower_t33((ptr) + 8, payload36) + __wit_bindgen_lower_t36((ptr) + 8, payload56) () } @@ -9232,42 +11288,42 @@ fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { () } - QuantityType(payload39) => { + QuantityType(payload59) => { mbt_ffi_store8((ptr) + 0, (30)) - __wit_bindgen_lower_t36((ptr) + 8, payload39) + __wit_bindgen_lower_t39((ptr) + 8, payload59) () } - UnionType(payload40) => { + UnionType(payload60) => { mbt_ffi_store8((ptr) + 0, (31)) - __wit_bindgen_lower_t41((ptr) + 8, payload40) + __wit_bindgen_lower_t44((ptr) + 8, payload60) () } - SecretType(payload41) => { + SecretType(payload61) => { mbt_ffi_store8((ptr) + 0, (32)) - __wit_bindgen_lower_t42((ptr) + 8, payload41) + __wit_bindgen_lower_t45((ptr) + 8, payload61) () } - QuotaTokenType(payload42) => { + QuotaTokenType(payload62) => { mbt_ffi_store8((ptr) + 0, (33)) - __wit_bindgen_lower_t43((ptr) + 8, payload42) + __wit_bindgen_lower_t46((ptr) + 8, payload62) () } - FutureType(payload43) => { + FutureType(payload63) => { mbt_ffi_store8((ptr) + 0, (34)) - match (payload43) { + match (payload63) { None => { mbt_ffi_store8((ptr) + 8, (0)) () } - Some(payload45) => { + Some(payload65) => { mbt_ffi_store8((ptr) + 8, (1)) - mbt_ffi_store32((ptr) + 12, payload45) + mbt_ffi_store32((ptr) + 12, payload65) () } @@ -9275,18 +11331,18 @@ fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { () } - StreamType(payload46) => { + StreamType(payload66) => { mbt_ffi_store8((ptr) + 0, (35)) - match (payload46) { + match (payload66) { None => { mbt_ffi_store8((ptr) + 8, (0)) () } - Some(payload48) => { + Some(payload68) => { mbt_ffi_store8((ptr) + 8, (1)) - mbt_ffi_store32((ptr) + 12, payload48) + mbt_ffi_store32((ptr) + 12, payload68) () } @@ -9299,20 +11355,20 @@ fn __wit_bindgen_lower_t47(ptr : Int, value : @types.SchemaTypeBody) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t48(ptr : Int, value : @types.SchemaTypeNode) -> Unit { - __wit_bindgen_lower_t47((ptr) + 0, (value).body) +fn __wit_bindgen_lower_t52(ptr : Int, value : @types.SchemaTypeNode) -> Unit { + __wit_bindgen_lower_t51((ptr) + 0, (value).body) __wit_bindgen_lower_t19((ptr) + 88, (value).metadata) } #doc(hidden) -fn __wit_bindgen_lower_t51(ptr : Int, value : @types.SchemaGraph) -> Unit { +fn __wit_bindgen_lower_t55(ptr : Int, value : @types.SchemaGraph) -> Unit { let address = mbt_ffi_malloc(((value).type_nodes).length() * 144); for index = 0; index < ((value).type_nodes).length(); index = index + 1 { let iter_elem : @types.SchemaTypeNode = ((value).type_nodes)[(index)] let iter_base = address + (index * 144); - __wit_bindgen_lower_t48((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t52((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 4, ((value).type_nodes).length()) @@ -9332,7 +11388,7 @@ fn __wit_bindgen_lower_t51(ptr : Int, value : @types.SchemaGraph) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t53(ptr : Int, value : @types.VariantValuePayload) -> Unit { +fn __wit_bindgen_lower_t57(ptr : Int, value : @types.VariantValuePayload) -> Unit { mbt_ffi_store32((ptr) + 0, ((value).case).reinterpret_as_int()) match ((value).payload) { @@ -9352,14 +11408,14 @@ fn __wit_bindgen_lower_t53(ptr : Int, value : @types.VariantValuePayload) -> Uni } #doc(hidden) -fn __wit_bindgen_lower_t54(ptr : Int, value : @types.MapEntry) -> Unit { +fn __wit_bindgen_lower_t58(ptr : Int, value : @types.MapEntry) -> Unit { mbt_ffi_store32((ptr) + 0, (value).key) mbt_ffi_store32((ptr) + 4, (value).value) } #doc(hidden) -fn __wit_bindgen_lower_t55(ptr : Int, value : @types.ResultValuePayload) -> Unit { +fn __wit_bindgen_lower_t59(ptr : Int, value : @types.ResultValuePayload) -> Unit { match value { OkValue(payload) => { @@ -9405,7 +11461,7 @@ fn __wit_bindgen_lower_t55(ptr : Int, value : @types.ResultValuePayload) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t56(ptr : Int, value : @types.TextValuePayload) -> Unit { +fn __wit_bindgen_lower_t60(ptr : Int, value : @types.TextValuePayload) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).text) mbt_ffi_store32((ptr) + 4, (value).text.length()) @@ -9431,7 +11487,7 @@ fn __wit_bindgen_lower_t56(ptr : Int, value : @types.TextValuePayload) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t58(ptr : Int, value : @types.BinaryValuePayload) -> Unit { +fn __wit_bindgen_lower_t62(ptr : Int, value : @types.BinaryValuePayload) -> Unit { let ptr0 = mbt_ffi_bytes2ptr((value).bytes) @@ -9458,13 +11514,13 @@ fn __wit_bindgen_lower_t58(ptr : Int, value : @types.BinaryValuePayload) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t59(ptr : Int, value : @types.DurationValuePayload) -> Unit { +fn __wit_bindgen_lower_t63(ptr : Int, value : @types.DurationValuePayload) -> Unit { mbt_ffi_store64((ptr) + 0, (value).nanoseconds) } #doc(hidden) -fn __wit_bindgen_lower_t60(ptr : Int, value : @types.UnionValuePayload) -> Unit { +fn __wit_bindgen_lower_t64(ptr : Int, value : @types.UnionValuePayload) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).tag) mbt_ffi_store32((ptr) + 4, (value).tag.length()) @@ -9474,7 +11530,7 @@ fn __wit_bindgen_lower_t60(ptr : Int, value : @types.UnionValuePayload) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t61(ptr : Int, value : @types.SecretValuePayload) -> Unit { +fn __wit_bindgen_lower_t65(ptr : Int, value : @types.SecretValuePayload) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).secret_ref) mbt_ffi_store32((ptr) + 4, (value).secret_ref.length()) @@ -9483,7 +11539,7 @@ fn __wit_bindgen_lower_t61(ptr : Int, value : @types.SecretValuePayload) -> Unit } #doc(hidden) -fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { +fn __wit_bindgen_lower_t70(ptr : Int, value : @types.SchemaValueNode) -> Unit { match value { BoolValue(payload) => { @@ -9584,7 +11640,7 @@ fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { } VariantValue(payload14) => { mbt_ffi_store8((ptr) + 0, (14)) - __wit_bindgen_lower_t53((ptr) + 8, payload14) + __wit_bindgen_lower_t57((ptr) + 8, payload14) () } @@ -9661,7 +11717,7 @@ fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { for index30 = 0; index30 < (payload28).length(); index30 = index30 + 1 { let iter_elem : @types.MapEntry = (payload28)[(index30)] let iter_base = address29 + (index30 * 8); - __wit_bindgen_lower_t54((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t58((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 12, (payload28).length()) @@ -9690,19 +11746,19 @@ fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { } ResultValue(payload34) => { mbt_ffi_store8((ptr) + 0, (22)) - __wit_bindgen_lower_t55((ptr) + 8, payload34) + __wit_bindgen_lower_t59((ptr) + 8, payload34) () } TextValue(payload35) => { mbt_ffi_store8((ptr) + 0, (23)) - __wit_bindgen_lower_t56((ptr) + 8, payload35) + __wit_bindgen_lower_t60((ptr) + 8, payload35) () } BinaryValue(payload36) => { mbt_ffi_store8((ptr) + 0, (24)) - __wit_bindgen_lower_t58((ptr) + 8, payload36) + __wit_bindgen_lower_t62((ptr) + 8, payload36) () } @@ -9732,25 +11788,25 @@ fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { } DurationValue(payload42) => { mbt_ffi_store8((ptr) + 0, (28)) - __wit_bindgen_lower_t59((ptr) + 8, payload42) + __wit_bindgen_lower_t63((ptr) + 8, payload42) () } QuantityValueNode(payload43) => { mbt_ffi_store8((ptr) + 0, (29)) - __wit_bindgen_lower_t34((ptr) + 8, payload43) + __wit_bindgen_lower_t37((ptr) + 8, payload43) () } UnionValue(payload44) => { mbt_ffi_store8((ptr) + 0, (30)) - __wit_bindgen_lower_t60((ptr) + 8, payload44) + __wit_bindgen_lower_t64((ptr) + 8, payload44) () } SecretValue(payload45) => { mbt_ffi_store8((ptr) + 0, (31)) - __wit_bindgen_lower_t61((ptr) + 8, payload45) + __wit_bindgen_lower_t65((ptr) + 8, payload45) () } @@ -9767,13 +11823,13 @@ fn __wit_bindgen_lower_t66(ptr : Int, value : @types.SchemaValueNode) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t68(ptr : Int, value : @types.SchemaValueTree) -> Unit { +fn __wit_bindgen_lower_t72(ptr : Int, value : @types.SchemaValueTree) -> Unit { let address = mbt_ffi_malloc(((value).value_nodes).length() * 32); for index = 0; index < ((value).value_nodes).length(); index = index + 1 { let iter_elem : @types.SchemaValueNode = ((value).value_nodes)[(index)] let iter_base = address + (index * 32); - __wit_bindgen_lower_t66((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t70((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 4, ((value).value_nodes).length()) @@ -9783,14 +11839,14 @@ fn __wit_bindgen_lower_t68(ptr : Int, value : @types.SchemaValueTree) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t69(ptr : Int, value : @types.TypedSchemaValue) -> Unit { - __wit_bindgen_lower_t51((ptr) + 0, (value).graph) - __wit_bindgen_lower_t68((ptr) + 20, (value).value) +fn __wit_bindgen_lower_t73(ptr : Int, value : @types.TypedSchemaValue) -> Unit { + __wit_bindgen_lower_t55((ptr) + 0, (value).graph) + __wit_bindgen_lower_t72((ptr) + 20, (value).value) } #doc(hidden) -fn __wit_bindgen_lower_t466(ptr : Int, value : @common.CommandAnnotations) -> Unit { +fn __wit_bindgen_lower_t470(ptr : Int, value : @common.CommandAnnotations) -> Unit { mbt_ffi_store8((ptr) + 0, (if (value).read_only { 1 } else { 0 })) mbt_ffi_store8((ptr) + 1, (if (value).destructive { 1 } else { 0 })) mbt_ffi_store8((ptr) + 2, (if (value).idempotent { 1 } else { 0 })) @@ -9799,7 +11855,7 @@ fn __wit_bindgen_lower_t466(ptr : Int, value : @common.CommandAnnotations) -> Un } #doc(hidden) -fn __wit_bindgen_lower_t467(ptr : Int, value : @common.Repetition) -> Unit { +fn __wit_bindgen_lower_t472(ptr : Int, value : @common.Repetition) -> Unit { match value { Repeated => { @@ -9824,14 +11880,22 @@ fn __wit_bindgen_lower_t467(ptr : Int, value : @common.Repetition) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t468(ptr : Int, value : @common.RepeatableShape) -> Unit { - __wit_bindgen_lower_t467((ptr) + 0, (value).repetition) - mbt_ffi_store32((ptr) + 8, (value).type_) +fn __wit_bindgen_lower_t473(ptr : Int, value : @common.RepeatableListShape) -> Unit { + __wit_bindgen_lower_t472((ptr) + 0, (value).repetition) + mbt_ffi_store32((ptr) + 8, (value).item_type) + +} + +#doc(hidden) +fn __wit_bindgen_lower_t474(ptr : Int, value : @common.RepeatableMapShape) -> Unit { + __wit_bindgen_lower_t472((ptr) + 0, (value).repetition) + mbt_ffi_store32((ptr) + 8, (value).map_type) + mbt_ffi_store8((ptr) + 12, (value).duplicate_key_policy.ordinal()) } #doc(hidden) -fn __wit_bindgen_lower_t469(ptr : Int, value : @common.OptionShape) -> Unit { +fn __wit_bindgen_lower_t475(ptr : Int, value : @common.OptionShape) -> Unit { match value { Scalar(payload) => { @@ -9846,9 +11910,15 @@ fn __wit_bindgen_lower_t469(ptr : Int, value : @common.OptionShape) -> Unit { () } - Repeatable(payload1) => { + RepeatableList(payload1) => { mbt_ffi_store8((ptr) + 0, (2)) - __wit_bindgen_lower_t468((ptr) + 4, payload1) + __wit_bindgen_lower_t473((ptr) + 4, payload1) + + () + } + RepeatableMap(payload2) => { + mbt_ffi_store8((ptr) + 0, (3)) + __wit_bindgen_lower_t474((ptr) + 4, payload2) () } @@ -9857,19 +11927,19 @@ fn __wit_bindgen_lower_t469(ptr : Int, value : @common.OptionShape) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t470(ptr : Int, value : @common.BoolFlagShape) -> Unit { +fn __wit_bindgen_lower_t476(ptr : Int, value : @common.BoolFlagShape) -> Unit { mbt_ffi_store8((ptr) + 0, (if (value).default { 1 } else { 0 })) mbt_ffi_store8((ptr) + 1, (if (value).negatable { 1 } else { 0 })) } #doc(hidden) -fn __wit_bindgen_lower_t472(ptr : Int, value : @common.FlagShape) -> Unit { +fn __wit_bindgen_lower_t478(ptr : Int, value : @common.FlagShape) -> Unit { match value { BoolFlag(payload) => { mbt_ffi_store8((ptr) + 0, (0)) - __wit_bindgen_lower_t470((ptr) + 4, payload) + __wit_bindgen_lower_t476((ptr) + 4, payload) () } @@ -9897,17 +11967,17 @@ fn __wit_bindgen_lower_t472(ptr : Int, value : @common.FlagShape) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t473(ptr : Int, value : @common.ValueIsRef) -> Unit { +fn __wit_bindgen_lower_t479(ptr : Int, value : @common.ValueIsRef) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).name) mbt_ffi_store32((ptr) + 4, (value).name.length()) mbt_ffi_store32((ptr) + 0, ptr0) - __wit_bindgen_lower_t68((ptr) + 8, (value).value) + __wit_bindgen_lower_t72((ptr) + 8, (value).value) } #doc(hidden) -fn __wit_bindgen_lower_t474(ptr : Int, value : @common.Ref) -> Unit { +fn __wit_bindgen_lower_t480(ptr : Int, value : @common.Ref) -> Unit { match value { Present(payload) => { @@ -9921,7 +11991,7 @@ fn __wit_bindgen_lower_t474(ptr : Int, value : @common.Ref) -> Unit { } ValueIs(payload1) => { mbt_ffi_store8((ptr) + 0, (1)) - __wit_bindgen_lower_t473((ptr) + 4, payload1) + __wit_bindgen_lower_t479((ptr) + 4, payload1) () } @@ -9930,13 +12000,13 @@ fn __wit_bindgen_lower_t474(ptr : Int, value : @common.Ref) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t476(ptr : Int, value : @common.RefGroup) -> Unit { +fn __wit_bindgen_lower_t482(ptr : Int, value : @common.RefGroup) -> Unit { let address = mbt_ffi_malloc(((value).refs).length() * 24); for index = 0; index < ((value).refs).length(); index = index + 1 { let iter_elem : @common.Ref = ((value).refs)[(index)] let iter_base = address + (index * 24); - __wit_bindgen_lower_t474((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t480((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 4, ((value).refs).length()) @@ -9945,14 +12015,14 @@ fn __wit_bindgen_lower_t476(ptr : Int, value : @common.RefGroup) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t478(ptr : Int, value : @common.ImpliesC) -> Unit { +fn __wit_bindgen_lower_t484(ptr : Int, value : @common.ImpliesC) -> Unit { mbt_ffi_store8((ptr) + 0, (value).lhs_quant.ordinal()) let address = mbt_ffi_malloc(((value).lhs).length() * 24); for index = 0; index < ((value).lhs).length(); index = index + 1 { let iter_elem : @common.Ref = ((value).lhs)[(index)] let iter_base = address + (index * 24); - __wit_bindgen_lower_t474((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t480((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 8, ((value).lhs).length()) @@ -9963,7 +12033,7 @@ fn __wit_bindgen_lower_t478(ptr : Int, value : @common.ImpliesC) -> Unit { for index1 = 0; index1 < ((value).rhs).length(); index1 = index1 + 1 { let iter_elem : @common.Ref = ((value).rhs)[(index1)] let iter_base = address0 + (index1 * 24); - __wit_bindgen_lower_t474((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t480((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 20, ((value).rhs).length()) @@ -9972,14 +12042,14 @@ fn __wit_bindgen_lower_t478(ptr : Int, value : @common.ImpliesC) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t479(ptr : Int, value : @common.ForbidsC) -> Unit { +fn __wit_bindgen_lower_t485(ptr : Int, value : @common.ForbidsC) -> Unit { mbt_ffi_store8((ptr) + 0, (value).lhs_quant.ordinal()) let address = mbt_ffi_malloc(((value).lhs).length() * 24); for index = 0; index < ((value).lhs).length(); index = index + 1 { let iter_elem : @common.Ref = ((value).lhs)[(index)] let iter_base = address + (index * 24); - __wit_bindgen_lower_t474((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t480((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 8, ((value).lhs).length()) @@ -9989,7 +12059,7 @@ fn __wit_bindgen_lower_t479(ptr : Int, value : @common.ForbidsC) -> Unit { for index1 = 0; index1 < ((value).rhs).length(); index1 = index1 + 1 { let iter_elem : @common.Ref = ((value).rhs)[(index1)] let iter_base = address0 + (index1 * 24); - __wit_bindgen_lower_t474((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t480((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 16, ((value).rhs).length()) @@ -9998,7 +12068,7 @@ fn __wit_bindgen_lower_t479(ptr : Int, value : @common.ForbidsC) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t481(ptr : Int, value : @common.Constraint) -> Unit { +fn __wit_bindgen_lower_t487(ptr : Int, value : @common.Constraint) -> Unit { match value { RequiresAll(payload) => { @@ -10008,7 +12078,7 @@ fn __wit_bindgen_lower_t481(ptr : Int, value : @common.Constraint) -> Unit { for index = 0; index < (payload).length(); index = index + 1 { let iter_elem : @common.Ref = (payload)[(index)] let iter_base = address + (index * 24); - __wit_bindgen_lower_t474((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t480((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 8, (payload).length()) @@ -10023,7 +12093,7 @@ fn __wit_bindgen_lower_t481(ptr : Int, value : @common.Constraint) -> Unit { for index2 = 0; index2 < (payload0).length(); index2 = index2 + 1 { let iter_elem : @common.Ref = (payload0)[(index2)] let iter_base = address1 + (index2 * 24); - __wit_bindgen_lower_t474((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t480((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 8, (payload0).length()) @@ -10038,7 +12108,7 @@ fn __wit_bindgen_lower_t481(ptr : Int, value : @common.Constraint) -> Unit { for index5 = 0; index5 < (payload3).length(); index5 = index5 + 1 { let iter_elem : @common.Ref = (payload3)[(index5)] let iter_base = address4 + (index5 * 24); - __wit_bindgen_lower_t474((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t480((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 8, (payload3).length()) @@ -10053,7 +12123,7 @@ fn __wit_bindgen_lower_t481(ptr : Int, value : @common.Constraint) -> Unit { for index8 = 0; index8 < (payload6).length(); index8 = index8 + 1 { let iter_elem : @common.RefGroup = (payload6)[(index8)] let iter_base = address7 + (index8 * 8); - __wit_bindgen_lower_t476((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t482((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 8, (payload6).length()) @@ -10063,13 +12133,13 @@ fn __wit_bindgen_lower_t481(ptr : Int, value : @common.Constraint) -> Unit { } Implies(payload9) => { mbt_ffi_store8((ptr) + 0, (4)) - __wit_bindgen_lower_t478((ptr) + 4, payload9) + __wit_bindgen_lower_t484((ptr) + 4, payload9) () } Forbids(payload10) => { mbt_ffi_store8((ptr) + 0, (5)) - __wit_bindgen_lower_t479((ptr) + 4, payload10) + __wit_bindgen_lower_t485((ptr) + 4, payload10) () } @@ -10078,7 +12148,7 @@ fn __wit_bindgen_lower_t481(ptr : Int, value : @common.Constraint) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t483(ptr : Int, value : @common.Example) -> Unit { +fn __wit_bindgen_lower_t489(ptr : Int, value : @common.Example) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).title) mbt_ffi_store32((ptr) + 4, (value).title.length()) @@ -10091,7 +12161,7 @@ fn __wit_bindgen_lower_t483(ptr : Int, value : @common.Example) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t485(ptr : Int, value : @common.Doc) -> Unit { +fn __wit_bindgen_lower_t491(ptr : Int, value : @common.Doc) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).summary) mbt_ffi_store32((ptr) + 4, (value).summary.length()) @@ -10105,7 +12175,7 @@ fn __wit_bindgen_lower_t485(ptr : Int, value : @common.Doc) -> Unit { for index = 0; index < ((value).examples).length(); index = index + 1 { let iter_elem : @common.Example = ((value).examples)[(index)] let iter_base = address + (index * 16); - __wit_bindgen_lower_t483((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t489((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 20, ((value).examples).length()) @@ -10114,12 +12184,12 @@ fn __wit_bindgen_lower_t485(ptr : Int, value : @common.Doc) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t488(ptr : Int, value : @common.Positional) -> Unit { +fn __wit_bindgen_lower_t494(ptr : Int, value : @common.Positional) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).name) mbt_ffi_store32((ptr) + 4, (value).name.length()) mbt_ffi_store32((ptr) + 0, ptr0) - __wit_bindgen_lower_t485((ptr) + 8, (value).doc) + __wit_bindgen_lower_t491((ptr) + 8, (value).doc) match ((value).value_name) { None => { @@ -10147,22 +12217,23 @@ fn __wit_bindgen_lower_t488(ptr : Int, value : @common.Positional) -> Unit { } Some(payload4) => { mbt_ffi_store8((ptr) + 48, (1)) - __wit_bindgen_lower_t68((ptr) + 52, payload4) + __wit_bindgen_lower_t72((ptr) + 52, payload4) () } } mbt_ffi_store8((ptr) + 64, (if (value).required { 1 } else { 0 })) + mbt_ffi_store8((ptr) + 65, (if (value).accepts_stdio { 1 } else { 0 })) } #doc(hidden) -fn __wit_bindgen_lower_t489(ptr : Int, value : @common.TailPositional) -> Unit { +fn __wit_bindgen_lower_t495(ptr : Int, value : @common.TailPositional) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).name) mbt_ffi_store32((ptr) + 4, (value).name.length()) mbt_ffi_store32((ptr) + 0, ptr0) - __wit_bindgen_lower_t485((ptr) + 8, (value).doc) + __wit_bindgen_lower_t491((ptr) + 8, (value).doc) match ((value).value_name) { None => { @@ -10214,17 +12285,18 @@ fn __wit_bindgen_lower_t489(ptr : Int, value : @common.TailPositional) -> Unit { } } mbt_ffi_store8((ptr) + 72, (if (value).verbatim { 1 } else { 0 })) + mbt_ffi_store8((ptr) + 73, (if (value).accepts_stdio { 1 } else { 0 })) } #doc(hidden) -fn __wit_bindgen_lower_t492(ptr : Int, value : @common.Positionals) -> Unit { +fn __wit_bindgen_lower_t498(ptr : Int, value : @common.Positionals) -> Unit { let address = mbt_ffi_malloc(((value).fixed).length() * 68); for index = 0; index < ((value).fixed).length(); index = index + 1 { let iter_elem : @common.Positional = ((value).fixed)[(index)] let iter_base = address + (index * 68); - __wit_bindgen_lower_t488((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t494((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 4, ((value).fixed).length()) @@ -10238,7 +12310,7 @@ fn __wit_bindgen_lower_t492(ptr : Int, value : @common.Positionals) -> Unit { } Some(payload0) => { mbt_ffi_store8((ptr) + 8, (1)) - __wit_bindgen_lower_t489((ptr) + 12, payload0) + __wit_bindgen_lower_t495((ptr) + 12, payload0) () } @@ -10247,7 +12319,7 @@ fn __wit_bindgen_lower_t492(ptr : Int, value : @common.Positionals) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t495(ptr : Int, value : @common.OptionSpec) -> Unit { +fn __wit_bindgen_lower_t501(ptr : Int, value : @common.OptionSpec) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).long) mbt_ffi_store32((ptr) + 4, (value).long.length()) @@ -10279,7 +12351,7 @@ fn __wit_bindgen_lower_t495(ptr : Int, value : @common.OptionSpec) -> Unit { } mbt_ffi_store32((ptr) + 20, ((value).aliases).length()) mbt_ffi_store32((ptr) + 16, address) - __wit_bindgen_lower_t485((ptr) + 24, (value).doc) + __wit_bindgen_lower_t491((ptr) + 24, (value).doc) match ((value).value_name) { None => { @@ -10297,35 +12369,35 @@ fn __wit_bindgen_lower_t495(ptr : Int, value : @common.OptionSpec) -> Unit { () } } - __wit_bindgen_lower_t469((ptr) + 60, (value).shape) + __wit_bindgen_lower_t475((ptr) + 60, (value).shape) match ((value).default) { None => { - mbt_ffi_store8((ptr) + 76, (0)) + mbt_ffi_store8((ptr) + 80, (0)) () } Some(payload7) => { - mbt_ffi_store8((ptr) + 76, (1)) - __wit_bindgen_lower_t68((ptr) + 80, payload7) + mbt_ffi_store8((ptr) + 80, (1)) + __wit_bindgen_lower_t72((ptr) + 84, payload7) () } } - mbt_ffi_store8((ptr) + 92, (if (value).required { 1 } else { 0 })) + mbt_ffi_store8((ptr) + 96, (if (value).required { 1 } else { 0 })) match ((value).env_var) { None => { - mbt_ffi_store8((ptr) + 96, (0)) + mbt_ffi_store8((ptr) + 100, (0)) () } Some(payload9) => { - mbt_ffi_store8((ptr) + 96, (1)) + mbt_ffi_store8((ptr) + 100, (1)) let ptr10 = mbt_ffi_str2ptr(payload9) - mbt_ffi_store32((ptr) + 104, payload9.length()) - mbt_ffi_store32((ptr) + 100, ptr10) + mbt_ffi_store32((ptr) + 108, payload9.length()) + mbt_ffi_store32((ptr) + 104, ptr10) () } @@ -10334,7 +12406,7 @@ fn __wit_bindgen_lower_t495(ptr : Int, value : @common.OptionSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t496(ptr : Int, value : @common.FlagSpec) -> Unit { +fn __wit_bindgen_lower_t502(ptr : Int, value : @common.FlagSpec) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).long) mbt_ffi_store32((ptr) + 4, (value).long.length()) @@ -10366,8 +12438,8 @@ fn __wit_bindgen_lower_t496(ptr : Int, value : @common.FlagSpec) -> Unit { } mbt_ffi_store32((ptr) + 20, ((value).aliases).length()) mbt_ffi_store32((ptr) + 16, address) - __wit_bindgen_lower_t485((ptr) + 24, (value).doc) - __wit_bindgen_lower_t472((ptr) + 48, (value).shape) + __wit_bindgen_lower_t491((ptr) + 24, (value).doc) + __wit_bindgen_lower_t478((ptr) + 48, (value).shape) match ((value).env_var) { None => { @@ -10389,13 +12461,13 @@ fn __wit_bindgen_lower_t496(ptr : Int, value : @common.FlagSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t499(ptr : Int, value : @common.Globals) -> Unit { +fn __wit_bindgen_lower_t505(ptr : Int, value : @common.Globals) -> Unit { - let address = mbt_ffi_malloc(((value).options).length() * 108); + let address = mbt_ffi_malloc(((value).options).length() * 112); for index = 0; index < ((value).options).length(); index = index + 1 { let iter_elem : @common.OptionSpec = ((value).options)[(index)] - let iter_base = address + (index * 108); - __wit_bindgen_lower_t495((iter_base) + 0, iter_elem) + let iter_base = address + (index * 112); + __wit_bindgen_lower_t501((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 4, ((value).options).length()) @@ -10405,7 +12477,7 @@ fn __wit_bindgen_lower_t499(ptr : Int, value : @common.Globals) -> Unit { for index1 = 0; index1 < ((value).flags).length(); index1 = index1 + 1 { let iter_elem : @common.FlagSpec = ((value).flags)[(index1)] let iter_base = address0 + (index1 * 72); - __wit_bindgen_lower_t496((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t502((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 12, ((value).flags).length()) @@ -10414,8 +12486,8 @@ fn __wit_bindgen_lower_t499(ptr : Int, value : @common.Globals) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t500(ptr : Int, value : @common.StreamSpec) -> Unit { - __wit_bindgen_lower_t485((ptr) + 0, (value).doc) +fn __wit_bindgen_lower_t506(ptr : Int, value : @common.StreamSpec) -> Unit { + __wit_bindgen_lower_t491((ptr) + 0, (value).doc) let address = mbt_ffi_malloc(((value).mime).length() * 8); for index = 0; index < ((value).mime).length(); index = index + 1 { @@ -10434,25 +12506,25 @@ fn __wit_bindgen_lower_t500(ptr : Int, value : @common.StreamSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t501(ptr : Int, value : @common.Formatter) -> Unit { +fn __wit_bindgen_lower_t507(ptr : Int, value : @common.Formatter) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).name) mbt_ffi_store32((ptr) + 4, (value).name.length()) mbt_ffi_store32((ptr) + 0, ptr0) - __wit_bindgen_lower_t485((ptr) + 8, (value).doc) + __wit_bindgen_lower_t491((ptr) + 8, (value).doc) } #doc(hidden) -fn __wit_bindgen_lower_t503(ptr : Int, value : @common.ResultSpec) -> Unit { +fn __wit_bindgen_lower_t509(ptr : Int, value : @common.ResultSpec) -> Unit { mbt_ffi_store32((ptr) + 0, (value).type_) - __wit_bindgen_lower_t485((ptr) + 4, (value).doc) + __wit_bindgen_lower_t491((ptr) + 4, (value).doc) let address = mbt_ffi_malloc(((value).formatters).length() * 32); for index = 0; index < ((value).formatters).length(); index = index + 1 { let iter_elem : @common.Formatter = ((value).formatters)[(index)] let iter_base = address + (index * 32); - __wit_bindgen_lower_t501((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t507((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 32, ((value).formatters).length()) @@ -10465,12 +12537,12 @@ fn __wit_bindgen_lower_t503(ptr : Int, value : @common.ResultSpec) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t505(ptr : Int, value : @common.ErrorCase) -> Unit { +fn __wit_bindgen_lower_t511(ptr : Int, value : @common.ErrorCase) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).name) mbt_ffi_store32((ptr) + 4, (value).name.length()) mbt_ffi_store32((ptr) + 0, ptr0) - __wit_bindgen_lower_t485((ptr) + 8, (value).doc) + __wit_bindgen_lower_t491((ptr) + 8, (value).doc) mbt_ffi_store8((ptr) + 32, (value).kind.ordinal()) mbt_ffi_store8((ptr) + 33, ((value).exit_code).to_int()) @@ -10491,14 +12563,14 @@ fn __wit_bindgen_lower_t505(ptr : Int, value : @common.ErrorCase) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t511(ptr : Int, value : @common.CommandBody) -> Unit { - __wit_bindgen_lower_t492((ptr) + 0, (value).positionals) +fn __wit_bindgen_lower_t517(ptr : Int, value : @common.CommandBody) -> Unit { + __wit_bindgen_lower_t498((ptr) + 0, (value).positionals) - let address = mbt_ffi_malloc(((value).options).length() * 108); + let address = mbt_ffi_malloc(((value).options).length() * 112); for index = 0; index < ((value).options).length(); index = index + 1 { let iter_elem : @common.OptionSpec = ((value).options)[(index)] - let iter_base = address + (index * 108); - __wit_bindgen_lower_t495((iter_base) + 0, iter_elem) + let iter_base = address + (index * 112); + __wit_bindgen_lower_t501((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 92, ((value).options).length()) @@ -10508,7 +12580,7 @@ fn __wit_bindgen_lower_t511(ptr : Int, value : @common.CommandBody) -> Unit { for index1 = 0; index1 < ((value).flags).length(); index1 = index1 + 1 { let iter_elem : @common.FlagSpec = ((value).flags)[(index1)] let iter_base = address0 + (index1 * 72); - __wit_bindgen_lower_t496((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t502((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 100, ((value).flags).length()) @@ -10518,7 +12590,7 @@ fn __wit_bindgen_lower_t511(ptr : Int, value : @common.CommandBody) -> Unit { for index3 = 0; index3 < ((value).constraints).length(); index3 = index3 + 1 { let iter_elem : @common.Constraint = ((value).constraints)[(index3)] let iter_base = address2 + (index3 * 28); - __wit_bindgen_lower_t481((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t487((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 108, ((value).constraints).length()) @@ -10532,7 +12604,7 @@ fn __wit_bindgen_lower_t511(ptr : Int, value : @common.CommandBody) -> Unit { } Some(payload4) => { mbt_ffi_store8((ptr) + 112, (1)) - __wit_bindgen_lower_t500((ptr) + 116, payload4) + __wit_bindgen_lower_t506((ptr) + 116, payload4) () } @@ -10546,7 +12618,7 @@ fn __wit_bindgen_lower_t511(ptr : Int, value : @common.CommandBody) -> Unit { } Some(payload6) => { mbt_ffi_store8((ptr) + 152, (1)) - __wit_bindgen_lower_t500((ptr) + 156, payload6) + __wit_bindgen_lower_t506((ptr) + 156, payload6) () } @@ -10560,7 +12632,7 @@ fn __wit_bindgen_lower_t511(ptr : Int, value : @common.CommandBody) -> Unit { } Some(payload8) => { mbt_ffi_store8((ptr) + 192, (1)) - __wit_bindgen_lower_t503((ptr) + 196, payload8) + __wit_bindgen_lower_t509((ptr) + 196, payload8) () } @@ -10570,7 +12642,7 @@ fn __wit_bindgen_lower_t511(ptr : Int, value : @common.CommandBody) -> Unit { for index10 = 0; index10 < ((value).errors).length(); index10 = index10 + 1 { let iter_elem : @common.ErrorCase = ((value).errors)[(index10)] let iter_base = address9 + (index10 * 44); - __wit_bindgen_lower_t505((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t511((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 244, ((value).errors).length()) @@ -10584,7 +12656,7 @@ fn __wit_bindgen_lower_t511(ptr : Int, value : @common.CommandBody) -> Unit { } Some(payload12) => { mbt_ffi_store8((ptr) + 248, (1)) - __wit_bindgen_lower_t466((ptr) + 249, payload12) + __wit_bindgen_lower_t470((ptr) + 249, payload12) () } @@ -10593,7 +12665,7 @@ fn __wit_bindgen_lower_t511(ptr : Int, value : @common.CommandBody) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t514(ptr : Int, value : @common.CommandNode) -> Unit { +fn __wit_bindgen_lower_t520(ptr : Int, value : @common.CommandNode) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).name) mbt_ffi_store32((ptr) + 4, (value).name.length()) @@ -10611,8 +12683,8 @@ fn __wit_bindgen_lower_t514(ptr : Int, value : @common.CommandNode) -> Unit { } mbt_ffi_store32((ptr) + 12, ((value).aliases).length()) mbt_ffi_store32((ptr) + 8, address) - __wit_bindgen_lower_t485((ptr) + 16, (value).doc) - __wit_bindgen_lower_t499((ptr) + 40, (value).globals) + __wit_bindgen_lower_t491((ptr) + 16, (value).doc) + __wit_bindgen_lower_t505((ptr) + 40, (value).globals) let address2 = mbt_ffi_malloc(((value).subcommands).length() * 4); for index3 = 0; index3 < ((value).subcommands).length(); index3 = index3 + 1 { @@ -10632,7 +12704,7 @@ fn __wit_bindgen_lower_t514(ptr : Int, value : @common.CommandNode) -> Unit { } Some(payload4) => { mbt_ffi_store8((ptr) + 64, (1)) - __wit_bindgen_lower_t511((ptr) + 68, payload4) + __wit_bindgen_lower_t517((ptr) + 68, payload4) () } @@ -10641,13 +12713,13 @@ fn __wit_bindgen_lower_t514(ptr : Int, value : @common.CommandNode) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t516(ptr : Int, value : @common.CommandTree) -> Unit { +fn __wit_bindgen_lower_t522(ptr : Int, value : @common.CommandTree) -> Unit { let address = mbt_ffi_malloc(((value).nodes).length() * 324); for index = 0; index < ((value).nodes).length(); index = index + 1 { let iter_elem : @common.CommandNode = ((value).nodes)[(index)] let iter_base = address + (index * 324); - __wit_bindgen_lower_t514((iter_base) + 0, iter_elem) + __wit_bindgen_lower_t520((iter_base) + 0, iter_elem) } mbt_ffi_store32((ptr) + 4, ((value).nodes).length()) @@ -10656,18 +12728,18 @@ fn __wit_bindgen_lower_t516(ptr : Int, value : @common.CommandTree) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t517(ptr : Int, value : @common.Tool) -> Unit { +fn __wit_bindgen_lower_t523(ptr : Int, value : @common.Tool) -> Unit { let ptr0 = mbt_ffi_str2ptr((value).version) mbt_ffi_store32((ptr) + 4, (value).version.length()) mbt_ffi_store32((ptr) + 0, ptr0) - __wit_bindgen_lower_t516((ptr) + 8, (value).commands) - __wit_bindgen_lower_t51((ptr) + 16, (value).schema) + __wit_bindgen_lower_t522((ptr) + 8, (value).commands) + __wit_bindgen_lower_t55((ptr) + 16, (value).schema) } #doc(hidden) -fn __wit_bindgen_lower_t518(ptr : Int, value : @common.ToolError) -> Unit { +fn __wit_bindgen_lower_t524(ptr : Int, value : @common.ToolError) -> Unit { match value { InvalidToolName(payload) => { @@ -10726,7 +12798,7 @@ fn __wit_bindgen_lower_t518(ptr : Int, value : @common.ToolError) -> Unit { } CustomError(payload9) => { mbt_ffi_store8((ptr) + 0, (5)) - __wit_bindgen_lower_t69((ptr) + 4, payload9) + __wit_bindgen_lower_t73((ptr) + 4, payload9) () } @@ -10735,7 +12807,7 @@ fn __wit_bindgen_lower_t518(ptr : Int, value : @common.ToolError) -> Unit { } #doc(hidden) -fn __wit_bindgen_lower_t522(ptr : Int, value : @common.InvocationResult) -> Unit { +fn __wit_bindgen_lower_t528(ptr : Int, value : @common.InvocationResult) -> Unit { match ((value).result) { None => { @@ -10745,7 +12817,7 @@ fn __wit_bindgen_lower_t522(ptr : Int, value : @common.InvocationResult) -> Unit } Some(payload0) => { mbt_ffi_store8((ptr) + 0, (1)) - __wit_bindgen_lower_t69((ptr) + 4, payload0) + __wit_bindgen_lower_t73((ptr) + 4, payload0) () } @@ -10770,24 +12842,47 @@ fn __wit_bindgen_lower_t522(ptr : Int, value : @common.InvocationResult) -> Unit } ///| -extern "wasm" fn mbt_ffi_store16(offset : Int, value : Int) = -#|(func (param i32) (param i32) local.get 0 local.get 1 i32.store16) +extern "wasm" fn mbt_ffi_extend8(value : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.extend8_s) + +///| +extern "wasm" fn mbt_ffi_storef32(offset : Int, value : Float) = +#|(func (param i32) (param f32) local.get 0 local.get 1 f32.store) + +///| +extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = +#|(func (param i32) (param i32) (result i32) +#| local.get 0 +#| local.get 1 call $moonbit.init_array16 +#| local.get 0) ///| extern "wasm" fn mbt_ffi_load64(offset : Int) -> Int64 = #|(func (param i32) (result i64) local.get 0 i64.load) ///| -extern "wasm" fn mbt_ffi_load8_u(offset : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.load8_u) +extern "wasm" fn mbt_ffi_extend16(value : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.extend16_s) ///| -extern "wasm" fn mbt_ffi_free(position : Int) = -#|(func (param i32) local.get 0 call $moonbit.decref) +extern "wasm" fn mbt_ffi_load16_u(offset : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.load16_u) ///| -extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.load) +extern "wasm" fn mbt_ffi_loadf32(offset : Int) -> Float = +#|(func (param i32) (result f32) local.get 0 f32.load) + +///| +extern "wasm" fn mbt_ffi_load16(offset : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.load16_s) + +///| +extern "wasm" fn mbt_ffi_store16(offset : Int, value : Int) = +#|(func (param i32) (param i32) local.get 0 local.get 1 i32.store16) + +///| +extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = +#|(func (param i32) (result f64) local.get 0 f64.load) ///| #owned(str) @@ -10795,32 +12890,33 @@ extern "wasm" fn mbt_ffi_str2ptr(str : String) -> Int = #|(func (param i32) (result i32) local.get 0) ///| -extern "wasm" fn mbt_ffi_storef32(offset : Int, value : Float) = -#|(func (param i32) (param f32) local.get 0 local.get 1 f32.store) - -///| -extern "wasm" fn mbt_ffi_storef64(offset : Int, value : Double) = -#|(func (param i32) (param f64) local.get 0 local.get 1 f64.store) +extern "wasm" fn mbt_ffi_load8(offset : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.load8_s) ///| -extern "wasm" fn mbt_ffi_ptr2str(ptr : Int, len : Int) -> String = -#|(func (param i32) (param i32) (result i32) -#| local.get 0 -#| local.get 1 call $moonbit.init_array16 -#| local.get 0) +extern "wasm" fn mbt_ffi_store32(offset : Int, value : Int) = +#|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) ///| -extern "wasm" fn mbt_ffi_loadf64(offset : Int) -> Double = -#|(func (param i32) (result f64) local.get 0 f64.load) +extern "wasm" fn mbt_ffi_load32(offset : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.load) ///| -extern "wasm" fn mbt_ffi_extend8(value : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.extend8_s) +extern "wasm" fn mbt_ffi_free(position : Int) = +#|(func (param i32) local.get 0 call $moonbit.decref) ///| extern "wasm" fn mbt_ffi_store8(offset : Int, value : Int) = #|(func (param i32) (param i32) local.get 0 local.get 1 i32.store8) +///| +extern "wasm" fn mbt_ffi_store64(offset : Int, value : Int64) = +#|(func (param i32) (param i64) local.get 0 local.get 1 i64.store) + +///| +extern "wasm" fn mbt_ffi_load8_u(offset : Int) -> Int = +#|(func (param i32) (result i32) local.get 0 i32.load8_u) + ///| extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = #|(func (param i32) (param i32) (result i32) @@ -10828,10 +12924,6 @@ extern "wasm" fn mbt_ffi_ptr2bytes(ptr : Int, len : Int) -> FixedArray[Byte] = #| local.get 1 call $moonbit.init_array8 #| local.get 0) -///| -extern "wasm" fn mbt_ffi_load16_u(offset : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.load16_u) - ///| extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #|(func (param i32) (result i32) (local i32) @@ -10839,32 +12931,12 @@ extern "wasm" fn mbt_ffi_malloc(size : Int) -> Int = #| local.tee 1 i32.const 0 call $moonbit.init_array8 #| local.get 1) -///| -extern "wasm" fn mbt_ffi_loadf32(offset : Int) -> Float = -#|(func (param i32) (result f32) local.get 0 f32.load) - -///| -extern "wasm" fn mbt_ffi_store64(offset : Int, value : Int64) = -#|(func (param i32) (param i64) local.get 0 local.get 1 i64.store) - -///| -extern "wasm" fn mbt_ffi_store32(offset : Int, value : Int) = -#|(func (param i32) (param i32) local.get 0 local.get 1 i32.store) - ///| #owned(bytes) extern "wasm" fn mbt_ffi_bytes2ptr(bytes : FixedArray[Byte]) -> Int = #|(func (param i32) (result i32) local.get 0) ///| -extern "wasm" fn mbt_ffi_load8(offset : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.load8_s) - -///| -extern "wasm" fn mbt_ffi_load16(offset : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.load16_s) - -///| -extern "wasm" fn mbt_ffi_extend16(value : Int) -> Int = -#|(func (param i32) (result i32) local.get 0 i32.extend16_s) +extern "wasm" fn mbt_ffi_storef64(offset : Int, value : Double) = +#|(func (param i32) (param f64) local.get 0 local.get 1 f64.store) diff --git a/sdks/moonbit/golem_sdk/interface/golem/agent/host/top.mbt b/sdks/moonbit/golem_sdk/interface/golem/agent/host/top.mbt index 99f014565a..439fd9b5a2 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/agent/host/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/agent/host/top.mbt @@ -42,9 +42,9 @@ pub fn get_all_agent_types() -> Array[@common.RegisteredAgentType] { let return_area = mbt_ffi_malloc(8) wasmImportGetAllAgentTypes(return_area); - let array438 : Array[@common.RegisteredAgentType] = []; - for index439 = 0; index439 < (mbt_ffi_load32((return_area) + 4)); index439 = index439 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 0)) + (index439 * 192) + let array578 : Array[@common.RegisteredAgentType] = []; + for index579 = 0; index579 < (mbt_ffi_load32((return_area) + 4)); index579 = index579 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 0)) + (index579 * 192) let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) @@ -52,11 +52,11 @@ pub fn get_all_agent_types() -> Array[@common.RegisteredAgentType] { let result1 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let array125 : Array[@types.SchemaTypeNode] = []; - for index126 = 0; index126 < (mbt_ffi_load32((iter_base) + 28)); index126 = index126 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index126 * 144) + let array195 : Array[@types.SchemaTypeNode] = []; + for index196 = 0; index196 < (mbt_ffi_load32((iter_base) + 28)); index196 = index196 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index196 * 144) - let lifted111 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted181 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -67,642 +67,807 @@ pub fn get_all_agent_types() -> Array[@common.RegisteredAgentType] { } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted7 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted2 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted4 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted3 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array13 : Array[@types.NamedFieldType] = []; - for index14 = 0; index14 < (mbt_ffi_load32((iter_base) + 12)); index14 = index14 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index14 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result2 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted3) + } + _ => panic() + } - let lifted : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted6 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result3 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result5 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result3) + Option::Some(result5) + } + _ => panic() } - _ => panic() - } - let array : Array[String] = []; - for index = 0; index < (mbt_ffi_load32((iter_base) + 28)); index = index + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index * 8) + Option::Some(@types.NumericRestrictions::{min : lifted2, max : lifted4, unit : lifted6}) + } + _ => panic() + } - let result4 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted7) + } + 3 => { - array.push(result4) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted14 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array6 : Array[String] = []; - for index7 = 0; index7 < (mbt_ffi_load32((iter_base) + 36)); index7 = index7 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index7 * 8) + let lifted9 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result5 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted8 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array6.push(result5) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted9 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result8 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result8) + Option::Some(lifted8) + } + _ => panic() } - _ => panic() - } - let lifted12 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted11 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted11 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted10 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - - let result10 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result10) - } - _ => panic() + Option::Some(lifted10) } + _ => panic() + } + + let lifted13 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result12 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(lifted11) + Option::Some(result12) + } + _ => panic() } - _ => panic() - } - array13.push(@types.NamedFieldType::{name : result2, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted, aliases : array, examples : array6, deprecated : lifted9, role : lifted12}}) + Option::Some(@types.NumericRestrictions::{min : lifted9, max : lifted11, unit : lifted13}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array13) + @types.SchemaTypeBody::S16Type(lifted14) } - 15 => { + 4 => { - let array30 : Array[@types.VariantCaseType] = []; - for index31 = 0; index31 < (mbt_ffi_load32((iter_base) + 12)); index31 = index31 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index31 * 72) + let lifted21 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result15 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted16 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted16 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted15 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted18 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result17 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result17) + Option::Some(lifted15) + } + _ => panic() } - _ => panic() - } - let array20 : Array[String] = []; - for index21 = 0; index21 < (mbt_ffi_load32((iter_base) + 32)); index21 = index21 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index21 * 8) + let lifted18 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result19 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted17 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - array20.push(result19) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let array23 : Array[String] = []; - for index24 = 0; index24 < (mbt_ffi_load32((iter_base) + 40)); index24 = index24 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index24 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result22 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array23.push(result22) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + Option::Some(lifted17) + } + _ => panic() + } - let lifted26 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + let lifted20 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result25 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result19 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result25) + Option::Some(result19) + } + _ => panic() } - _ => panic() + + Option::Some(@types.NumericRestrictions::{min : lifted16, max : lifted18, unit : lifted20}) } + _ => panic() + } - let lifted29 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::S32Type(lifted21) + } + 5 => { - let lifted28 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + let lifted28 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.Role::Multimodal - } - 1 => { + let lifted23 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredText - } - 2 => { + let lifted22 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.Role::UnstructuredBinary - } - 3 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result27 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::Other(result27) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() - } - Option::Some(lifted28) + Option::Some(lifted22) + } + _ => panic() } - _ => panic() - } - array30.push(@types.VariantCaseType::{name : result15, payload : lifted16, metadata : @types.MetadataEnvelope::{doc : lifted18, aliases : array20, examples : array23, deprecated : lifted26, role : lifted29}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted25 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::VariantType(array30) - } - 16 => { + let lifted24 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array33 : Array[String] = []; - for index34 = 0; index34 < (mbt_ffi_load32((iter_base) + 12)); index34 = index34 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index34 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result32 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array33.push(result32) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + Option::Some(lifted24) + } + _ => panic() + } - @types.SchemaTypeBody::EnumType(array33) - } - 17 => { + let lifted27 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let array36 : Array[String] = []; - for index37 = 0; index37 < (mbt_ffi_load32((iter_base) + 12)); index37 = index37 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index37 * 8) + let result26 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result35 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(result26) + } + _ => panic() + } - array36.push(result35) + Option::Some(@types.NumericRestrictions::{min : lifted23, max : lifted25, unit : lifted27}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array36) + @types.SchemaTypeBody::S64Type(lifted28) } - 18 => { + 6 => { - let array38 : Array[Int] = []; - for index39 = 0; index39 < (mbt_ffi_load32((iter_base) + 12)); index39 = index39 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index39 * 4) + let lifted35 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array38.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted30 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::TupleType(array38) - } - 19 => { + let lifted29 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) - } - 23 => { + Option::Some(lifted29) + } + _ => panic() + } - let lifted40 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted32 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let lifted31 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted41 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 20)) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted40, err : lifted41}) - } - 24 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted45 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + Option::Some(lifted31) + } + _ => panic() + } - let array43 : Array[String] = []; - for index44 = 0; index44 < (mbt_ffi_load32((iter_base) + 16)); index44 = index44 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index44 * 8) + let lifted34 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result42 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result33 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array43.push(result42) + Option::Some(result33) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array43) + Option::Some(@types.NumericRestrictions::{min : lifted30, max : lifted32, unit : lifted34}) } _ => panic() } - let lifted46 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + @types.SchemaTypeBody::U8Type(lifted35) + } + 7 => { + + let lifted42 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let lifted37 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted47 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let lifted36 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted49 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result48 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result48) - } - _ => panic() - } + Option::Some(lifted36) + } + _ => panic() + } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted45, min_length : lifted46, max_length : lifted47, regex : lifted49}) - } - 25 => { + let lifted39 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted53 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted38 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array51 : Array[String] = []; - for index52 = 0; index52 < (mbt_ffi_load32((iter_base) + 16)); index52 = index52 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index52 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result50 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array51.push(result50) + Option::Some(lifted38) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - - Option::Some(array51) - } - _ => panic() - } - let lifted54 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let lifted41 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let result40 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted55 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + Option::Some(result40) + } + _ => panic() + } - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + Option::Some(@types.NumericRestrictions::{min : lifted37, max : lifted39, unit : lifted41}) } _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted53, min_bytes : lifted54, max_bytes : lifted55}) + @types.SchemaTypeBody::U16Type(lifted42) } - 26 => { + 8 => { - let lifted59 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted49 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array57 : Array[String] = []; - for index58 = 0; index58 < (mbt_ffi_load32((iter_base) + 20)); index58 = index58 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index58 * 8) + let lifted44 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result56 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted43 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array57.push(result56) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - Option::Some(array57) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted63 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let array61 : Array[String] = []; - for index62 = 0; index62 < (mbt_ffi_load32((iter_base) + 32)); index62 = index62 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index62 * 8) + Option::Some(lifted43) + } + _ => panic() + } - let result60 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted46 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - array61.push(result60) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let lifted45 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - Option::Some(array61) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted59, allowed_extensions : lifted63}) - } - 27 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted67 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted45) + } + _ => panic() + } - let array65 : Array[String] = []; - for index66 = 0; index66 < (mbt_ffi_load32((iter_base) + 16)); index66 = index66 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index66 * 8) + let lifted48 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result64 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result47 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array65.push(result64) + Option::Some(result47) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array65) + Option::Some(@types.NumericRestrictions::{min : lifted44, max : lifted46, unit : lifted48}) } _ => panic() } - let lifted71 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + @types.SchemaTypeBody::U32Type(lifted49) + } + 9 => { + + let lifted56 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array69 : Array[String] = []; - for index70 = 0; index70 < (mbt_ffi_load32((iter_base) + 28)); index70 = index70 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index70 * 8) - - let result68 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted51 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - array69.push(result68) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted50 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(array69) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted67, allowed_hosts : lifted71}) - } - 28 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::DatetimeType - } - 29 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::DurationType - } - 30 => { + Option::Some(lifted50) + } + _ => panic() + } - let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted53 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array74 : Array[String] = []; - for index75 = 0; index75 < (mbt_ffi_load32((iter_base) + 20)); index75 = index75 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index75 * 8) + let lifted52 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - array74.push(result73) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted77 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result76 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + Option::Some(lifted52) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result76}) - } - _ => panic() - } + let lifted55 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted79 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let result54 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + Option::Some(result54) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result78}) + Option::Some(@types.NumericRestrictions::{min : lifted51, max : lifted53, unit : lifted55}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result72, allowed_suffixes : array74, min : lifted77, max : lifted79}) + @types.SchemaTypeBody::U64Type(lifted56) } - 31 => { + 10 => { - let array103 : Array[@types.UnionBranch] = []; - for index104 = 0; index104 < (mbt_ffi_load32((iter_base) + 12)); index104 = index104 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index104 * 92) + let lifted63 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted58 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted89 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + let lifted57 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.DiscriminatorRule::Prefix(result81) - } - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result82 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.DiscriminatorRule::Suffix(result82) + Option::Some(lifted57) + } + _ => panic() } - 2 => { - let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted60 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.DiscriminatorRule::Contains(result83) - } - 3 => { + let lifted59 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result84 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.DiscriminatorRule::Regex(result84) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted59) + } + _ => panic() } - 4 => { - let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted62 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result61 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted87 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + Option::Some(result61) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted58, max : lifted60, unit : lifted62}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted63) + } + 11 => { + + let lifted70 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted65 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted64 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(result86) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() + + Option::Some(lifted64) } + _ => panic() + } + + let lifted67 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted66 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result85, literal : lifted87}) + Option::Some(lifted66) + } + _ => panic() } - 5 => { - let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted69 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result68 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.DiscriminatorRule::FieldAbsent(result88) + Option::Some(result68) + } + _ => panic() } - _ => panic() + + Option::Some(@types.NumericRestrictions::{min : lifted65, max : lifted67, unit : lifted69}) } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted70) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array83 : Array[@types.NamedFieldType] = []; + for index84 = 0; index84 < (mbt_ffi_load32((iter_base) + 12)); index84 = index84 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index84 * 68) + + let result71 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted91 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted73 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result90) + Option::Some(result72) } _ => panic() } - let array93 : Array[String] = []; - for index94 = 0; index94 < (mbt_ffi_load32((iter_base) + 52)); index94 = index94 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index94 * 8) + let array : Array[String] = []; + for index = 0; index < (mbt_ffi_load32((iter_base) + 28)); index = index + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index * 8) - let result92 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result74 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array93.push(result92) + array.push(result74) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array96 : Array[String] = []; - for index97 = 0; index97 < (mbt_ffi_load32((iter_base) + 60)); index97 = index97 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index97 * 8) + let array76 : Array[String] = []; + for index77 = 0; index77 < (mbt_ffi_load32((iter_base) + 36)); index77 = index77 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index77 * 8) - let result95 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result75 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array96.push(result95) + array76.push(result75) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted99 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted79 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result98 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result98) + Option::Some(result78) } _ => panic() } - let lifted102 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted82 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted101 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted81 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -717,526 +882,527 @@ pub fn get_all_agent_types() -> Array[@common.RegisteredAgentType] { } 3 => { - let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result100) + @types.Role::Other(result80) } _ => panic() } - Option::Some(lifted101) + Option::Some(lifted81) } _ => panic() } - array103.push(@types.UnionBranch::{tag : result80, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted89, metadata : @types.MetadataEnvelope::{doc : lifted91, aliases : array93, examples : array96, deprecated : lifted99, role : lifted102}}) + array83.push(@types.NamedFieldType::{name : result71, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted73, aliases : array, examples : array76, deprecated : lifted79, role : lifted82}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array103}) + @types.SchemaTypeBody::RecordType(array83) } - 32 => { - - let lifted106 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { - - let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - - Option::Some(result105) - } - _ => panic() - } + 15 => { - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted106}) - } - 33 => { + let array100 : Array[@types.VariantCaseType] = []; + for index101 = 0; index101 < (mbt_ffi_load32((iter_base) + 12)); index101 = index101 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index101 * 72) - let lifted108 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let lifted86 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - Option::Some(result107) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted108}) - } - 34 => { + let lifted88 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted109 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) + Option::Some(result87) + } + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::FutureType(lifted109) - } - 35 => { + let array90 : Array[String] = []; + for index91 = 0; index91 < (mbt_ffi_load32((iter_base) + 32)); index91 = index91 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index91 * 8) - let lifted110 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result89 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) + array90.push(result89) } - _ => panic() - } - - @types.SchemaTypeBody::StreamType(lifted110) - } - _ => panic() - } - - let lifted113 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { - - let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - - Option::Some(result112) - } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array115 : Array[String] = []; - for index116 = 0; index116 < (mbt_ffi_load32((iter_base) + 104)); index116 = index116 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index116 * 8) + let array93 : Array[String] = []; + for index94 = 0; index94 < (mbt_ffi_load32((iter_base) + 40)); index94 = index94 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index94 * 8) - let result114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result92 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array115.push(result114) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + array93.push(result92) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array118 : Array[String] = []; - for index119 = 0; index119 < (mbt_ffi_load32((iter_base) + 112)); index119 = index119 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index119 * 8) + let lifted96 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - let result117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result95 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - array118.push(result117) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + Option::Some(result95) + } + _ => panic() + } - let lifted121 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + let lifted99 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let result120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let lifted98 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - Option::Some(result120) - } - _ => panic() - } + @types.Role::Multimodal + } + 1 => { - let lifted124 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + @types.Role::UnstructuredText + } + 2 => { - let lifted123 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + @types.Role::UnstructuredBinary + } + 3 => { - @types.Role::Multimodal - } - 1 => { + let result97 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::UnstructuredText - } - 2 => { + @types.Role::Other(result97) + } + _ => panic() + } - @types.Role::UnstructuredBinary + Option::Some(lifted98) + } + _ => panic() } - 3 => { - let result122 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - - @types.Role::Other(result122) - } - _ => panic() + array100.push(@types.VariantCaseType::{name : result85, payload : lifted86, metadata : @types.MetadataEnvelope::{doc : lifted88, aliases : array90, examples : array93, deprecated : lifted96, role : lifted99}}) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - Option::Some(lifted123) + @types.SchemaTypeBody::VariantType(array100) } - _ => panic() - } - - array125.push(@types.SchemaTypeNode::{body : lifted111, metadata : @types.MetadataEnvelope::{doc : lifted113, aliases : array115, examples : array118, deprecated : lifted121, role : lifted124}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - - let array130 : Array[@types.SchemaTypeDef] = []; - for index131 = 0; index131 < (mbt_ffi_load32((iter_base) + 36)); index131 = index131 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index131 * 24) + 16 => { - let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array103 : Array[String] = []; + for index104 = 0; index104 < (mbt_ffi_load32((iter_base) + 12)); index104 = index104 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index104 * 8) - let lifted129 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result102 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result128 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + array103.push(result102) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - Option::Some(result128) + @types.SchemaTypeBody::EnumType(array103) } - _ => panic() - } - - array130.push(@types.SchemaTypeDef::{id : result127, name : lifted129, body : mbt_ffi_load32((iter_base) + 20)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + 17 => { - let lifted133 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + let array106 : Array[String] = []; + for index107 = 0; index107 < (mbt_ffi_load32((iter_base) + 12)); index107 = index107 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index107 * 8) - let result132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(result132) - } - _ => panic() - } + array106.push(result105) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let result134 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 56), mbt_ffi_load32((iter_base) + 60)) + @types.SchemaTypeBody::FlagsType(array106) + } + 18 => { - let lifted136 : String? = match mbt_ffi_load8_u((iter_base) + 64) { - 0 => Option::None - 1 => { + let array108 : Array[Int] = []; + for index109 = 0; index109 < (mbt_ffi_load32((iter_base) + 12)); index109 = index109 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index109 * 4) - let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + array108.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - Option::Some(result135) - } - _ => panic() - } + @types.SchemaTypeBody::TupleType(array108) + } + 19 => { - let lifted154 = match (mbt_ffi_load8_u((iter_base) + 76)) { - 0 => { + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { - let array152 : Array[@common.NamedField] = []; - for index153 = 0; index153 < (mbt_ffi_load32((iter_base) + 84)); index153 = index153 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index153 * 72) + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { - let result137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { - let lifted138 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { - @common.FieldSource::UserSupplied - } + let lifted110 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None 1 => { - @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) + Option::Some(mbt_ffi_load32((iter_base) + 12)) } _ => panic() } - let lifted140 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted111 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - - Option::Some(result139) + Option::Some(mbt_ffi_load32((iter_base) + 20)) } _ => panic() } - let array142 : Array[String] = []; - for index143 = 0; index143 < (mbt_ffi_load32((iter_base) + 32)); index143 = index143 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index143 * 8) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted110, err : lifted111}) + } + 24 => { - let result141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted115 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array142.push(result141) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let array113 : Array[String] = []; + for index114 = 0; index114 < (mbt_ffi_load32((iter_base) + 16)); index114 = index114 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index114 * 8) - let array145 : Array[String] = []; - for index146 = 0; index146 < (mbt_ffi_load32((iter_base) + 40)); index146 = index146 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index146 * 8) + let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + array113.push(result112) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - array145.push(result144) + Option::Some(array113) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted148 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted116 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let result147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - - Option::Some(result147) + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) } _ => panic() } - let lifted151 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted117 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { - let lifted150 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { - - @types.Role::Multimodal - } - 1 => { - - @types.Role::UnstructuredText - } - 2 => { - - @types.Role::UnstructuredBinary - } - 3 => { + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } - let result149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let lifted119 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - @types.Role::Other(result149) - } - _ => panic() - } + let result118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(lifted150) + Option::Some(result118) } _ => panic() } - array152.push(@common.NamedField::{name : result137, source : lifted138, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted140, aliases : array142, examples : array145, deprecated : lifted148, role : lifted151}}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted115, min_length : lifted116, max_length : lifted117, regex : lifted119}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) + 25 => { - @common.InputSchema::Parameters(array152) - } - _ => panic() - } + let lifted123 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array202 : Array[@common.AgentMethod] = []; - for index203 = 0; index203 < (mbt_ffi_load32((iter_base) + 92)); index203 = index203 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index203 * 88) + let array121 : Array[String] = []; + for index122 = 0; index122 < (mbt_ffi_load32((iter_base) + 16)); index122 = index122 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index122 * 8) - let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + array121.push(result120) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - let array177 : Array[@common.HttpEndpointDetails] = []; - for index178 = 0; index178 < (mbt_ffi_load32((iter_base) + 20)); index178 = index178 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index178 * 48) + Option::Some(array121) + } + _ => panic() + } - let lifted158 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let lifted124 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - @common.HttpMethod::Get + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() } - 1 => { - @common.HttpMethod::Head - } - 2 => { + let lifted125 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - @common.HttpMethod::Post + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() } - 3 => { - @common.HttpMethod::Put - } - 4 => { + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted123, min_bytes : lifted124, max_bytes : lifted125}) + } + 26 => { - @common.HttpMethod::Delete - } - 5 => { + let lifted129 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - @common.HttpMethod::Connect - } - 6 => { + let array127 : Array[String] = []; + for index128 = 0; index128 < (mbt_ffi_load32((iter_base) + 20)); index128 = index128 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index128 * 8) - @common.HttpMethod::Options - } - 7 => { + let result126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @common.HttpMethod::Trace - } - 8 => { + array127.push(result126) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @common.HttpMethod::Patch + Option::Some(array127) + } + _ => panic() } - 9 => { - let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let lifted133 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let array131 : Array[String] = []; + for index132 = 0; index132 < (mbt_ffi_load32((iter_base) + 32)); index132 = index132 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index132 * 8) + + let result130 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array131.push(result130) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - @common.HttpMethod::Custom(result157) + Option::Some(array131) + } + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted129, allowed_extensions : lifted133}) } + 27 => { - let array163 : Array[@common.PathSegment] = []; - for index164 = 0; index164 < (mbt_ffi_load32((iter_base) + 16)); index164 = index164 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index164 * 12) + let lifted137 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let lifted162 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let array135 : Array[String] = []; + for index136 = 0; index136 < (mbt_ffi_load32((iter_base) + 16)); index136 = index136 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index136 * 8) - let result159 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result134 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @common.PathSegment::Literal(result159) - } - 1 => { + array135.push(result134) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) + Option::Some(array135) } - 2 => { + _ => panic() + } - let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let lifted141 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result160}) - } - 3 => { + let array139 : Array[String] = []; + for index140 = 0; index140 < (mbt_ffi_load32((iter_base) + 28)); index140 = index140 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index140 * 8) + + let result138 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result161 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + array139.push(result138) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result161}) + Option::Some(array139) } _ => panic() } - array163.push(lifted162) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted137, allowed_hosts : lifted141}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + 28 => { + + @types.SchemaTypeBody::DatetimeType + } + 29 => { + + @types.SchemaTypeBody::DurationType + } + 30 => { - let array167 : Array[@common.HeaderVariable] = []; - for index168 = 0; index168 < (mbt_ffi_load32((iter_base) + 24)); index168 = index168 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index168 * 16) + let result142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array144 : Array[String] = []; + for index145 = 0; index145 < (mbt_ffi_load32((iter_base) + 20)); index145 = index145 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index145 * 8) - let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array167.push(@common.HeaderVariable::{header_name : result165, variable_name : result166}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) + array144.push(result143) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let array171 : Array[@common.QueryVariable] = []; - for index172 = 0; index172 < (mbt_ffi_load32((iter_base) + 32)); index172 = index172 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index172 * 16) + let lifted147 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - let result169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result146}) + } + _ => panic() + } - array171.push(@common.QueryVariable::{query_param_name : result169, variable_name : result170}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let lifted149 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let lifted173 : @common.AuthDetails? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@common.AuthDetails::{required : (mbt_ffi_load8_u((iter_base) + 37) != 0)}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result148}) + } + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result142, allowed_suffixes : array144, min : lifted147, max : lifted149}) } + 31 => { - let array175 : Array[String] = []; - for index176 = 0; index176 < (mbt_ffi_load32((iter_base) + 44)); index176 = index176 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index176 * 8) + let array173 : Array[@types.UnionBranch] = []; + for index174 = 0; index174 < (mbt_ffi_load32((iter_base) + 12)); index174 = index174 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index174 * 92) - let result174 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array175.push(result174) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) + let lifted159 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { - array177.push(@common.HttpEndpointDetails::{http_method : lifted158, path_suffix : array163, header_vars : array167, query_vars : array171, auth_details : lifted173, cors_options : @common.CorsOptions::{allowed_patterns : array175}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + let result151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted180 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.DiscriminatorRule::Prefix(result151) + } + 1 => { - let result179 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result179) - } - _ => panic() - } + @types.DiscriminatorRule::Suffix(result152) + } + 2 => { - let lifted198 = match (mbt_ffi_load8_u((iter_base) + 36)) { - 0 => { + let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Contains(result153) + } + 3 => { - let array196 : Array[@common.NamedField] = []; - for index197 = 0; index197 < (mbt_ffi_load32((iter_base) + 44)); index197 = index197 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index197 * 72) + let result154 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let result181 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.DiscriminatorRule::Regex(result154) + } + 4 => { - let lifted182 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @common.FieldSource::UserSupplied + let lifted157 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + + Option::Some(result156) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result155, literal : lifted157}) } - 1 => { + 5 => { - @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) + let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::FieldAbsent(result158) } _ => panic() } - let lifted184 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted161 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result183) + Option::Some(result160) } _ => panic() } - let array186 : Array[String] = []; - for index187 = 0; index187 < (mbt_ffi_load32((iter_base) + 32)); index187 = index187 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index187 * 8) + let array163 : Array[String] = []; + for index164 = 0; index164 < (mbt_ffi_load32((iter_base) + 52)); index164 = index164 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index164 * 8) - let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result162 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array186.push(result185) + array163.push(result162) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array189 : Array[String] = []; - for index190 = 0; index190 < (mbt_ffi_load32((iter_base) + 40)); index190 = index190 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index190 * 8) + let array166 : Array[String] = []; + for index167 = 0; index167 < (mbt_ffi_load32((iter_base) + 60)); index167 = index167 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index167 * 8) - let result188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array189.push(result188) + array166.push(result165) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted192 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted169 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result191 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result191) + Option::Some(result168) } _ => panic() } - let lifted195 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted172 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted194 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted171 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -1251,1570 +1417,1371 @@ pub fn get_all_agent_types() -> Array[@common.RegisteredAgentType] { } 3 => { - let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result193) + @types.Role::Other(result170) } _ => panic() } - Option::Some(lifted194) + Option::Some(lifted171) } _ => panic() } - array196.push(@common.NamedField::{name : result181, source : lifted182, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted184, aliases : array186, examples : array189, deprecated : lifted192, role : lifted195}}) + array173.push(@types.UnionBranch::{tag : result150, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted159, metadata : @types.MetadataEnvelope::{doc : lifted161, aliases : array163, examples : array166, deprecated : lifted169, role : lifted172}}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @common.InputSchema::Parameters(array196) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array173}) } - _ => panic() - } + 32 => { - let lifted199 = match (mbt_ffi_load8_u((iter_base) + 48)) { - 0 => { + let lifted176 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @common.OutputSchema::Unit - } - 1 => { + let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @common.OutputSchema::Single(mbt_ffi_load32((iter_base) + 52)) + Option::Some(result175) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted176}) } - _ => panic() - } + 33 => { - let lifted201 : @common.ReadOnlyConfig? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let lifted178 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let lifted200 = match (mbt_ffi_load8_u((iter_base) + 64)) { - 0 => { + let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @common.CachePolicy::NoCache + Option::Some(result177) } + _ => panic() + } + + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted178}) + } + 34 => { + + let lifted179 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None 1 => { - @common.CachePolicy::UntilWrite + Option::Some(mbt_ffi_load32((iter_base) + 12)) } - 2 => { + _ => panic() + } - @common.CachePolicy::Ttl((mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64()) + @types.SchemaTypeBody::FutureType(lifted179) + } + 35 => { + + let lifted180 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) } _ => panic() } - Option::Some(@common.ReadOnlyConfig::{cache_policy : lifted200, uses_principal : (mbt_ffi_load8_u((iter_base) + 80) != 0)}) + @types.SchemaTypeBody::StreamType(lifted180) } _ => panic() } - array202.push(@common.AgentMethod::{name : result155, description : result156, http_endpoint : array177, prompt_hint : lifted180, input_schema : lifted198, output_schema : lifted199, read_only : lifted201}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - - let array412 : Array[@common.AgentDependency] = []; - for index413 = 0; index413 < (mbt_ffi_load32((iter_base) + 100)); index413 = index413 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index413 * 92) - - let result204 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - let lifted206 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted183 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result182 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result205) + Option::Some(result182) } _ => panic() } - let array333 : Array[@types.SchemaTypeNode] = []; - for index334 = 0; index334 < (mbt_ffi_load32((iter_base) + 24)); index334 = index334 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index334 * 144) + let array185 : Array[String] = []; + for index186 = 0; index186 < (mbt_ffi_load32((iter_base) + 104)); index186 = index186 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index186 * 8) - let lifted319 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let result184 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { + array185.push(result184) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - @types.SchemaTypeBody::BoolType - } - 2 => { + let array188 : Array[String] = []; + for index189 = 0; index189 < (mbt_ffi_load32((iter_base) + 112)); index189 = index189 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index189 * 8) - @types.SchemaTypeBody::S8Type - } - 3 => { + let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaTypeBody::S16Type - } - 4 => { + array188.push(result187) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted191 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - @types.SchemaTypeBody::U8Type - } - 7 => { + Option::Some(result190) + } + _ => panic() + } - @types.SchemaTypeBody::U16Type - } - 8 => { + let lifted194 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + let lifted193 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { - @types.SchemaTypeBody::U64Type - } - 10 => { + @types.Role::Multimodal + } + 1 => { - @types.SchemaTypeBody::F32Type - } - 11 => { + @types.Role::UnstructuredText + } + 2 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + @types.Role::UnstructuredBinary + } + 3 => { - @types.SchemaTypeBody::CharType - } - 13 => { + let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.SchemaTypeBody::StringType + @types.Role::Other(result192) + } + _ => panic() } - 14 => { - - let array221 : Array[@types.NamedFieldType] = []; - for index222 = 0; index222 < (mbt_ffi_load32((iter_base) + 12)); index222 = index222 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index222 * 68) - let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - let lifted209 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { - - let result208 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + Option::Some(lifted193) + } + _ => panic() + } - Option::Some(result208) - } - _ => panic() - } + array195.push(@types.SchemaTypeNode::{body : lifted181, metadata : @types.MetadataEnvelope::{doc : lifted183, aliases : array185, examples : array188, deprecated : lifted191, role : lifted194}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array211 : Array[String] = []; - for index212 = 0; index212 < (mbt_ffi_load32((iter_base) + 28)); index212 = index212 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index212 * 8) + let array200 : Array[@types.SchemaTypeDef] = []; + for index201 = 0; index201 < (mbt_ffi_load32((iter_base) + 36)); index201 = index201 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index201 * 24) - let result210 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array211.push(result210) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted199 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array214 : Array[String] = []; - for index215 = 0; index215 < (mbt_ffi_load32((iter_base) + 36)); index215 = index215 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index215 * 8) + let result198 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - let result213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(result198) + } + _ => panic() + } - array214.push(result213) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + array200.push(@types.SchemaTypeDef::{id : result197, name : lifted199, body : mbt_ffi_load32((iter_base) + 20)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted217 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + let lifted203 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - let result216 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result216) - } - _ => panic() - } + Option::Some(result202) + } + _ => panic() + } - let lifted220 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let result204 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 56), mbt_ffi_load32((iter_base) + 60)) - let lifted219 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted206 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.Role::Multimodal - } - 1 => { + let result205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.Role::UnstructuredText - } - 2 => { + Option::Some(result205) + } + _ => panic() + } - @types.Role::UnstructuredBinary - } - 3 => { + let lifted224 = match (mbt_ffi_load8_u((iter_base) + 76)) { + 0 => { - let result218 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let array222 : Array[@common.NamedField] = []; + for index223 = 0; index223 < (mbt_ffi_load32((iter_base) + 84)); index223 = index223 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index223 * 72) - @types.Role::Other(result218) - } - _ => panic() - } + let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(lifted219) - } - _ => panic() - } + let lifted208 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { - array221.push(@types.NamedFieldType::{name : result207, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted209, aliases : array211, examples : array214, deprecated : lifted217, role : lifted220}}) + @common.FieldSource::UserSupplied } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + 1 => { - @types.SchemaTypeBody::RecordType(array221) + @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) + } + _ => panic() } - 15 => { - - let array238 : Array[@types.VariantCaseType] = []; - for index239 = 0; index239 < (mbt_ffi_load32((iter_base) + 12)); index239 = index239 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index239 * 72) - let result223 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted210 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted224 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result209 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + Option::Some(result209) + } + _ => panic() + } - let lifted226 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + let array212 : Array[String] = []; + for index213 = 0; index213 < (mbt_ffi_load32((iter_base) + 32)); index213 = index213 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index213 * 8) - let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result211 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(result225) - } - _ => panic() - } + array212.push(result211) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array228 : Array[String] = []; - for index229 = 0; index229 < (mbt_ffi_load32((iter_base) + 32)); index229 = index229 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index229 * 8) + let array215 : Array[String] = []; + for index216 = 0; index216 < (mbt_ffi_load32((iter_base) + 40)); index216 = index216 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index216 * 8) - let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result214 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array228.push(result227) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + array215.push(result214) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array231 : Array[String] = []; - for index232 = 0; index232 < (mbt_ffi_load32((iter_base) + 40)); index232 = index232 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index232 * 8) + let lifted218 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - array231.push(result230) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + Option::Some(result217) + } + _ => panic() + } - let lifted234 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + let lifted221 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let lifted220 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - Option::Some(result233) + @types.Role::Multimodal } - _ => panic() - } - - let lifted237 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None 1 => { - let lifted236 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { - - @types.Role::Multimodal - } - 1 => { - - @types.Role::UnstructuredText - } - 2 => { - - @types.Role::UnstructuredBinary - } - 3 => { + @types.Role::UnstructuredText + } + 2 => { - let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + @types.Role::UnstructuredBinary + } + 3 => { - @types.Role::Other(result235) - } - _ => panic() - } + let result219 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - Option::Some(lifted236) + @types.Role::Other(result219) } _ => panic() } - array238.push(@types.VariantCaseType::{name : result223, payload : lifted224, metadata : @types.MetadataEnvelope::{doc : lifted226, aliases : array228, examples : array231, deprecated : lifted234, role : lifted237}}) + Option::Some(lifted220) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::VariantType(array238) + _ => panic() } - 16 => { - let array241 : Array[String] = []; - for index242 = 0; index242 < (mbt_ffi_load32((iter_base) + 12)); index242 = index242 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index242 * 8) + array222.push(@common.NamedField::{name : result207, source : lifted208, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted210, aliases : array212, examples : array215, deprecated : lifted218, role : lifted221}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) - let result240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @common.InputSchema::Parameters(array222) + } + _ => panic() + } - array241.push(result240) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let array272 : Array[@common.AgentMethod] = []; + for index273 = 0; index273 < (mbt_ffi_load32((iter_base) + 92)); index273 = index273 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index273 * 88) - @types.SchemaTypeBody::EnumType(array241) - } - 17 => { + let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array244 : Array[String] = []; - for index245 = 0; index245 < (mbt_ffi_load32((iter_base) + 12)); index245 = index245 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index245 * 8) + let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array247 : Array[@common.HttpEndpointDetails] = []; + for index248 = 0; index248 < (mbt_ffi_load32((iter_base) + 20)); index248 = index248 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index248 * 48) - array244.push(result243) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted228 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - @types.SchemaTypeBody::FlagsType(array244) + @common.HttpMethod::Get } - 18 => { - - let array246 : Array[Int] = []; - for index247 = 0; index247 < (mbt_ffi_load32((iter_base) + 12)); index247 = index247 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index247 * 4) - - array246.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + 1 => { - @types.SchemaTypeBody::TupleType(array246) + @common.HttpMethod::Head } - 19 => { + 2 => { - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + @common.HttpMethod::Post } - 20 => { + 3 => { - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + @common.HttpMethod::Put } - 21 => { + 4 => { - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + @common.HttpMethod::Delete } - 22 => { + 5 => { - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + @common.HttpMethod::Connect } - 23 => { + 6 => { - let lifted248 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @common.HttpMethod::Options + } + 7 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @common.HttpMethod::Trace + } + 8 => { - let lifted249 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @common.HttpMethod::Patch + } + 9 => { - Option::Some(mbt_ffi_load32((iter_base) + 20)) - } - _ => panic() - } + let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted248, err : lifted249}) + @common.HttpMethod::Custom(result227) } - 24 => { + _ => panic() + } - let lifted253 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let array233 : Array[@common.PathSegment] = []; + for index234 = 0; index234 < (mbt_ffi_load32((iter_base) + 16)); index234 = index234 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index234 * 12) - let array251 : Array[String] = []; - for index252 = 0; index252 < (mbt_ffi_load32((iter_base) + 16)); index252 = index252 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index252 * 8) + let lifted232 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - let result250 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result229 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - array251.push(result250) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + @common.PathSegment::Literal(result229) + } + 1 => { - Option::Some(array251) - } - _ => panic() + @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) } + 2 => { - let lifted254 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() + @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result230}) } + 3 => { - let lifted255 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let result231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result231}) } - - let lifted257 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { - - let result256 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - - Option::Some(result256) - } - _ => panic() - } - - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted253, min_length : lifted254, max_length : lifted255, regex : lifted257}) + _ => panic() } - 25 => { - let lifted261 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + array233.push(lifted232) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - let array259 : Array[String] = []; - for index260 = 0; index260 < (mbt_ffi_load32((iter_base) + 16)); index260 = index260 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index260 * 8) + let array237 : Array[@common.HeaderVariable] = []; + for index238 = 0; index238 < (mbt_ffi_load32((iter_base) + 24)); index238 = index238 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index238 * 16) - let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array259.push(result258) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - Option::Some(array259) - } - _ => panic() - } + array237.push(@common.HeaderVariable::{header_name : result235, variable_name : result236}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) - let lifted262 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let array241 : Array[@common.QueryVariable] = []; + for index242 = 0; index242 < (mbt_ffi_load32((iter_base) + 32)); index242 = index242 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index242 * 16) - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let result239 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted263 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let result240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + array241.push(@common.QueryVariable::{query_param_name : result239, variable_name : result240}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + let lifted243 : @common.AuthDetails? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted261, min_bytes : lifted262, max_bytes : lifted263}) + Option::Some(@common.AuthDetails::{required : (mbt_ffi_load8_u((iter_base) + 37) != 0)}) } - 26 => { + _ => panic() + } - let lifted267 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let array245 : Array[String] = []; + for index246 = 0; index246 < (mbt_ffi_load32((iter_base) + 44)); index246 = index246 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index246 * 8) - let array265 : Array[String] = []; - for index266 = 0; index266 < (mbt_ffi_load32((iter_base) + 20)); index266 = index266 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index266 * 8) + let result244 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result264 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + array245.push(result244) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - array265.push(result264) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + array247.push(@common.HttpEndpointDetails::{http_method : lifted228, path_suffix : array233, header_vars : array237, query_vars : array241, auth_details : lifted243, cors_options : @common.CorsOptions::{allowed_patterns : array245}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array265) - } - _ => panic() - } + let lifted250 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - let lifted271 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + let result249 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - let array269 : Array[String] = []; - for index270 = 0; index270 < (mbt_ffi_load32((iter_base) + 32)); index270 = index270 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index270 * 8) + Option::Some(result249) + } + _ => panic() + } - let result268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted268 = match (mbt_ffi_load8_u((iter_base) + 36)) { + 0 => { - array269.push(result268) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let array266 : Array[@common.NamedField] = []; + for index267 = 0; index267 < (mbt_ffi_load32((iter_base) + 44)); index267 = index267 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index267 * 72) - Option::Some(array269) - } - _ => panic() - } + let result251 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted267, allowed_extensions : lifted271}) - } - 27 => { + let lifted252 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { - let lifted275 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None + @common.FieldSource::UserSupplied + } 1 => { - let array273 : Array[String] = []; - for index274 = 0; index274 < (mbt_ffi_load32((iter_base) + 16)); index274 = index274 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index274 * 8) - - let result272 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array273.push(result272) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - - Option::Some(array273) + @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) } _ => panic() } - let lifted279 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted254 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let array277 : Array[String] = []; - for index278 = 0; index278 < (mbt_ffi_load32((iter_base) + 28)); index278 = index278 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index278 * 8) - - let result276 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array277.push(result276) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let result253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(array277) + Option::Some(result253) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted275, allowed_hosts : lifted279}) - } - 28 => { - - @types.SchemaTypeBody::DatetimeType - } - 29 => { + let array256 : Array[String] = []; + for index257 = 0; index257 < (mbt_ffi_load32((iter_base) + 32)); index257 = index257 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index257 * 8) - @types.SchemaTypeBody::DurationType - } - 30 => { + let result255 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + array256.push(result255) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array282 : Array[String] = []; - for index283 = 0; index283 < (mbt_ffi_load32((iter_base) + 20)); index283 = index283 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index283 * 8) + let array259 : Array[String] = []; + for index260 = 0; index260 < (mbt_ffi_load32((iter_base) + 40)); index260 = index260 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index260 * 8) - let result281 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array282.push(result281) + array259.push(result258) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted285 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted262 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result284 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result284}) + Option::Some(result261) } _ => panic() } - let lifted287 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted265 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result286 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let lifted264 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result263 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + + @types.Role::Other(result263) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result286}) + Option::Some(lifted264) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result280, allowed_suffixes : array282, min : lifted285, max : lifted287}) + array266.push(@common.NamedField::{name : result251, source : lifted252, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted254, aliases : array256, examples : array259, deprecated : lifted262, role : lifted265}}) } - 31 => { - - let array311 : Array[@types.UnionBranch] = []; - for index312 = 0; index312 < (mbt_ffi_load32((iter_base) + 12)); index312 = index312 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index312 * 92) - - let result288 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - let lifted297 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let result289 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @common.InputSchema::Parameters(array266) + } + _ => panic() + } - @types.DiscriminatorRule::Prefix(result289) - } - 1 => { + let lifted269 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result290 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @common.OutputSchema::Unit + } + 1 => { - @types.DiscriminatorRule::Suffix(result290) - } - 2 => { + @common.OutputSchema::Single(mbt_ffi_load32((iter_base) + 52)) + } + _ => panic() + } - let result291 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted271 : @common.ReadOnlyConfig? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - @types.DiscriminatorRule::Contains(result291) - } - 3 => { + let lifted270 = match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => { - let result292 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @common.CachePolicy::NoCache + } + 1 => { - @types.DiscriminatorRule::Regex(result292) - } - 4 => { + @common.CachePolicy::UntilWrite + } + 2 => { - let result293 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @common.CachePolicy::Ttl((mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted295 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + Option::Some(@common.ReadOnlyConfig::{cache_policy : lifted270, uses_principal : (mbt_ffi_load8_u((iter_base) + 80) != 0)}) + } + _ => panic() + } - let result294 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + array272.push(@common.AgentMethod::{name : result225, description : result226, http_endpoint : array247, prompt_hint : lifted250, input_schema : lifted268, output_schema : lifted269, read_only : lifted271}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - Option::Some(result294) - } - _ => panic() - } + let array552 : Array[@common.AgentDependency] = []; + for index553 = 0; index553 < (mbt_ffi_load32((iter_base) + 100)); index553 = index553 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index553 * 92) - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result293, literal : lifted295}) - } - 5 => { + let result274 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result296 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted276 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.DiscriminatorRule::FieldAbsent(result296) - } - _ => panic() - } + let result275 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - let lifted299 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + Option::Some(result275) + } + _ => panic() + } - let result298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let array473 : Array[@types.SchemaTypeNode] = []; + for index474 = 0; index474 < (mbt_ffi_load32((iter_base) + 24)); index474 = index474 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index474 * 144) - Option::Some(result298) - } - _ => panic() - } + let lifted459 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - let array301 : Array[String] = []; - for index302 = 0; index302 < (mbt_ffi_load32((iter_base) + 52)); index302 = index302 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index302 * 8) + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { - let result300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::BoolType + } + 2 => { - array301.push(result300) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + let lifted283 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array304 : Array[String] = []; - for index305 = 0; index305 < (mbt_ffi_load32((iter_base) + 60)); index305 = index305 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index305 * 8) + let lifted278 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result303 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted277 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array304.push(result303) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted307 : String? = match mbt_ffi_load8_u((iter_base) + 64) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result306 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result306) + Option::Some(lifted277) + } + _ => panic() } - _ => panic() - } - let lifted310 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { - 0 => Option::None - 1 => { + let lifted280 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted309 = match (mbt_ffi_load8_u((iter_base) + 80)) { - 0 => { + let lifted279 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - - let result308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result308) - } - _ => panic() + Option::Some(lifted279) } - - Option::Some(lifted309) + _ => panic() } - _ => panic() - } - array311.push(@types.UnionBranch::{tag : result288, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted297, metadata : @types.MetadataEnvelope::{doc : lifted299, aliases : array301, examples : array304, deprecated : lifted307, role : lifted310}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array311}) - } - 32 => { + let lifted282 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted314 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result281 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result313 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + Option::Some(result281) + } + _ => panic() + } - Option::Some(result313) + Option::Some(@types.NumericRestrictions::{min : lifted278, max : lifted280, unit : lifted282}) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted314}) + @types.SchemaTypeBody::S8Type(lifted283) } - 33 => { + 3 => { - let lifted316 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted290 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result315 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let lifted285 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - Option::Some(result315) - } - _ => panic() - } + let lifted284 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted316}) - } - 34 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted317 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::FutureType(lifted317) - } - 35 => { + Option::Some(lifted284) + } + _ => panic() + } - let lifted318 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted287 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) + let lifted286 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted286) + } + _ => panic() + } + + let lifted289 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result288 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result288) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted285, max : lifted287, unit : lifted289}) } _ => panic() } - @types.SchemaTypeBody::StreamType(lifted318) + @types.SchemaTypeBody::S16Type(lifted290) } - _ => panic() - } - - let lifted321 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { - - let result320 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + 4 => { - Option::Some(result320) - } - _ => panic() - } + let lifted297 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array323 : Array[String] = []; - for index324 = 0; index324 < (mbt_ffi_load32((iter_base) + 104)); index324 = index324 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index324 * 8) + let lifted292 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result322 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted291 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array323.push(result322) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let array326 : Array[String] = []; - for index327 = 0; index327 < (mbt_ffi_load32((iter_base) + 112)); index327 = index327 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index327 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - array326.push(result325) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + Option::Some(lifted291) + } + _ => panic() + } - let lifted329 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + let lifted294 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result328 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let lifted293 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - Option::Some(result328) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted332 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted331 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.Role::Multimodal - } - 1 => { + Option::Some(lifted293) + } + _ => panic() + } - @types.Role::UnstructuredText - } - 2 => { + let lifted296 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredBinary - } - 3 => { + let result295 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result330 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + Option::Some(result295) + } + _ => panic() + } - @types.Role::Other(result330) + Option::Some(@types.NumericRestrictions::{min : lifted292, max : lifted294, unit : lifted296}) } _ => panic() } - Option::Some(lifted331) + @types.SchemaTypeBody::S32Type(lifted297) } - _ => panic() - } - - array333.push(@types.SchemaTypeNode::{body : lifted319, metadata : @types.MetadataEnvelope::{doc : lifted321, aliases : array323, examples : array326, deprecated : lifted329, role : lifted332}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) - - let array338 : Array[@types.SchemaTypeDef] = []; - for index339 = 0; index339 < (mbt_ffi_load32((iter_base) + 32)); index339 = index339 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index339 * 24) - - let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + 5 => { - let lifted337 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted304 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result336 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let lifted299 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - Option::Some(result336) - } - _ => panic() - } + let lifted298 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array338.push(@types.SchemaTypeDef::{id : result335, name : lifted337, body : mbt_ffi_load32((iter_base) + 20)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted341 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result340 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result340) - } - _ => panic() - } + Option::Some(lifted298) + } + _ => panic() + } - let result342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let lifted301 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted344 : String? = match mbt_ffi_load8_u((iter_base) + 60) { - 0 => Option::None - 1 => { + let lifted300 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - Option::Some(result343) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted362 = match (mbt_ffi_load8_u((iter_base) + 72)) { - 0 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let array360 : Array[@common.NamedField] = []; - for index361 = 0; index361 < (mbt_ffi_load32((iter_base) + 80)); index361 = index361 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 76)) + (index361 * 72) + Option::Some(lifted300) + } + _ => panic() + } - let result345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted303 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted346 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + let result302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @common.FieldSource::UserSupplied - } - 1 => { + Option::Some(result302) + } + _ => panic() + } - @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) + Option::Some(@types.NumericRestrictions::{min : lifted299, max : lifted301, unit : lifted303}) } _ => panic() } - let lifted348 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + @types.SchemaTypeBody::S64Type(lifted304) + } + 6 => { + + let lifted311 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - - Option::Some(result347) - } - _ => panic() - } - - let array350 : Array[String] = []; - for index351 = 0; index351 < (mbt_ffi_load32((iter_base) + 32)); index351 = index351 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index351 * 8) - - let result349 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted306 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - array350.push(result349) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let lifted305 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let array353 : Array[String] = []; - for index354 = 0; index354 < (mbt_ffi_load32((iter_base) + 40)); index354 = index354 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index354 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result352 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - array353.push(result352) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted356 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + Option::Some(lifted305) + } + _ => panic() + } - let result355 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let lifted308 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - Option::Some(result355) - } - _ => panic() - } + let lifted307 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted359 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted358 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.Role::UnstructuredText + Option::Some(lifted307) } - 2 => { + _ => panic() + } - @types.Role::UnstructuredBinary - } - 3 => { + let lifted310 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result357 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result309 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.Role::Other(result357) + Option::Some(result309) } _ => panic() } - Option::Some(lifted358) + Option::Some(@types.NumericRestrictions::{min : lifted306, max : lifted308, unit : lifted310}) } _ => panic() } - array360.push(@common.NamedField::{name : result345, source : lifted346, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted348, aliases : array350, examples : array353, deprecated : lifted356, role : lifted359}}) + @types.SchemaTypeBody::U8Type(lifted311) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 76)) + 7 => { - @common.InputSchema::Parameters(array360) - } - _ => panic() - } + let lifted318 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array410 : Array[@common.AgentMethod] = []; - for index411 = 0; index411 < (mbt_ffi_load32((iter_base) + 88)); index411 = index411 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index411 * 88) + let lifted313 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result363 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted312 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result364 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let array385 : Array[@common.HttpEndpointDetails] = []; - for index386 = 0; index386 < (mbt_ffi_load32((iter_base) + 20)); index386 = index386 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index386 * 48) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted366 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @common.HttpMethod::Get - } - 1 => { + Option::Some(lifted312) + } + _ => panic() + } - @common.HttpMethod::Head - } - 2 => { + let lifted315 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @common.HttpMethod::Post - } - 3 => { + let lifted314 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @common.HttpMethod::Put - } - 4 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @common.HttpMethod::Delete - } - 5 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @common.HttpMethod::Connect - } - 6 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @common.HttpMethod::Options - } - 7 => { + Option::Some(lifted314) + } + _ => panic() + } - @common.HttpMethod::Trace - } - 8 => { + let lifted317 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @common.HttpMethod::Patch - } - 9 => { + let result316 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result365 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + Option::Some(result316) + } + _ => panic() + } - @common.HttpMethod::Custom(result365) + Option::Some(@types.NumericRestrictions::{min : lifted313, max : lifted315, unit : lifted317}) + } + _ => panic() } - _ => panic() - } - - let array371 : Array[@common.PathSegment] = []; - for index372 = 0; index372 < (mbt_ffi_load32((iter_base) + 16)); index372 = index372 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index372 * 12) - let lifted370 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { - - let result367 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + @types.SchemaTypeBody::U16Type(lifted318) + } + 8 => { - @common.PathSegment::Literal(result367) - } + let lifted325 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None 1 => { - @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) - } - 2 => { + let lifted320 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result368 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let lifted319 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result368}) - } - 3 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result369 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result369}) - } - _ => panic() - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - array371.push(lifted370) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + Option::Some(lifted319) + } + _ => panic() + } - let array375 : Array[@common.HeaderVariable] = []; - for index376 = 0; index376 < (mbt_ffi_load32((iter_base) + 24)); index376 = index376 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index376 * 16) + let lifted322 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted321 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result374 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - array375.push(@common.HeaderVariable::{header_name : result373, variable_name : result374}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array379 : Array[@common.QueryVariable] = []; - for index380 = 0; index380 < (mbt_ffi_load32((iter_base) + 32)); index380 = index380 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index380 * 16) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result377 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted321) + } + _ => panic() + } - let result378 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted324 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - array379.push(@common.QueryVariable::{query_param_name : result377, variable_name : result378}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let result323 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted381 : @common.AuthDetails? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + Option::Some(result323) + } + _ => panic() + } - Option::Some(@common.AuthDetails::{required : (mbt_ffi_load8_u((iter_base) + 37) != 0)}) + Option::Some(@types.NumericRestrictions::{min : lifted320, max : lifted322, unit : lifted324}) + } + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::U32Type(lifted325) } + 9 => { - let array383 : Array[String] = []; - for index384 = 0; index384 < (mbt_ffi_load32((iter_base) + 44)); index384 = index384 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index384 * 8) + let lifted332 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted327 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - array383.push(result382) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) + let lifted326 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array385.push(@common.HttpEndpointDetails::{http_method : lifted366, path_suffix : array371, header_vars : array375, query_vars : array379, auth_details : lifted381, cors_options : @common.CorsOptions::{allowed_patterns : array383}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted388 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result387 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result387) - } - _ => panic() - } + Option::Some(lifted326) + } + _ => panic() + } - let lifted406 = match (mbt_ffi_load8_u((iter_base) + 36)) { - 0 => { + let lifted329 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array404 : Array[@common.NamedField] = []; - for index405 = 0; index405 < (mbt_ffi_load32((iter_base) + 44)); index405 = index405 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index405 * 72) + let lifted328 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result389 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted390 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @common.FieldSource::UserSupplied - } - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) + Option::Some(lifted328) + } + _ => panic() } - _ => panic() - } - let lifted392 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + let lifted331 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result391 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result330 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result391) + Option::Some(result330) + } + _ => panic() } - _ => panic() - } - let array394 : Array[String] = []; - for index395 = 0; index395 < (mbt_ffi_load32((iter_base) + 32)); index395 = index395 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index395 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted327, max : lifted329, unit : lifted331}) + } + _ => panic() + } - let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::U64Type(lifted332) + } + 10 => { - array394.push(result393) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let lifted339 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array397 : Array[String] = []; - for index398 = 0; index398 < (mbt_ffi_load32((iter_base) + 40)); index398 = index398 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index398 * 8) + let lifted334 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result396 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted333 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array397.push(result396) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted400 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result399 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result399) + Option::Some(lifted333) + } + _ => panic() } - _ => panic() - } - let lifted403 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let lifted336 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted402 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + let lifted335 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - - let result401 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result401) - } - _ => panic() + Option::Some(lifted335) } + _ => panic() + } - Option::Some(lifted402) + let lifted338 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result337 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result337) + } + _ => panic() } - _ => panic() - } - array404.push(@common.NamedField::{name : result389, source : lifted390, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted392, aliases : array394, examples : array397, deprecated : lifted400, role : lifted403}}) + Option::Some(@types.NumericRestrictions::{min : lifted334, max : lifted336, unit : lifted338}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - @common.InputSchema::Parameters(array404) + @types.SchemaTypeBody::F32Type(lifted339) } - _ => panic() - } + 11 => { - let lifted407 = match (mbt_ffi_load8_u((iter_base) + 48)) { - 0 => { + let lifted346 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @common.OutputSchema::Unit - } - 1 => { + let lifted341 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @common.OutputSchema::Single(mbt_ffi_load32((iter_base) + 52)) - } - _ => panic() - } + let lifted340 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted409 : @common.ReadOnlyConfig? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted408 = match (mbt_ffi_load8_u((iter_base) + 64)) { - 0 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @common.CachePolicy::NoCache - } - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @common.CachePolicy::UntilWrite - } - 2 => { + Option::Some(lifted340) + } + _ => panic() + } - @common.CachePolicy::Ttl((mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64()) - } - _ => panic() - } - - Option::Some(@common.ReadOnlyConfig::{cache_policy : lifted408, uses_principal : (mbt_ffi_load8_u((iter_base) + 80) != 0)}) - } - _ => panic() - } - - array410.push(@common.AgentMethod::{name : result363, description : result364, http_endpoint : array385, prompt_hint : lifted388, input_schema : lifted406, output_schema : lifted407, read_only : lifted409}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) - - array412.push(@common.AgentDependency::{type_name : result204, description : lifted206, schema : @types.SchemaGraph::{type_nodes : array333, defs : array338, root : mbt_ffi_load32((iter_base) + 36)}, constructor_ : @common.AgentConstructor::{name : lifted341, description : result342, prompt_hint : lifted344, input_schema : lifted362}, methods : array410}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 96)) - - let lifted430 : @common.HttpMountDetails? = match mbt_ffi_load8_u((iter_base) + 108) { - 0 => Option::None - 1 => { - - let array418 : Array[@common.PathSegment] = []; - for index419 = 0; index419 < (mbt_ffi_load32((iter_base) + 116)); index419 = index419 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 112)) + (index419 * 12) - - let lifted417 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { - - let result414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - - @common.PathSegment::Literal(result414) - } - 1 => { - - @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) - } - 2 => { - - let result415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - - @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result415}) - } - 3 => { - - let result416 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result416}) - } - _ => panic() - } - - array418.push(lifted417) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 112)) - - let lifted420 : @common.AuthDetails? = match mbt_ffi_load8_u((iter_base) + 120) { - 0 => Option::None - 1 => { - - Option::Some(@common.AuthDetails::{required : (mbt_ffi_load8_u((iter_base) + 121) != 0)}) - } - _ => panic() - } - - let array422 : Array[String] = []; - for index423 = 0; index423 < (mbt_ffi_load32((iter_base) + 128)); index423 = index423 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 124)) + (index423 * 8) - - let result421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array422.push(result421) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 124)) + let lifted343 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array428 : Array[@common.PathSegment] = []; - for index429 = 0; index429 < (mbt_ffi_load32((iter_base) + 136)); index429 = index429 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 132)) + (index429 * 12) + let lifted342 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted427 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result424 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @common.PathSegment::Literal(result424) - } - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) - } - 2 => { + Option::Some(lifted342) + } + _ => panic() + } - let result425 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let lifted345 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result425}) - } - 3 => { + let result344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result426 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + Option::Some(result344) + } + _ => panic() + } - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result426}) + Option::Some(@types.NumericRestrictions::{min : lifted341, max : lifted343, unit : lifted345}) + } + _ => panic() } - _ => panic() - } - - array428.push(lifted427) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 132)) - - Option::Some(@common.HttpMountDetails::{path_prefix : array418, auth_details : lifted420, phantom_agent : (mbt_ffi_load8_u((iter_base) + 122) != 0), cors_options : @common.CorsOptions::{allowed_patterns : array422}, webhook_suffix : array428}) - } - _ => panic() - } - - let lifted432 = match (mbt_ffi_load8_u((iter_base) + 144)) { - 0 => { - - @common.Snapshotting::Disabled - } - 1 => { - - let lifted431 = match (mbt_ffi_load8_u((iter_base) + 152)) { - 0 => { - - @common.SnapshottingConfig::Default - } - 1 => { - - @common.SnapshottingConfig::Periodic((mbt_ffi_load64((iter_base) + 160)).reinterpret_as_uint64()) - } - 2 => { - - @common.SnapshottingConfig::EveryNInvocation((mbt_ffi_load16_u((iter_base) + 160).land(0xFFFF).reinterpret_as_uint())) - } - _ => panic() - } - - @common.Snapshotting::Enabled(lifted431) - } - _ => panic() - } - - let array436 : Array[@common.AgentConfigDeclaration] = []; - for index437 = 0; index437 < (mbt_ffi_load32((iter_base) + 172)); index437 = index437 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 168)) + (index437 * 16) - - let array434 : Array[String] = []; - for index435 = 0; index435 < (mbt_ffi_load32((iter_base) + 8)); index435 = index435 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index435 * 8) - - let result433 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array434.push(result433) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) - - array436.push(@common.AgentConfigDeclaration::{source : @common.AgentConfigSource::from(mbt_ffi_load8_u((iter_base) + 0)), path : array434, value_type : mbt_ffi_load32((iter_base) + 12)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 168)) - - array438.push(@common.RegisteredAgentType::{agent_type : @common.AgentType::{type_name : result, description : result0, source_language : result1, schema : @types.SchemaGraph::{type_nodes : array125, defs : array130, root : mbt_ffi_load32((iter_base) + 40)}, constructor_ : @common.AgentConstructor::{name : lifted133, description : result134, prompt_hint : lifted136, input_schema : lifted154}, methods : array202, dependencies : array412, mode : @common.AgentMode::from(mbt_ffi_load8_u((iter_base) + 104)), http_mount : lifted430, snapshotting : lifted432, config : array436}, implemented_by : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 176)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 184)).reinterpret_as_uint64()}}}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 0)) - let ret = array438 - mbt_ffi_free(return_area) - return ret - -} -///| -/// Get a specific registered agent type by name -pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? { - - let ptr = mbt_ffi_str2ptr(agent_type_name) - let return_area = mbt_ffi_malloc(200) - wasmImportGetAgentType(ptr, agent_type_name.length(), return_area); - - let lifted438 : @common.RegisteredAgentType? = match mbt_ffi_load8_u((return_area) + 0) { - 0 => Option::None - 1 => { - - let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - - let result0 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) - - let result1 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 24), mbt_ffi_load32((return_area) + 28)) - - let array125 : Array[@types.SchemaTypeNode] = []; - for index126 = 0; index126 < (mbt_ffi_load32((return_area) + 36)); index126 = index126 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index126 * 144) - - let lifted111 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { - - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { - - @types.SchemaTypeBody::BoolType - } - 2 => { - - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { - - @types.SchemaTypeBody::S32Type - } - 5 => { - - @types.SchemaTypeBody::S64Type - } - 6 => { - - @types.SchemaTypeBody::U8Type - } - 7 => { - - @types.SchemaTypeBody::U16Type - } - 8 => { - - @types.SchemaTypeBody::U32Type - } - 9 => { - - @types.SchemaTypeBody::U64Type - } - 10 => { - @types.SchemaTypeBody::F32Type - } - 11 => { - - @types.SchemaTypeBody::F64Type + @types.SchemaTypeBody::F64Type(lifted346) } 12 => { @@ -2826,59 +2793,59 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 14 => { - let array13 : Array[@types.NamedFieldType] = []; - for index14 = 0; index14 < (mbt_ffi_load32((iter_base) + 12)); index14 = index14 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index14 * 68) + let array361 : Array[@types.NamedFieldType] = []; + for index362 = 0; index362 < (mbt_ffi_load32((iter_base) + 12)); index362 = index362 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index362 * 68) - let result2 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted349 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result3 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result348 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result3) + Option::Some(result348) } _ => panic() } - let array : Array[String] = []; - for index = 0; index < (mbt_ffi_load32((iter_base) + 28)); index = index + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index * 8) + let array351 : Array[String] = []; + for index352 = 0; index352 < (mbt_ffi_load32((iter_base) + 28)); index352 = index352 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index352 * 8) - let result4 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result350 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array.push(result4) + array351.push(result350) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array6 : Array[String] = []; - for index7 = 0; index7 < (mbt_ffi_load32((iter_base) + 36)); index7 = index7 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index7 * 8) + let array354 : Array[String] = []; + for index355 = 0; index355 < (mbt_ffi_load32((iter_base) + 36)); index355 = index355 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index355 * 8) - let result5 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result353 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array6.push(result5) + array354.push(result353) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted9 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted357 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result8 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result8) + Option::Some(result356) } _ => panic() } - let lifted12 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted360 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted11 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted359 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -2893,33 +2860,33 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 3 => { - let result10 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result358 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result10) + @types.Role::Other(result358) } _ => panic() } - Option::Some(lifted11) + Option::Some(lifted359) } _ => panic() } - array13.push(@types.NamedFieldType::{name : result2, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted, aliases : array, examples : array6, deprecated : lifted9, role : lifted12}}) + array361.push(@types.NamedFieldType::{name : result347, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted349, aliases : array351, examples : array354, deprecated : lifted357, role : lifted360}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array13) + @types.SchemaTypeBody::RecordType(array361) } 15 => { - let array30 : Array[@types.VariantCaseType] = []; - for index31 = 0; index31 < (mbt_ffi_load32((iter_base) + 12)); index31 = index31 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index31 * 72) + let array378 : Array[@types.VariantCaseType] = []; + for index379 = 0; index379 < (mbt_ffi_load32((iter_base) + 12)); index379 = index379 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index379 * 72) - let result15 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result363 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted16 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted364 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -2928,53 +2895,53 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - let lifted18 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted366 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result17 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result365 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result17) + Option::Some(result365) } _ => panic() } - let array20 : Array[String] = []; - for index21 = 0; index21 < (mbt_ffi_load32((iter_base) + 32)); index21 = index21 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index21 * 8) + let array368 : Array[String] = []; + for index369 = 0; index369 < (mbt_ffi_load32((iter_base) + 32)); index369 = index369 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index369 * 8) - let result19 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result367 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array20.push(result19) + array368.push(result367) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array23 : Array[String] = []; - for index24 = 0; index24 < (mbt_ffi_load32((iter_base) + 40)); index24 = index24 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index24 * 8) + let array371 : Array[String] = []; + for index372 = 0; index372 < (mbt_ffi_load32((iter_base) + 40)); index372 = index372 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index372 * 8) - let result22 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result370 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array23.push(result22) + array371.push(result370) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted26 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted374 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result25 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result25) + Option::Some(result373) } _ => panic() } - let lifted29 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted377 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted28 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted376 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -2989,63 +2956,63 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 3 => { - let result27 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result27) + @types.Role::Other(result375) } _ => panic() } - Option::Some(lifted28) + Option::Some(lifted376) } _ => panic() } - array30.push(@types.VariantCaseType::{name : result15, payload : lifted16, metadata : @types.MetadataEnvelope::{doc : lifted18, aliases : array20, examples : array23, deprecated : lifted26, role : lifted29}}) + array378.push(@types.VariantCaseType::{name : result363, payload : lifted364, metadata : @types.MetadataEnvelope::{doc : lifted366, aliases : array368, examples : array371, deprecated : lifted374, role : lifted377}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array30) + @types.SchemaTypeBody::VariantType(array378) } 16 => { - let array33 : Array[String] = []; - for index34 = 0; index34 < (mbt_ffi_load32((iter_base) + 12)); index34 = index34 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index34 * 8) + let array381 : Array[String] = []; + for index382 = 0; index382 < (mbt_ffi_load32((iter_base) + 12)); index382 = index382 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index382 * 8) - let result32 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array33.push(result32) + array381.push(result380) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array33) + @types.SchemaTypeBody::EnumType(array381) } 17 => { - let array36 : Array[String] = []; - for index37 = 0; index37 < (mbt_ffi_load32((iter_base) + 12)); index37 = index37 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index37 * 8) + let array384 : Array[String] = []; + for index385 = 0; index385 < (mbt_ffi_load32((iter_base) + 12)); index385 = index385 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index385 * 8) - let result35 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array36.push(result35) + array384.push(result383) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array36) + @types.SchemaTypeBody::FlagsType(array384) } 18 => { - let array38 : Array[Int] = []; - for index39 = 0; index39 < (mbt_ffi_load32((iter_base) + 12)); index39 = index39 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index39 * 4) + let array386 : Array[Int] = []; + for index387 = 0; index387 < (mbt_ffi_load32((iter_base) + 12)); index387 = index387 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index387 * 4) - array38.push(mbt_ffi_load32((iter_base) + 0)) + array386.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array38) + @types.SchemaTypeBody::TupleType(array386) } 19 => { @@ -3065,7 +3032,7 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 23 => { - let lifted40 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted388 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -3074,7 +3041,7 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - let lifted41 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted389 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -3083,30 +3050,30 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted40, err : lifted41}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted388, err : lifted389}) } 24 => { - let lifted45 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted393 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array43 : Array[String] = []; - for index44 = 0; index44 < (mbt_ffi_load32((iter_base) + 16)); index44 = index44 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index44 * 8) + let array391 : Array[String] = []; + for index392 = 0; index392 < (mbt_ffi_load32((iter_base) + 16)); index392 = index392 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index392 * 8) - let result42 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result390 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array43.push(result42) + array391.push(result390) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array43) + Option::Some(array391) } _ => panic() } - let lifted46 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted394 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -3115,7 +3082,7 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - let lifted47 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted395 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -3124,41 +3091,41 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - let lifted49 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted397 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result48 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result396 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result48) + Option::Some(result396) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted45, min_length : lifted46, max_length : lifted47, regex : lifted49}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted393, min_length : lifted394, max_length : lifted395, regex : lifted397}) } 25 => { - let lifted53 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted401 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array51 : Array[String] = []; - for index52 = 0; index52 < (mbt_ffi_load32((iter_base) + 16)); index52 = index52 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index52 * 8) + let array399 : Array[String] = []; + for index400 = 0; index400 < (mbt_ffi_load32((iter_base) + 16)); index400 = index400 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index400 * 8) - let result50 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result398 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array51.push(result50) + array399.push(result398) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array51) + Option::Some(array399) } _ => panic() } - let lifted54 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted402 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -3167,7 +3134,7 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - let lifted55 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted403 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -3176,91 +3143,91 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted53, min_bytes : lifted54, max_bytes : lifted55}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted401, min_bytes : lifted402, max_bytes : lifted403}) } 26 => { - let lifted59 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted407 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array57 : Array[String] = []; - for index58 = 0; index58 < (mbt_ffi_load32((iter_base) + 20)); index58 = index58 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index58 * 8) + let array405 : Array[String] = []; + for index406 = 0; index406 < (mbt_ffi_load32((iter_base) + 20)); index406 = index406 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index406 * 8) - let result56 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result404 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array57.push(result56) + array405.push(result404) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array57) + Option::Some(array405) } _ => panic() } - let lifted63 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted411 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array61 : Array[String] = []; - for index62 = 0; index62 < (mbt_ffi_load32((iter_base) + 32)); index62 = index62 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index62 * 8) + let array409 : Array[String] = []; + for index410 = 0; index410 < (mbt_ffi_load32((iter_base) + 32)); index410 = index410 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index410 * 8) - let result60 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result408 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array61.push(result60) + array409.push(result408) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array61) + Option::Some(array409) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted59, allowed_extensions : lifted63}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted407, allowed_extensions : lifted411}) } 27 => { - let lifted67 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted415 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array65 : Array[String] = []; - for index66 = 0; index66 < (mbt_ffi_load32((iter_base) + 16)); index66 = index66 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index66 * 8) + let array413 : Array[String] = []; + for index414 = 0; index414 < (mbt_ffi_load32((iter_base) + 16)); index414 = index414 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index414 * 8) - let result64 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result412 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array65.push(result64) + array413.push(result412) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array65) + Option::Some(array413) } _ => panic() } - let lifted71 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted419 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array69 : Array[String] = []; - for index70 = 0; index70 < (mbt_ffi_load32((iter_base) + 28)); index70 = index70 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index70 * 8) + let array417 : Array[String] = []; + for index418 = 0; index418 < (mbt_ffi_load32((iter_base) + 28)); index418 = index418 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index418 * 8) - let result68 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result416 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array69.push(result68) + array417.push(result416) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array69) + Option::Some(array417) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted67, allowed_hosts : lifted71}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted415, allowed_hosts : lifted419}) } 28 => { @@ -3272,148 +3239,148 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 30 => { - let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array74 : Array[String] = []; - for index75 = 0; index75 < (mbt_ffi_load32((iter_base) + 20)); index75 = index75 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index75 * 8) + let array422 : Array[String] = []; + for index423 = 0; index423 < (mbt_ffi_load32((iter_base) + 20)); index423 = index423 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index423 * 8) - let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array74.push(result73) + array422.push(result421) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted77 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted425 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result76 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result424 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result76}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result424}) } _ => panic() } - let lifted79 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted427 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result426 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result78}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result426}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result72, allowed_suffixes : array74, min : lifted77, max : lifted79}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result420, allowed_suffixes : array422, min : lifted425, max : lifted427}) } 31 => { - let array103 : Array[@types.UnionBranch] = []; - for index104 = 0; index104 < (mbt_ffi_load32((iter_base) + 12)); index104 = index104 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index104 * 92) + let array451 : Array[@types.UnionBranch] = []; + for index452 = 0; index452 < (mbt_ffi_load32((iter_base) + 12)); index452 = index452 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index452 * 92) - let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result428 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted89 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted437 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result429 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result81) + @types.DiscriminatorRule::Prefix(result429) } 1 => { - let result82 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result82) + @types.DiscriminatorRule::Suffix(result430) } 2 => { - let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result431 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result83) + @types.DiscriminatorRule::Contains(result431) } 3 => { - let result84 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result432 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result84) + @types.DiscriminatorRule::Regex(result432) } 4 => { - let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result433 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted87 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted435 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result434 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result86) + Option::Some(result434) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result85, literal : lifted87}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result433, literal : lifted435}) } 5 => { - let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result436 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result88) + @types.DiscriminatorRule::FieldAbsent(result436) } _ => panic() } - let lifted91 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted439 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result438 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result90) + Option::Some(result438) } _ => panic() } - let array93 : Array[String] = []; - for index94 = 0; index94 < (mbt_ffi_load32((iter_base) + 52)); index94 = index94 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index94 * 8) + let array441 : Array[String] = []; + for index442 = 0; index442 < (mbt_ffi_load32((iter_base) + 52)); index442 = index442 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index442 * 8) - let result92 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result440 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array93.push(result92) + array441.push(result440) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array96 : Array[String] = []; - for index97 = 0; index97 < (mbt_ffi_load32((iter_base) + 60)); index97 = index97 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index97 * 8) + let array444 : Array[String] = []; + for index445 = 0; index445 < (mbt_ffi_load32((iter_base) + 60)); index445 = index445 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index445 * 8) - let result95 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result443 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array96.push(result95) + array444.push(result443) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted99 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted447 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result98 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result446 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result98) + Option::Some(result446) } _ => panic() } - let lifted102 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted450 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted101 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted449 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -3428,57 +3395,57 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 3 => { - let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result448 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result100) + @types.Role::Other(result448) } _ => panic() } - Option::Some(lifted101) + Option::Some(lifted449) } _ => panic() } - array103.push(@types.UnionBranch::{tag : result80, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted89, metadata : @types.MetadataEnvelope::{doc : lifted91, aliases : array93, examples : array96, deprecated : lifted99, role : lifted102}}) + array451.push(@types.UnionBranch::{tag : result428, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted437, metadata : @types.MetadataEnvelope::{doc : lifted439, aliases : array441, examples : array444, deprecated : lifted447, role : lifted450}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array103}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array451}) } 32 => { - let lifted106 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted454 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result453 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result105) + Option::Some(result453) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted106}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted454}) } 33 => { - let lifted108 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted456 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result455 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result107) + Option::Some(result455) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted108}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted456}) } 34 => { - let lifted109 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted457 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -3487,11 +3454,11 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - @types.SchemaTypeBody::FutureType(lifted109) + @types.SchemaTypeBody::FutureType(lifted457) } 35 => { - let lifted110 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted458 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -3500,58 +3467,58 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - @types.SchemaTypeBody::StreamType(lifted110) + @types.SchemaTypeBody::StreamType(lifted458) } _ => panic() } - let lifted113 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted461 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result460 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result112) + Option::Some(result460) } _ => panic() } - let array115 : Array[String] = []; - for index116 = 0; index116 < (mbt_ffi_load32((iter_base) + 104)); index116 = index116 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index116 * 8) + let array463 : Array[String] = []; + for index464 = 0; index464 < (mbt_ffi_load32((iter_base) + 104)); index464 = index464 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index464 * 8) - let result114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result462 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array115.push(result114) + array463.push(result462) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array118 : Array[String] = []; - for index119 = 0; index119 < (mbt_ffi_load32((iter_base) + 112)); index119 = index119 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index119 * 8) + let array466 : Array[String] = []; + for index467 = 0; index467 < (mbt_ffi_load32((iter_base) + 112)); index467 = index467 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index467 * 8) - let result117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result465 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array118.push(result117) + array466.push(result465) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted121 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted469 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result468 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result120) + Option::Some(result468) } _ => panic() } - let lifted124 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted472 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted123 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted471 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -3566,77 +3533,77 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 3 => { - let result122 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result470 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result122) + @types.Role::Other(result470) } _ => panic() } - Option::Some(lifted123) + Option::Some(lifted471) } _ => panic() } - array125.push(@types.SchemaTypeNode::{body : lifted111, metadata : @types.MetadataEnvelope::{doc : lifted113, aliases : array115, examples : array118, deprecated : lifted121, role : lifted124}}) + array473.push(@types.SchemaTypeNode::{body : lifted459, metadata : @types.MetadataEnvelope::{doc : lifted461, aliases : array463, examples : array466, deprecated : lifted469, role : lifted472}}) } - mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) - let array130 : Array[@types.SchemaTypeDef] = []; - for index131 = 0; index131 < (mbt_ffi_load32((return_area) + 44)); index131 = index131 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 40)) + (index131 * 24) + let array478 : Array[@types.SchemaTypeDef] = []; + for index479 = 0; index479 < (mbt_ffi_load32((iter_base) + 32)); index479 = index479 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index479 * 24) - let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result475 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted129 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted477 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result128 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result476 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result128) + Option::Some(result476) } _ => panic() } - array130.push(@types.SchemaTypeDef::{id : result127, name : lifted129, body : mbt_ffi_load32((iter_base) + 20)}) + array478.push(@types.SchemaTypeDef::{id : result475, name : lifted477, body : mbt_ffi_load32((iter_base) + 20)}) } - mbt_ffi_free(mbt_ffi_load32((return_area) + 40)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let lifted133 : String? = match mbt_ffi_load8_u((return_area) + 52) { + let lifted481 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result132 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 56), mbt_ffi_load32((return_area) + 60)) + let result480 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result132) + Option::Some(result480) } _ => panic() } - let result134 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 64), mbt_ffi_load32((return_area) + 68)) + let result482 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - let lifted136 : String? = match mbt_ffi_load8_u((return_area) + 72) { + let lifted484 : String? = match mbt_ffi_load8_u((iter_base) + 60) { 0 => Option::None 1 => { - let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 76), mbt_ffi_load32((return_area) + 80)) + let result483 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - Option::Some(result135) + Option::Some(result483) } _ => panic() } - let lifted154 = match (mbt_ffi_load8_u((return_area) + 84)) { + let lifted502 = match (mbt_ffi_load8_u((iter_base) + 72)) { 0 => { - let array152 : Array[@common.NamedField] = []; - for index153 = 0; index153 < (mbt_ffi_load32((return_area) + 92)); index153 = index153 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 88)) + (index153 * 72) + let array500 : Array[@common.NamedField] = []; + for index501 = 0; index501 < (mbt_ffi_load32((iter_base) + 80)); index501 = index501 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 76)) + (index501 * 72) - let result137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result485 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted138 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted486 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { @common.FieldSource::UserSupplied @@ -3648,53 +3615,53 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - let lifted140 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted488 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result487 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result139) + Option::Some(result487) } _ => panic() } - let array142 : Array[String] = []; - for index143 = 0; index143 < (mbt_ffi_load32((iter_base) + 32)); index143 = index143 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index143 * 8) + let array490 : Array[String] = []; + for index491 = 0; index491 < (mbt_ffi_load32((iter_base) + 32)); index491 = index491 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index491 * 8) - let result141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result489 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array142.push(result141) + array490.push(result489) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array145 : Array[String] = []; - for index146 = 0; index146 < (mbt_ffi_load32((iter_base) + 40)); index146 = index146 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index146 * 8) + let array493 : Array[String] = []; + for index494 = 0; index494 < (mbt_ffi_load32((iter_base) + 40)); index494 = index494 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index494 * 8) - let result144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result492 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array145.push(result144) + array493.push(result492) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted148 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted496 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result495 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result147) + Option::Some(result495) } _ => panic() } - let lifted151 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted499 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted150 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted498 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -3709,40 +3676,40 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 3 => { - let result149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result497 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result149) + @types.Role::Other(result497) } _ => panic() } - Option::Some(lifted150) + Option::Some(lifted498) } _ => panic() } - array152.push(@common.NamedField::{name : result137, source : lifted138, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted140, aliases : array142, examples : array145, deprecated : lifted148, role : lifted151}}) + array500.push(@common.NamedField::{name : result485, source : lifted486, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted488, aliases : array490, examples : array493, deprecated : lifted496, role : lifted499}}) } - mbt_ffi_free(mbt_ffi_load32((return_area) + 88)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 76)) - @common.InputSchema::Parameters(array152) + @common.InputSchema::Parameters(array500) } _ => panic() } - let array202 : Array[@common.AgentMethod] = []; - for index203 = 0; index203 < (mbt_ffi_load32((return_area) + 100)); index203 = index203 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 96)) + (index203 * 88) + let array550 : Array[@common.AgentMethod] = []; + for index551 = 0; index551 < (mbt_ffi_load32((iter_base) + 88)); index551 = index551 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index551 * 88) - let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result503 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result504 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array177 : Array[@common.HttpEndpointDetails] = []; - for index178 = 0; index178 < (mbt_ffi_load32((iter_base) + 20)); index178 = index178 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index178 * 48) + let array525 : Array[@common.HttpEndpointDetails] = []; + for index526 = 0; index526 < (mbt_ffi_load32((iter_base) + 20)); index526 = index526 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index526 * 48) - let lifted158 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted506 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @common.HttpMethod::Get @@ -3781,23 +3748,23 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 9 => { - let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.HttpMethod::Custom(result157) + @common.HttpMethod::Custom(result505) } _ => panic() } - let array163 : Array[@common.PathSegment] = []; - for index164 = 0; index164 < (mbt_ffi_load32((iter_base) + 16)); index164 = index164 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index164 * 12) + let array511 : Array[@common.PathSegment] = []; + for index512 = 0; index512 < (mbt_ffi_load32((iter_base) + 16)); index512 = index512 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index512 * 12) - let lifted162 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted510 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result159 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result507 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.PathSegment::Literal(result159) + @common.PathSegment::Literal(result507) } 1 => { @@ -3805,48 +3772,48 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 2 => { - let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result508 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result160}) + @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result508}) } 3 => { - let result161 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result509 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result161}) + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result509}) } _ => panic() } - array163.push(lifted162) + array511.push(lifted510) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - let array167 : Array[@common.HeaderVariable] = []; - for index168 = 0; index168 < (mbt_ffi_load32((iter_base) + 24)); index168 = index168 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index168 * 16) + let array515 : Array[@common.HeaderVariable] = []; + for index516 = 0; index516 < (mbt_ffi_load32((iter_base) + 24)); index516 = index516 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index516 * 16) - let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result513 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result514 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array167.push(@common.HeaderVariable::{header_name : result165, variable_name : result166}) + array515.push(@common.HeaderVariable::{header_name : result513, variable_name : result514}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) - let array171 : Array[@common.QueryVariable] = []; - for index172 = 0; index172 < (mbt_ffi_load32((iter_base) + 32)); index172 = index172 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index172 * 16) + let array519 : Array[@common.QueryVariable] = []; + for index520 = 0; index520 < (mbt_ffi_load32((iter_base) + 32)); index520 = index520 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index520 * 16) - let result169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result517 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array171.push(@common.QueryVariable::{query_param_name : result169, variable_name : result170}) + array519.push(@common.QueryVariable::{query_param_name : result517, variable_name : result518}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let lifted173 : @common.AuthDetails? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted521 : @common.AuthDetails? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { @@ -3855,41 +3822,41 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - let array175 : Array[String] = []; - for index176 = 0; index176 < (mbt_ffi_load32((iter_base) + 44)); index176 = index176 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index176 * 8) + let array523 : Array[String] = []; + for index524 = 0; index524 < (mbt_ffi_load32((iter_base) + 44)); index524 = index524 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index524 * 8) - let result174 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result522 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array175.push(result174) + array523.push(result522) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - array177.push(@common.HttpEndpointDetails::{http_method : lifted158, path_suffix : array163, header_vars : array167, query_vars : array171, auth_details : lifted173, cors_options : @common.CorsOptions::{allowed_patterns : array175}}) + array525.push(@common.HttpEndpointDetails::{http_method : lifted506, path_suffix : array511, header_vars : array515, query_vars : array519, auth_details : lifted521, cors_options : @common.CorsOptions::{allowed_patterns : array523}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted180 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted528 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result179 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result527 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result179) + Option::Some(result527) } _ => panic() } - let lifted198 = match (mbt_ffi_load8_u((iter_base) + 36)) { + let lifted546 = match (mbt_ffi_load8_u((iter_base) + 36)) { 0 => { - let array196 : Array[@common.NamedField] = []; - for index197 = 0; index197 < (mbt_ffi_load32((iter_base) + 44)); index197 = index197 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index197 * 72) + let array544 : Array[@common.NamedField] = []; + for index545 = 0; index545 < (mbt_ffi_load32((iter_base) + 44)); index545 = index545 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index545 * 72) - let result181 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result529 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted182 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted530 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { @common.FieldSource::UserSupplied @@ -3901,53 +3868,53 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - let lifted184 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted532 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result531 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result183) + Option::Some(result531) } _ => panic() } - let array186 : Array[String] = []; - for index187 = 0; index187 < (mbt_ffi_load32((iter_base) + 32)); index187 = index187 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index187 * 8) + let array534 : Array[String] = []; + for index535 = 0; index535 < (mbt_ffi_load32((iter_base) + 32)); index535 = index535 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index535 * 8) - let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array186.push(result185) + array534.push(result533) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array189 : Array[String] = []; - for index190 = 0; index190 < (mbt_ffi_load32((iter_base) + 40)); index190 = index190 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index190 * 8) + let array537 : Array[String] = []; + for index538 = 0; index538 < (mbt_ffi_load32((iter_base) + 40)); index538 = index538 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index538 * 8) - let result188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result536 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array189.push(result188) + array537.push(result536) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted192 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted540 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result191 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result539 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result191) + Option::Some(result539) } _ => panic() } - let lifted195 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted543 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted194 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted542 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -3962,28 +3929,28 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 3 => { - let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result541 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result193) + @types.Role::Other(result541) } _ => panic() } - Option::Some(lifted194) + Option::Some(lifted542) } _ => panic() } - array196.push(@common.NamedField::{name : result181, source : lifted182, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted184, aliases : array186, examples : array189, deprecated : lifted192, role : lifted195}}) + array544.push(@common.NamedField::{name : result529, source : lifted530, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted532, aliases : array534, examples : array537, deprecated : lifted540, role : lifted543}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - @common.InputSchema::Parameters(array196) + @common.InputSchema::Parameters(array544) } _ => panic() } - let lifted199 = match (mbt_ffi_load8_u((iter_base) + 48)) { + let lifted547 = match (mbt_ffi_load8_u((iter_base) + 48)) { 0 => { @common.OutputSchema::Unit @@ -3995,11 +3962,11 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - let lifted201 : @common.ReadOnlyConfig? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted549 : @common.ReadOnlyConfig? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted200 = match (mbt_ffi_load8_u((iter_base) + 64)) { + let lifted548 = match (mbt_ffi_load8_u((iter_base) + 64)) { 0 => { @common.CachePolicy::NoCache @@ -4015,964 +3982,1003 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? _ => panic() } - Option::Some(@common.ReadOnlyConfig::{cache_policy : lifted200, uses_principal : (mbt_ffi_load8_u((iter_base) + 80) != 0)}) + Option::Some(@common.ReadOnlyConfig::{cache_policy : lifted548, uses_principal : (mbt_ffi_load8_u((iter_base) + 80) != 0)}) } _ => panic() } - array202.push(@common.AgentMethod::{name : result155, description : result156, http_endpoint : array177, prompt_hint : lifted180, input_schema : lifted198, output_schema : lifted199, read_only : lifted201}) + array550.push(@common.AgentMethod::{name : result503, description : result504, http_endpoint : array525, prompt_hint : lifted528, input_schema : lifted546, output_schema : lifted547, read_only : lifted549}) } - mbt_ffi_free(mbt_ffi_load32((return_area) + 96)) - - let array412 : Array[@common.AgentDependency] = []; - for index413 = 0; index413 < (mbt_ffi_load32((return_area) + 108)); index413 = index413 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 104)) + (index413 * 92) - - let result204 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - let lifted206 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) - let result205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + array552.push(@common.AgentDependency::{type_name : result274, description : lifted276, schema : @types.SchemaGraph::{type_nodes : array473, defs : array478, root : mbt_ffi_load32((iter_base) + 36)}, constructor_ : @common.AgentConstructor::{name : lifted481, description : result482, prompt_hint : lifted484, input_schema : lifted502}, methods : array550}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 96)) - Option::Some(result205) - } - _ => panic() - } + let lifted570 : @common.HttpMountDetails? = match mbt_ffi_load8_u((iter_base) + 108) { + 0 => Option::None + 1 => { - let array333 : Array[@types.SchemaTypeNode] = []; - for index334 = 0; index334 < (mbt_ffi_load32((iter_base) + 24)); index334 = index334 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index334 * 144) + let array558 : Array[@common.PathSegment] = []; + for index559 = 0; index559 < (mbt_ffi_load32((iter_base) + 116)); index559 = index559 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 112)) + (index559 * 12) - let lifted319 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted557 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + let result554 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + + @common.PathSegment::Literal(result554) } 1 => { - @types.SchemaTypeBody::BoolType + @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) } 2 => { - @types.SchemaTypeBody::S8Type + let result555 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + + @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result555}) } 3 => { - @types.SchemaTypeBody::S16Type - } - 4 => { + let result556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::S32Type + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result556}) } - 5 => { + _ => panic() + } - @types.SchemaTypeBody::S64Type - } - 6 => { + array558.push(lifted557) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 112)) - @types.SchemaTypeBody::U8Type - } - 7 => { + let lifted560 : @common.AuthDetails? = match mbt_ffi_load8_u((iter_base) + 120) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + Option::Some(@common.AuthDetails::{required : (mbt_ffi_load8_u((iter_base) + 121) != 0)}) + } + _ => panic() + } - @types.SchemaTypeBody::U32Type - } - 9 => { + let array562 : Array[String] = []; + for index563 = 0; index563 < (mbt_ffi_load32((iter_base) + 128)); index563 = index563 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 124)) + (index563 * 8) - @types.SchemaTypeBody::U64Type - } - 10 => { + let result561 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaTypeBody::F32Type - } - 11 => { + array562.push(result561) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 124)) - @types.SchemaTypeBody::F64Type - } - 12 => { + let array568 : Array[@common.PathSegment] = []; + for index569 = 0; index569 < (mbt_ffi_load32((iter_base) + 136)); index569 = index569 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 132)) + (index569 * 12) - @types.SchemaTypeBody::CharType - } - 13 => { + let lifted567 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - @types.SchemaTypeBody::StringType + let result564 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + + @common.PathSegment::Literal(result564) } - 14 => { + 1 => { - let array221 : Array[@types.NamedFieldType] = []; - for index222 = 0; index222 < (mbt_ffi_load32((iter_base) + 12)); index222 = index222 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index222 * 68) + @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) + } + 2 => { - let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let lifted209 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result565}) + } + 3 => { - let result208 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - Option::Some(result208) - } - _ => panic() - } + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result566}) + } + _ => panic() + } - let array211 : Array[String] = []; - for index212 = 0; index212 < (mbt_ffi_load32((iter_base) + 28)); index212 = index212 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index212 * 8) + array568.push(lifted567) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 132)) - let result210 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(@common.HttpMountDetails::{path_prefix : array558, auth_details : lifted560, phantom_agent : (mbt_ffi_load8_u((iter_base) + 122) != 0), cors_options : @common.CorsOptions::{allowed_patterns : array562}, webhook_suffix : array568}) + } + _ => panic() + } - array211.push(result210) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted572 = match (mbt_ffi_load8_u((iter_base) + 144)) { + 0 => { - let array214 : Array[String] = []; - for index215 = 0; index215 < (mbt_ffi_load32((iter_base) + 36)); index215 = index215 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index215 * 8) + @common.Snapshotting::Disabled + } + 1 => { - let result213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted571 = match (mbt_ffi_load8_u((iter_base) + 152)) { + 0 => { - array214.push(result213) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @common.SnapshottingConfig::Default + } + 1 => { - let lifted217 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @common.SnapshottingConfig::Periodic((mbt_ffi_load64((iter_base) + 160)).reinterpret_as_uint64()) + } + 2 => { - let result216 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @common.SnapshottingConfig::EveryNInvocation((mbt_ffi_load16_u((iter_base) + 160).land(0xFFFF).reinterpret_as_uint())) + } + _ => panic() + } - Option::Some(result216) - } - _ => panic() - } + @common.Snapshotting::Enabled(lifted571) + } + _ => panic() + } + + let array576 : Array[@common.AgentConfigDeclaration] = []; + for index577 = 0; index577 < (mbt_ffi_load32((iter_base) + 172)); index577 = index577 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 168)) + (index577 * 16) + + let array574 : Array[String] = []; + for index575 = 0; index575 < (mbt_ffi_load32((iter_base) + 8)); index575 = index575 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index575 * 8) + + let result573 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array574.push(result573) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) + + array576.push(@common.AgentConfigDeclaration::{source : @common.AgentConfigSource::from(mbt_ffi_load8_u((iter_base) + 0)), path : array574, value_type : mbt_ffi_load32((iter_base) + 12)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 168)) + + array578.push(@common.RegisteredAgentType::{agent_type : @common.AgentType::{type_name : result, description : result0, source_language : result1, schema : @types.SchemaGraph::{type_nodes : array195, defs : array200, root : mbt_ffi_load32((iter_base) + 40)}, constructor_ : @common.AgentConstructor::{name : lifted203, description : result204, prompt_hint : lifted206, input_schema : lifted224}, methods : array272, dependencies : array552, mode : @common.AgentMode::from(mbt_ffi_load8_u((iter_base) + 104)), http_mount : lifted570, snapshotting : lifted572, config : array576}, implemented_by : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 176)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 184)).reinterpret_as_uint64()}}}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 0)) + let ret = array578 + mbt_ffi_free(return_area) + return ret + +} +///| +/// Get a specific registered agent type by name +pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? { - let lifted220 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let ptr = mbt_ffi_str2ptr(agent_type_name) + let return_area = mbt_ffi_malloc(200) + wasmImportGetAgentType(ptr, agent_type_name.length(), return_area); + + let lifted578 : @common.RegisteredAgentType? = match mbt_ffi_load8_u((return_area) + 0) { + 0 => Option::None + 1 => { + + let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + + let result0 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + + let result1 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 24), mbt_ffi_load32((return_area) + 28)) + + let array195 : Array[@types.SchemaTypeNode] = []; + for index196 = 0; index196 < (mbt_ffi_load32((return_area) + 36)); index196 = index196 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index196 * 144) + + let lifted181 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { + + @types.SchemaTypeBody::BoolType + } + 2 => { + + let lifted7 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let lifted219 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted = match (mbt_ffi_load8_u((iter_base) + 24)) { 0 => { - @types.Role::Multimodal + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) } 1 => { - @types.Role::UnstructuredText + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) } 2 => { - @types.Role::UnstructuredBinary - } - 3 => { - - let result218 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result218) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) } _ => panic() } - Option::Some(lifted219) + Option::Some(lifted) } _ => panic() } - array221.push(@types.NamedFieldType::{name : result207, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted209, aliases : array211, examples : array214, deprecated : lifted217, role : lifted220}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted4 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::RecordType(array221) - } - 15 => { + let lifted3 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array238 : Array[@types.VariantCaseType] = []; - for index239 = 0; index239 < (mbt_ffi_load32((iter_base) + 12)); index239 = index239 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index239 * 72) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result223 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted224 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(mbt_ffi_load32((iter_base) + 12)) + Option::Some(lifted3) } _ => panic() } - let lifted226 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted6 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result5 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result225) + Option::Some(result5) } _ => panic() } - let array228 : Array[String] = []; - for index229 = 0; index229 < (mbt_ffi_load32((iter_base) + 32)); index229 = index229 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index229 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted2, max : lifted4, unit : lifted6}) + } + _ => panic() + } - let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted7) + } + 3 => { - array228.push(result227) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let lifted14 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array231 : Array[String] = []; - for index232 = 0; index232 < (mbt_ffi_load32((iter_base) + 40)); index232 = index232 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index232 * 8) + let lifted9 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted8 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array231.push(result230) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted234 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result233) + Option::Some(lifted8) } _ => panic() } - let lifted237 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted11 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let lifted236 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted10 = match (mbt_ffi_load8_u((iter_base) + 48)) { 0 => { - @types.Role::Multimodal + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) } 1 => { - @types.Role::UnstructuredText + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) } 2 => { - @types.Role::UnstructuredBinary - } - 3 => { - - let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - - @types.Role::Other(result235) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) } _ => panic() } - Option::Some(lifted236) + Option::Some(lifted10) } _ => panic() } - array238.push(@types.VariantCaseType::{name : result223, payload : lifted224, metadata : @types.MetadataEnvelope::{doc : lifted226, aliases : array228, examples : array231, deprecated : lifted234, role : lifted237}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::VariantType(array238) - } - 16 => { + let lifted13 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let array241 : Array[String] = []; - for index242 = 0; index242 < (mbt_ffi_load32((iter_base) + 12)); index242 = index242 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index242 * 8) + let result12 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(result12) + } + _ => panic() + } - array241.push(result240) + Option::Some(@types.NumericRestrictions::{min : lifted9, max : lifted11, unit : lifted13}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::EnumType(array241) + _ => panic() } - 17 => { - let array244 : Array[String] = []; - for index245 = 0; index245 < (mbt_ffi_load32((iter_base) + 12)); index245 = index245 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index245 * 8) + @types.SchemaTypeBody::S16Type(lifted14) + } + 4 => { - let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted21 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array244.push(result243) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted16 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::FlagsType(array244) - } - 18 => { + let lifted15 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let array246 : Array[Int] = []; - for index247 = 0; index247 < (mbt_ffi_load32((iter_base) + 12)); index247 = index247 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index247 * 4) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - array246.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::TupleType(array246) - } - 19 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + Option::Some(lifted15) + } + _ => panic() + } - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + let lifted18 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + let lifted17 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) - } - 23 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted248 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted17) + } + _ => panic() } - _ => panic() - } - let lifted249 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + let lifted20 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 20)) + let result19 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result19) + } + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted248, err : lifted249}) + Option::Some(@types.NumericRestrictions::{min : lifted16, max : lifted18, unit : lifted20}) + } + _ => panic() } - 24 => { - let lifted253 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::S32Type(lifted21) + } + 5 => { - let array251 : Array[String] = []; - for index252 = 0; index252 < (mbt_ffi_load32((iter_base) + 16)); index252 = index252 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index252 * 8) + let lifted28 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result250 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted23 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - array251.push(result250) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + let lifted22 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(array251) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted254 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted22) + } + _ => panic() } - _ => panic() - } - let lifted255 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { - - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } - - let lifted257 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { - - let result256 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - - Option::Some(result256) - } - _ => panic() - } + let lifted25 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted253, min_length : lifted254, max_length : lifted255, regex : lifted257}) - } - 25 => { + let lifted24 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted261 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let array259 : Array[String] = []; - for index260 = 0; index260 < (mbt_ffi_load32((iter_base) + 16)); index260 = index260 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index260 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array259.push(result258) + Option::Some(lifted24) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - - Option::Some(array259) + _ => panic() } - _ => panic() - } - - let lifted262 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let lifted27 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted263 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let result26 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + Option::Some(result26) + } + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted261, min_bytes : lifted262, max_bytes : lifted263}) + Option::Some(@types.NumericRestrictions::{min : lifted23, max : lifted25, unit : lifted27}) + } + _ => panic() } - 26 => { - - let lifted267 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { - let array265 : Array[String] = []; - for index266 = 0; index266 < (mbt_ffi_load32((iter_base) + 20)); index266 = index266 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index266 * 8) + @types.SchemaTypeBody::S64Type(lifted28) + } + 6 => { - let result264 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted35 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array265.push(result264) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + let lifted30 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - Option::Some(array265) - } - _ => panic() - } + let lifted29 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted271 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let array269 : Array[String] = []; - for index270 = 0; index270 < (mbt_ffi_load32((iter_base) + 32)); index270 = index270 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index270 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - array269.push(result268) + Option::Some(lifted29) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - - Option::Some(array269) + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted267, allowed_extensions : lifted271}) - } - 27 => { + let lifted32 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted275 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted31 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array273 : Array[String] = []; - for index274 = 0; index274 < (mbt_ffi_load32((iter_base) + 16)); index274 = index274 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index274 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result272 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - array273.push(result272) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(array273) + Option::Some(lifted31) + } + _ => panic() } - _ => panic() - } - - let lifted279 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { - let array277 : Array[String] = []; - for index278 = 0; index278 < (mbt_ffi_load32((iter_base) + 28)); index278 = index278 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index278 * 8) + let lifted34 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result276 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result33 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array277.push(result276) + Option::Some(result33) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - - Option::Some(array277) + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted275, allowed_hosts : lifted279}) - } - 28 => { - - @types.SchemaTypeBody::DatetimeType - } - 29 => { - - @types.SchemaTypeBody::DurationType + Option::Some(@types.NumericRestrictions::{min : lifted30, max : lifted32, unit : lifted34}) + } + _ => panic() } - 30 => { - - let result280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array282 : Array[String] = []; - for index283 = 0; index283 < (mbt_ffi_load32((iter_base) + 20)); index283 = index283 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index283 * 8) - - let result281 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::U8Type(lifted35) + } + 7 => { - array282.push(result281) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + let lifted42 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let lifted285 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + let lifted37 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result284 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let lifted36 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result284}) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted287 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result286 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result286}) + Option::Some(lifted36) + } + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result280, allowed_suffixes : array282, min : lifted285, max : lifted287}) - } - 31 => { + let lifted39 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array311 : Array[@types.UnionBranch] = []; - for index312 = 0; index312 < (mbt_ffi_load32((iter_base) + 12)); index312 = index312 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index312 * 92) + let lifted38 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result288 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted297 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result289 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.DiscriminatorRule::Prefix(result289) + Option::Some(lifted38) } + _ => panic() + } + + let lifted41 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None 1 => { - let result290 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result40 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.DiscriminatorRule::Suffix(result290) + Option::Some(result40) } - 2 => { + _ => panic() + } - let result291 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + Option::Some(@types.NumericRestrictions::{min : lifted37, max : lifted39, unit : lifted41}) + } + _ => panic() + } - @types.DiscriminatorRule::Contains(result291) - } - 3 => { + @types.SchemaTypeBody::U16Type(lifted42) + } + 8 => { - let result292 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted49 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.DiscriminatorRule::Regex(result292) - } - 4 => { + let lifted44 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result293 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted43 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted295 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } 1 => { - let result294 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(result294) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result293, literal : lifted295}) - } - 5 => { - - let result296 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - @types.DiscriminatorRule::FieldAbsent(result296) + Option::Some(lifted43) } _ => panic() } - let lifted299 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted46 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let lifted45 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - Option::Some(result298) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted45) } _ => panic() } - let array301 : Array[String] = []; - for index302 = 0; index302 < (mbt_ffi_load32((iter_base) + 52)); index302 = index302 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index302 * 8) + let lifted48 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result47 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array301.push(result300) + Option::Some(result47) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array304 : Array[String] = []; - for index305 = 0; index305 < (mbt_ffi_load32((iter_base) + 60)); index305 = index305 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index305 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted44, max : lifted46, unit : lifted48}) + } + _ => panic() + } - let result303 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::U32Type(lifted49) + } + 9 => { - array304.push(result303) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + let lifted56 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let lifted307 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted51 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result306 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let lifted50 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(result306) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted50) } _ => panic() } - let lifted310 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted53 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let lifted309 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted52 = match (mbt_ffi_load8_u((iter_base) + 48)) { 0 => { - @types.Role::Multimodal + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) } 1 => { - @types.Role::UnstructuredText + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) } 2 => { - @types.Role::UnstructuredBinary - } - 3 => { - - let result308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - - @types.Role::Other(result308) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) } _ => panic() } - Option::Some(lifted309) + Option::Some(lifted52) } _ => panic() } - array311.push(@types.UnionBranch::{tag : result288, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted297, metadata : @types.MetadataEnvelope::{doc : lifted299, aliases : array301, examples : array304, deprecated : lifted307, role : lifted310}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array311}) - } - 32 => { - - let lifted314 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted55 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result313 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result54 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result313) + Option::Some(result54) + } + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted314}) + Option::Some(@types.NumericRestrictions::{min : lifted51, max : lifted53, unit : lifted55}) + } + _ => panic() } - 33 => { - let lifted316 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { - - let result315 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + @types.SchemaTypeBody::U64Type(lifted56) + } + 10 => { - Option::Some(result315) - } - _ => panic() - } + let lifted63 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted316}) - } - 34 => { + let lifted58 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted317 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted57 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::FutureType(lifted317) - } - 35 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted318 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(mbt_ffi_load32((iter_base) + 12)) + Option::Some(lifted57) + } + _ => panic() } - _ => panic() - } - - @types.SchemaTypeBody::StreamType(lifted318) - } - _ => panic() - } - - let lifted321 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { - let result320 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - - Option::Some(result320) - } - _ => panic() - } + let lifted60 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array323 : Array[String] = []; - for index324 = 0; index324 < (mbt_ffi_load32((iter_base) + 104)); index324 = index324 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index324 * 8) + let lifted59 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result322 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - array323.push(result322) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array326 : Array[String] = []; - for index327 = 0; index327 < (mbt_ffi_load32((iter_base) + 112)); index327 = index327 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index327 * 8) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted59) + } + _ => panic() + } - array326.push(result325) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + let lifted62 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted329 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + let result61 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result328 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + Option::Some(result61) + } + _ => panic() + } - Option::Some(result328) + Option::Some(@types.NumericRestrictions::{min : lifted58, max : lifted60, unit : lifted62}) + } + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::F32Type(lifted63) } + 11 => { - let lifted332 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + let lifted70 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let lifted331 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + let lifted65 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.Role::Multimodal - } - 1 => { + let lifted64 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.Role::UnstructuredBinary - } - 3 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result330 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.Role::Other(result330) + Option::Some(lifted64) + } + _ => panic() } - _ => panic() - } - Option::Some(lifted331) - } - _ => panic() - } + let lifted67 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - array333.push(@types.SchemaTypeNode::{body : lifted319, metadata : @types.MetadataEnvelope::{doc : lifted321, aliases : array323, examples : array326, deprecated : lifted329, role : lifted332}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) + let lifted66 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array338 : Array[@types.SchemaTypeDef] = []; - for index339 = 0; index339 < (mbt_ffi_load32((iter_base) + 32)); index339 = index339 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index339 * 24) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted337 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result336 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + Option::Some(lifted66) + } + _ => panic() + } - Option::Some(result336) - } - _ => panic() - } + let lifted69 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - array338.push(@types.SchemaTypeDef::{id : result335, name : lifted337, body : mbt_ffi_load32((iter_base) + 20)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let result68 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted341 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + Option::Some(result68) + } + _ => panic() + } - let result340 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + Option::Some(@types.NumericRestrictions::{min : lifted65, max : lifted67, unit : lifted69}) + } + _ => panic() + } - Option::Some(result340) + @types.SchemaTypeBody::F64Type(lifted70) } - _ => panic() - } - - let result342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - - let lifted344 : String? = match mbt_ffi_load8_u((iter_base) + 60) { - 0 => Option::None - 1 => { - - let result343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + 12 => { - Option::Some(result343) + @types.SchemaTypeBody::CharType } - _ => panic() - } - - let lifted362 = match (mbt_ffi_load8_u((iter_base) + 72)) { - 0 => { - - let array360 : Array[@common.NamedField] = []; - for index361 = 0; index361 < (mbt_ffi_load32((iter_base) + 80)); index361 = index361 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 76)) + (index361 * 72) - - let result345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + 13 => { - let lifted346 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + @types.SchemaTypeBody::StringType + } + 14 => { - @common.FieldSource::UserSupplied - } - 1 => { + let array83 : Array[@types.NamedFieldType] = []; + for index84 = 0; index84 < (mbt_ffi_load32((iter_base) + 12)); index84 = index84 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index84 * 68) - @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) - } - _ => panic() - } + let result71 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted348 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted73 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result347) + Option::Some(result72) } _ => panic() } - let array350 : Array[String] = []; - for index351 = 0; index351 < (mbt_ffi_load32((iter_base) + 32)); index351 = index351 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index351 * 8) + let array : Array[String] = []; + for index = 0; index < (mbt_ffi_load32((iter_base) + 28)); index = index + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index * 8) - let result349 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result74 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array350.push(result349) + array.push(result74) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array353 : Array[String] = []; - for index354 = 0; index354 < (mbt_ffi_load32((iter_base) + 40)); index354 = index354 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index354 * 8) + let array76 : Array[String] = []; + for index77 = 0; index77 < (mbt_ffi_load32((iter_base) + 36)); index77 = index77 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index77 * 8) - let result352 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result75 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array353.push(result352) + array76.push(result75) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted356 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted79 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result355 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result355) + Option::Some(result78) } _ => panic() } - let lifted359 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted82 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted358 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted81 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -4987,2752 +4993,2786 @@ pub fn get_agent_type(agent_type_name : String) -> @common.RegisteredAgentType? } 3 => { - let result357 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result357) + @types.Role::Other(result80) } _ => panic() } - Option::Some(lifted358) + Option::Some(lifted81) } _ => panic() } - array360.push(@common.NamedField::{name : result345, source : lifted346, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted348, aliases : array350, examples : array353, deprecated : lifted356, role : lifted359}}) + array83.push(@types.NamedFieldType::{name : result71, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted73, aliases : array, examples : array76, deprecated : lifted79, role : lifted82}}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 76)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @common.InputSchema::Parameters(array360) + @types.SchemaTypeBody::RecordType(array83) } - _ => panic() - } + 15 => { - let array410 : Array[@common.AgentMethod] = []; - for index411 = 0; index411 < (mbt_ffi_load32((iter_base) + 88)); index411 = index411 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index411 * 88) + let array100 : Array[@types.VariantCaseType] = []; + for index101 = 0; index101 < (mbt_ffi_load32((iter_base) + 12)); index101 = index101 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index101 * 72) - let result363 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result364 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted86 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array385 : Array[@common.HttpEndpointDetails] = []; - for index386 = 0; index386 < (mbt_ffi_load32((iter_base) + 20)); index386 = index386 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index386 * 48) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - let lifted366 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let lifted88 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @common.HttpMethod::Get - } - 1 => { + let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @common.HttpMethod::Head + Option::Some(result87) + } + _ => panic() } - 2 => { - @common.HttpMethod::Post - } - 3 => { + let array90 : Array[String] = []; + for index91 = 0; index91 < (mbt_ffi_load32((iter_base) + 32)); index91 = index91 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index91 * 8) - @common.HttpMethod::Put - } - 4 => { + let result89 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @common.HttpMethod::Delete + array90.push(result89) } - 5 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - @common.HttpMethod::Connect - } - 6 => { + let array93 : Array[String] = []; + for index94 = 0; index94 < (mbt_ffi_load32((iter_base) + 40)); index94 = index94 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index94 * 8) - @common.HttpMethod::Options - } - 7 => { + let result92 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @common.HttpMethod::Trace + array93.push(result92) } - 8 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - @common.HttpMethod::Patch - } - 9 => { + let lifted96 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - let result365 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result95 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - @common.HttpMethod::Custom(result365) + Option::Some(result95) + } + _ => panic() } - _ => panic() - } - let array371 : Array[@common.PathSegment] = []; - for index372 = 0; index372 < (mbt_ffi_load32((iter_base) + 16)); index372 = index372 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index372 * 12) - - let lifted370 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let lifted99 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let result367 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let lifted98 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - @common.PathSegment::Literal(result367) - } - 1 => { + @types.Role::Multimodal + } + 1 => { - @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) - } - 2 => { + @types.Role::UnstructuredText + } + 2 => { - let result368 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + @types.Role::UnstructuredBinary + } + 3 => { - @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result368}) - } - 3 => { + let result97 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - let result369 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + @types.Role::Other(result97) + } + _ => panic() + } - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result369}) + Option::Some(lifted98) } _ => panic() } - array371.push(lifted370) + array100.push(@types.VariantCaseType::{name : result85, payload : lifted86, metadata : @types.MetadataEnvelope::{doc : lifted88, aliases : array90, examples : array93, deprecated : lifted96, role : lifted99}}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array375 : Array[@common.HeaderVariable] = []; - for index376 = 0; index376 < (mbt_ffi_load32((iter_base) + 24)); index376 = index376 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index376 * 16) + @types.SchemaTypeBody::VariantType(array100) + } + 16 => { - let result373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array103 : Array[String] = []; + for index104 = 0; index104 < (mbt_ffi_load32((iter_base) + 12)); index104 = index104 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index104 * 8) - let result374 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result102 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array375.push(@common.HeaderVariable::{header_name : result373, variable_name : result374}) + array103.push(result102) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) - - let array379 : Array[@common.QueryVariable] = []; - for index380 = 0; index380 < (mbt_ffi_load32((iter_base) + 32)); index380 = index380 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index380 * 16) - - let result377 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let result378 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.SchemaTypeBody::EnumType(array103) + } + 17 => { - array379.push(@common.QueryVariable::{query_param_name : result377, variable_name : result378}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let array106 : Array[String] = []; + for index107 = 0; index107 < (mbt_ffi_load32((iter_base) + 12)); index107 = index107 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index107 * 8) - let lifted381 : @common.AuthDetails? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(@common.AuthDetails::{required : (mbt_ffi_load8_u((iter_base) + 37) != 0)}) - } - _ => panic() + array106.push(result105) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array383 : Array[String] = []; - for index384 = 0; index384 < (mbt_ffi_load32((iter_base) + 44)); index384 = index384 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index384 * 8) + @types.SchemaTypeBody::FlagsType(array106) + } + 18 => { - let result382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array108 : Array[Int] = []; + for index109 = 0; index109 < (mbt_ffi_load32((iter_base) + 12)); index109 = index109 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index109 * 4) - array383.push(result382) + array108.push(mbt_ffi_load32((iter_base) + 0)) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - array385.push(@common.HttpEndpointDetails::{http_method : lifted366, path_suffix : array371, header_vars : array375, query_vars : array379, auth_details : lifted381, cors_options : @common.CorsOptions::{allowed_patterns : array383}}) + @types.SchemaTypeBody::TupleType(array108) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - - let lifted388 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { - - let result387 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + 19 => { - Option::Some(result387) - } - _ => panic() + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) } + 20 => { - let lifted406 = match (mbt_ffi_load8_u((iter_base) + 36)) { - 0 => { + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { - let array404 : Array[@common.NamedField] = []; - for index405 = 0; index405 < (mbt_ffi_load32((iter_base) + 44)); index405 = index405 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index405 * 72) + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { - let result389 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { - let lifted390 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + let lifted110 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @common.FieldSource::UserSupplied - } - 1 => { + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) - } - _ => panic() - } + let lifted111 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted392 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } - let result391 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted110, err : lifted111}) + } + 24 => { - Option::Some(result391) - } - _ => panic() - } + let lifted115 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array394 : Array[String] = []; - for index395 = 0; index395 < (mbt_ffi_load32((iter_base) + 32)); index395 = index395 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index395 * 8) + let array113 : Array[String] = []; + for index114 = 0; index114 < (mbt_ffi_load32((iter_base) + 16)); index114 = index114 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index114 * 8) - let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array394.push(result393) + array113.push(result112) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - - let array397 : Array[String] = []; - for index398 = 0; index398 < (mbt_ffi_load32((iter_base) + 40)); index398 = index398 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index398 * 8) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - let result396 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(array113) + } + _ => panic() + } - array397.push(result396) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + let lifted116 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - let lifted400 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } - let result399 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let lifted117 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - Option::Some(result399) - } - _ => panic() - } + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } - let lifted403 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let lifted119 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - let lifted402 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + let result118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - @types.Role::Multimodal - } - 1 => { + Option::Some(result118) + } + _ => panic() + } - @types.Role::UnstructuredText - } - 2 => { + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted115, min_length : lifted116, max_length : lifted117, regex : lifted119}) + } + 25 => { - @types.Role::UnstructuredBinary - } - 3 => { + let lifted123 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result401 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let array121 : Array[String] = []; + for index122 = 0; index122 < (mbt_ffi_load32((iter_base) + 16)); index122 = index122 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index122 * 8) - @types.Role::Other(result401) - } - _ => panic() - } + let result120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(lifted402) - } - _ => panic() + array121.push(result120) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - array404.push(@common.NamedField::{name : result389, source : lifted390, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted392, aliases : array394, examples : array397, deprecated : lifted400, role : lifted403}}) + Option::Some(array121) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - - @common.InputSchema::Parameters(array404) + _ => panic() } - _ => panic() - } - let lifted407 = match (mbt_ffi_load8_u((iter_base) + 48)) { - 0 => { + let lifted124 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - @common.OutputSchema::Unit + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() } - 1 => { - @common.OutputSchema::Single(mbt_ffi_load32((iter_base) + 52)) + let lifted125 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted123, min_bytes : lifted124, max_bytes : lifted125}) } + 26 => { - let lifted409 : @common.ReadOnlyConfig? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let lifted129 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - let lifted408 = match (mbt_ffi_load8_u((iter_base) + 64)) { - 0 => { + let array127 : Array[String] = []; + for index128 = 0; index128 < (mbt_ffi_load32((iter_base) + 20)); index128 = index128 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index128 * 8) - @common.CachePolicy::NoCache - } - 1 => { + let result126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @common.CachePolicy::UntilWrite + array127.push(result126) } - 2 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @common.CachePolicy::Ttl((mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64()) - } - _ => panic() + Option::Some(array127) } - - Option::Some(@common.ReadOnlyConfig::{cache_policy : lifted408, uses_principal : (mbt_ffi_load8_u((iter_base) + 80) != 0)}) + _ => panic() } - _ => panic() - } - array410.push(@common.AgentMethod::{name : result363, description : result364, http_endpoint : array385, prompt_hint : lifted388, input_schema : lifted406, output_schema : lifted407, read_only : lifted409}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) + let lifted133 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - array412.push(@common.AgentDependency::{type_name : result204, description : lifted206, schema : @types.SchemaGraph::{type_nodes : array333, defs : array338, root : mbt_ffi_load32((iter_base) + 36)}, constructor_ : @common.AgentConstructor::{name : lifted341, description : result342, prompt_hint : lifted344, input_schema : lifted362}, methods : array410}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 104)) + let array131 : Array[String] = []; + for index132 = 0; index132 < (mbt_ffi_load32((iter_base) + 32)); index132 = index132 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index132 * 8) - let lifted430 : @common.HttpMountDetails? = match mbt_ffi_load8_u((return_area) + 116) { - 0 => Option::None - 1 => { + let result130 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array418 : Array[@common.PathSegment] = []; - for index419 = 0; index419 < (mbt_ffi_load32((return_area) + 124)); index419 = index419 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 120)) + (index419 * 12) + array131.push(result130) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let lifted417 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + Option::Some(array131) + } + _ => panic() + } - let result414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted129, allowed_extensions : lifted133}) + } + 27 => { - @common.PathSegment::Literal(result414) - } + let lifted137 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None 1 => { - @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) - } - 2 => { - - let result415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let array135 : Array[String] = []; + for index136 = 0; index136 < (mbt_ffi_load32((iter_base) + 16)); index136 = index136 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index136 * 8) - @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result415}) - } - 3 => { + let result134 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result416 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + array135.push(result134) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result416}) + Option::Some(array135) } _ => panic() } - array418.push(lifted417) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 120)) + let lifted141 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - let lifted420 : @common.AuthDetails? = match mbt_ffi_load8_u((return_area) + 128) { - 0 => Option::None - 1 => { + let array139 : Array[String] = []; + for index140 = 0; index140 < (mbt_ffi_load32((iter_base) + 28)); index140 = index140 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index140 * 8) - Option::Some(@common.AuthDetails::{required : (mbt_ffi_load8_u((return_area) + 129) != 0)}) + let result138 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array139.push(result138) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + Option::Some(array139) + } + _ => panic() } - _ => panic() - } - let array422 : Array[String] = []; - for index423 = 0; index423 < (mbt_ffi_load32((return_area) + 136)); index423 = index423 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 132)) + (index423 * 8) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted137, allowed_hosts : lifted141}) + } + 28 => { - let result421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::DatetimeType + } + 29 => { - array422.push(result421) + @types.SchemaTypeBody::DurationType } - mbt_ffi_free(mbt_ffi_load32((return_area) + 132)) + 30 => { - let array428 : Array[@common.PathSegment] = []; - for index429 = 0; index429 < (mbt_ffi_load32((return_area) + 144)); index429 = index429 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 140)) + (index429 * 12) + let result142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted427 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let array144 : Array[String] = []; + for index145 = 0; index145 < (mbt_ffi_load32((iter_base) + 20)); index145 = index145 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index145 * 8) - let result424 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @common.PathSegment::Literal(result424) - } - 1 => { + array144.push(result143) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) - } - 2 => { + let lifted147 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - let result425 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result425}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result146}) } - 3 => { + _ => panic() + } + + let lifted149 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let result426 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result426}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result148}) } _ => panic() } - array428.push(lifted427) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result142, allowed_suffixes : array144, min : lifted147, max : lifted149}) } - mbt_ffi_free(mbt_ffi_load32((return_area) + 140)) - - Option::Some(@common.HttpMountDetails::{path_prefix : array418, auth_details : lifted420, phantom_agent : (mbt_ffi_load8_u((return_area) + 130) != 0), cors_options : @common.CorsOptions::{allowed_patterns : array422}, webhook_suffix : array428}) - } - _ => panic() - } + 31 => { - let lifted432 = match (mbt_ffi_load8_u((return_area) + 152)) { - 0 => { + let array173 : Array[@types.UnionBranch] = []; + for index174 = 0; index174 < (mbt_ffi_load32((iter_base) + 12)); index174 = index174 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index174 * 92) - @common.Snapshotting::Disabled - } - 1 => { + let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted431 = match (mbt_ffi_load8_u((return_area) + 160)) { - 0 => { + let lifted159 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { - @common.SnapshottingConfig::Default - } - 1 => { + let result151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @common.SnapshottingConfig::Periodic((mbt_ffi_load64((return_area) + 168)).reinterpret_as_uint64()) - } - 2 => { + @types.DiscriminatorRule::Prefix(result151) + } + 1 => { - @common.SnapshottingConfig::EveryNInvocation((mbt_ffi_load16_u((return_area) + 168).land(0xFFFF).reinterpret_as_uint())) - } - _ => panic() - } + let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @common.Snapshotting::Enabled(lifted431) - } - _ => panic() - } + @types.DiscriminatorRule::Suffix(result152) + } + 2 => { - let array436 : Array[@common.AgentConfigDeclaration] = []; - for index437 = 0; index437 < (mbt_ffi_load32((return_area) + 180)); index437 = index437 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 176)) + (index437 * 16) + let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let array434 : Array[String] = []; - for index435 = 0; index435 < (mbt_ffi_load32((iter_base) + 8)); index435 = index435 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index435 * 8) + @types.DiscriminatorRule::Contains(result153) + } + 3 => { - let result433 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result154 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - array434.push(result433) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) + @types.DiscriminatorRule::Regex(result154) + } + 4 => { - array436.push(@common.AgentConfigDeclaration::{source : @common.AgentConfigSource::from(mbt_ffi_load8_u((iter_base) + 0)), path : array434, value_type : mbt_ffi_load32((iter_base) + 12)}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 176)) + let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(@common.RegisteredAgentType::{agent_type : @common.AgentType::{type_name : result, description : result0, source_language : result1, schema : @types.SchemaGraph::{type_nodes : array125, defs : array130, root : mbt_ffi_load32((return_area) + 48)}, constructor_ : @common.AgentConstructor::{name : lifted133, description : result134, prompt_hint : lifted136, input_schema : lifted154}, methods : array202, dependencies : array412, mode : @common.AgentMode::from(mbt_ffi_load8_u((return_area) + 112)), http_mount : lifted430, snapshotting : lifted432, config : array436}, implemented_by : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((return_area) + 184)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((return_area) + 192)).reinterpret_as_uint64()}}}) - } - _ => panic() - } - let ret = lifted438 - mbt_ffi_free(ptr) - mbt_ffi_free(return_area) - return ret + let lifted157 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { -} -///| -/// Constructs a string agent-id from the agent type and its constructor parameters -/// and an optional phantom ID. -/// -/// `input` is a value tree whose root encodes the constructor's parameter list. -pub fn make_agent_id(agent_type_name : String, input : @types.SchemaValueTree, phantom_id : @types.Uuid?) -> Result[String, @common.AgentError] { - let cleanup_list : Array[Int] = [] + let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - let ptr = mbt_ffi_str2ptr(agent_type_name) + Option::Some(result156) + } + _ => panic() + } - let address66 = mbt_ffi_malloc(((input).value_nodes).length() * 32); - for index67 = 0; index67 < ((input).value_nodes).length(); index67 = index67 + 1 { - let iter_elem : @types.SchemaValueNode = ((input).value_nodes)[(index67)] - let iter_base = address66 + (index67 * 32); + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result155, literal : lifted157}) + } + 5 => { - match iter_elem { - BoolValue(payload) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) + let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - () - } - S8Value(payload0) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) + @types.DiscriminatorRule::FieldAbsent(result158) + } + _ => panic() + } - () - } - S16Value(payload1) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) + let lifted161 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - () - } - S32Value(payload2) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload2) + let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - () - } - S64Value(payload3) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload3) + Option::Some(result160) + } + _ => panic() + } - () - } - U8Value(payload4) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) + let array163 : Array[String] = []; + for index164 = 0; index164 < (mbt_ffi_load32((iter_base) + 52)); index164 = index164 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index164 * 8) - () - } - U16Value(payload5) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) + let result162 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - U32Value(payload6) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) + array163.push(result162) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - () - } - U64Value(payload7) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) + let array166 : Array[String] = []; + for index167 = 0; index167 < (mbt_ffi_load32((iter_base) + 60)); index167 = index167 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index167 * 8) - () - } - F32Value(payload8) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload8) + let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - F64Value(payload9) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload9) + array166.push(result165) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - () - } - CharValue(payload10) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) + let lifted169 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - StringValue(payload11) => { - mbt_ffi_store8((iter_base) + 0, (12)) + let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let ptr12 = mbt_ffi_str2ptr(payload11) - mbt_ffi_store32((iter_base) + 12, payload11.length()) - mbt_ffi_store32((iter_base) + 8, ptr12) - cleanup_list.push(ptr12) + Option::Some(result168) + } + _ => panic() + } - () - } - RecordValue(payload13) => { - mbt_ffi_store8((iter_base) + 0, (13)) + let lifted172 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { - let address = mbt_ffi_malloc((payload13).length() * 4); - for index = 0; index < (payload13).length(); index = index + 1 { - let iter_elem : Int = (payload13)[(index)] - let iter_base = address + (index * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted171 = match (mbt_ffi_load8_u((iter_base) + 80)) { + 0 => { - } - mbt_ffi_store32((iter_base) + 12, (payload13).length()) - mbt_ffi_store32((iter_base) + 8, address) - cleanup_list.push(address) + @types.Role::Multimodal + } + 1 => { - () - } - VariantValue(payload14) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) + @types.Role::UnstructuredText + } + 2 => { - match ((payload14).payload) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.Role::UnstructuredBinary + } + 3 => { - () + let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + + @types.Role::Other(result170) + } + _ => panic() + } + + Option::Some(lifted171) + } + _ => panic() + } + + array173.push(@types.UnionBranch::{tag : result150, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted159, metadata : @types.MetadataEnvelope::{doc : lifted161, aliases : array163, examples : array166, deprecated : lifted169, role : lifted172}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array173}) } - Some(payload16) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload16) + 32 => { - () + let lifted176 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result175) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted176}) } - } + 33 => { - () - } - EnumValue(payload17) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) + let lifted178 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - FlagsValue(payload18) => { - mbt_ffi_store8((iter_base) + 0, (16)) + let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - let address19 = mbt_ffi_malloc((payload18).length() * 1); - for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { - let iter_elem : Bool = (payload18)[(index20)] - let iter_base = address19 + (index20 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + Option::Some(result177) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload18).length()) - mbt_ffi_store32((iter_base) + 8, address19) - cleanup_list.push(address19) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted178}) + } + 34 => { - () - } - TupleValue(payload21) => { - mbt_ffi_store8((iter_base) + 0, (17)) + let lifted179 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let address22 = mbt_ffi_malloc((payload21).length() * 4); - for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { - let iter_elem : Int = (payload21)[(index23)] - let iter_base = address22 + (index23 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload21).length()) - mbt_ffi_store32((iter_base) + 8, address22) - cleanup_list.push(address22) + @types.SchemaTypeBody::FutureType(lifted179) + } + 35 => { - () - } - ListValue(payload24) => { - mbt_ffi_store8((iter_base) + 0, (18)) + let lifted180 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let address25 = mbt_ffi_malloc((payload24).length() * 4); - for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { - let iter_elem : Int = (payload24)[(index26)] - let iter_base = address25 + (index26 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + @types.SchemaTypeBody::StreamType(lifted180) + } + _ => panic() } - mbt_ffi_store32((iter_base) + 12, (payload24).length()) - mbt_ffi_store32((iter_base) + 8, address25) - cleanup_list.push(address25) - () - } - FixedListValue(payload27) => { - mbt_ffi_store8((iter_base) + 0, (19)) + let lifted183 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + 0 => Option::None + 1 => { - let address28 = mbt_ffi_malloc((payload27).length() * 4); - for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { - let iter_elem : Int = (payload27)[(index29)] - let iter_base = address28 + (index29 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let result182 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + Option::Some(result182) + } + _ => panic() } - mbt_ffi_store32((iter_base) + 12, (payload27).length()) - mbt_ffi_store32((iter_base) + 8, address28) - cleanup_list.push(address28) - () - } - MapValue(payload30) => { - mbt_ffi_store8((iter_base) + 0, (20)) + let array185 : Array[String] = []; + for index186 = 0; index186 < (mbt_ffi_load32((iter_base) + 104)); index186 = index186 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index186 * 8) - let address31 = mbt_ffi_malloc((payload30).length() * 8); - for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { - let iter_elem : @types.MapEntry = (payload30)[(index32)] - let iter_base = address31 + (index32 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + let result184 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + array185.push(result184) } - mbt_ffi_store32((iter_base) + 12, (payload30).length()) - mbt_ffi_store32((iter_base) + 8, address31) - cleanup_list.push(address31) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - () - } - OptionValue(payload33) => { - mbt_ffi_store8((iter_base) + 0, (21)) + let array188 : Array[String] = []; + for index189 = 0; index189 < (mbt_ffi_load32((iter_base) + 112)); index189 = index189 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index189 * 8) - match (payload33) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - Some(payload35) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload35) + array188.push(result187) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - () + let lifted191 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { + + let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + + Option::Some(result190) } + _ => panic() } - () - } - ResultValue(payload36) => { - mbt_ffi_store8((iter_base) + 0, (22)) - - match payload36 { - OkValue(payload37) => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted194 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { - match (payload37) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let lifted193 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { - () + @types.Role::Multimodal } - Some(payload39) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload39) + 1 => { - () + @types.Role::UnstructuredText } - } - - () - } - ErrValue(payload40) => { - mbt_ffi_store8((iter_base) + 8, (1)) - - match (payload40) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + 2 => { - () + @types.Role::UnstructuredBinary } - Some(payload42) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload42) + 3 => { - () + let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + + @types.Role::Other(result192) } + _ => panic() } - () + Option::Some(lifted193) } + _ => panic() } - () + array195.push(@types.SchemaTypeNode::{body : lifted181, metadata : @types.MetadataEnvelope::{doc : lifted183, aliases : array185, examples : array188, deprecated : lifted191, role : lifted194}}) } - TextValue(payload43) => { - mbt_ffi_store8((iter_base) + 0, (23)) + mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) - let ptr44 = mbt_ffi_str2ptr((payload43).text) - mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr44) + let array200 : Array[@types.SchemaTypeDef] = []; + for index201 = 0; index201 < (mbt_ffi_load32((return_area) + 44)); index201 = index201 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 40)) + (index201 * 24) - match ((payload43).language) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + let result197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - Some(payload46) => { - mbt_ffi_store8((iter_base) + 16, (1)) + let lifted199 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr47 = mbt_ffi_str2ptr(payload46) - mbt_ffi_store32((iter_base) + 24, payload46.length()) - mbt_ffi_store32((iter_base) + 20, ptr47) - cleanup_list.push(ptr47) + let result198 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - () + Option::Some(result198) } + _ => panic() } - cleanup_list.push(ptr44) - () + array200.push(@types.SchemaTypeDef::{id : result197, name : lifted199, body : mbt_ffi_load32((iter_base) + 20)}) } - BinaryValue(payload48) => { - mbt_ffi_store8((iter_base) + 0, (24)) - - let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) - - mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr49) - - match ((payload48).mime_type) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + mbt_ffi_free(mbt_ffi_load32((return_area) + 40)) - () - } - Some(payload51) => { - mbt_ffi_store8((iter_base) + 16, (1)) + let lifted203 : String? = match mbt_ffi_load8_u((return_area) + 52) { + 0 => Option::None + 1 => { - let ptr52 = mbt_ffi_str2ptr(payload51) - mbt_ffi_store32((iter_base) + 24, payload51.length()) - mbt_ffi_store32((iter_base) + 20, ptr52) - cleanup_list.push(ptr52) + let result202 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 56), mbt_ffi_load32((return_area) + 60)) - () - } + Option::Some(result202) } - cleanup_list.push(ptr49) - - () + _ => panic() } - PathValue(payload53) => { - mbt_ffi_store8((iter_base) + 0, (25)) - let ptr54 = mbt_ffi_str2ptr(payload53) - mbt_ffi_store32((iter_base) + 12, payload53.length()) - mbt_ffi_store32((iter_base) + 8, ptr54) - cleanup_list.push(ptr54) + let result204 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 64), mbt_ffi_load32((return_area) + 68)) - () - } - UrlValue(payload55) => { - mbt_ffi_store8((iter_base) + 0, (26)) + let lifted206 : String? = match mbt_ffi_load8_u((return_area) + 72) { + 0 => Option::None + 1 => { - let ptr56 = mbt_ffi_str2ptr(payload55) - mbt_ffi_store32((iter_base) + 12, payload55.length()) - mbt_ffi_store32((iter_base) + 8, ptr56) - cleanup_list.push(ptr56) + let result205 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 76), mbt_ffi_load32((return_area) + 80)) - () + Option::Some(result205) + } + _ => panic() } - DatetimeValue(payload57) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload57).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) - () - } - DurationValue(payload58) => { - mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) + let lifted224 = match (mbt_ffi_load8_u((return_area) + 84)) { + 0 => { - () - } - QuantityValueNode(payload59) => { - mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload59).scale) + let array222 : Array[@common.NamedField] = []; + for index223 = 0; index223 < (mbt_ffi_load32((return_area) + 92)); index223 = index223 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 88)) + (index223 * 72) - let ptr60 = mbt_ffi_str2ptr((payload59).unit) - mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr60) - cleanup_list.push(ptr60) + let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - UnionValue(payload61) => { - mbt_ffi_store8((iter_base) + 0, (30)) + let lifted208 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { - let ptr62 = mbt_ffi_str2ptr((payload61).tag) - mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr62) - mbt_ffi_store32((iter_base) + 16, (payload61).body) - cleanup_list.push(ptr62) + @common.FieldSource::UserSupplied + } + 1 => { - () - } - SecretValue(payload63) => { - mbt_ffi_store8((iter_base) + 0, (31)) + @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) + } + _ => panic() + } - let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr64) - cleanup_list.push(ptr64) + let lifted210 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - QuotaTokenHandle(payload65) => { - mbt_ffi_store8((iter_base) + 0, (32)) + let result209 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - let @types.QuotaToken(handle) = payload65 - mbt_ffi_store32((iter_base) + 8, handle) + Option::Some(result209) + } + _ => panic() + } - () - } - } + let array212 : Array[String] = []; + for index213 = 0; index213 < (mbt_ffi_load32((iter_base) + 32)); index213 = index213 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index213 * 8) - } + let result211 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let (lowered, lowered70, lowered71) = match (phantom_id) { - None => { + array212.push(result211) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - ((0), 0L, 0L) - } - Some(payload69) => { + let array215 : Array[String] = []; + for index216 = 0; index216 < (mbt_ffi_load32((iter_base) + 40)); index216 = index216 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index216 * 8) - ((1), ((payload69).high_bits).reinterpret_as_int64(), ((payload69).low_bits).reinterpret_as_int64()) - } - } - let return_area = mbt_ffi_malloc(40) - wasmImportMakeAgentId(ptr, agent_type_name.length(), address66, ((input).value_nodes).length(), (input).root, lowered, lowered70, lowered71, return_area); + let result214 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted240 = match (mbt_ffi_load8_u((return_area) + 0)) { - 0 => { + array215.push(result214) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 4), mbt_ffi_load32((return_area) + 8)) + let lifted218 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - Result::Ok(result) - } - 1 => { + let result217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - let lifted239 = match (mbt_ffi_load8_u((return_area) + 4)) { - 0 => { + Option::Some(result217) + } + _ => panic() + } - let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + let lifted221 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - @common.AgentError::InvalidInput(result72) - } - 1 => { + let lifted220 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + @types.Role::Multimodal + } + 1 => { - @common.AgentError::InvalidMethod(result73) - } - 2 => { + @types.Role::UnstructuredText + } + 2 => { - let result74 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + @types.Role::UnstructuredBinary + } + 3 => { - @common.AgentError::InvalidType(result74) - } - 3 => { + let result219 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - let result75 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + @types.Role::Other(result219) + } + _ => panic() + } - @common.AgentError::InvalidAgentId(result75) + Option::Some(lifted220) + } + _ => panic() + } + + array222.push(@common.NamedField::{name : result207, source : lifted208, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted210, aliases : array212, examples : array215, deprecated : lifted218, role : lifted221}}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 88)) + + @common.InputSchema::Parameters(array222) } - 4 => { + _ => panic() + } - let array200 : Array[@types.SchemaTypeNode] = []; - for index201 = 0; index201 < (mbt_ffi_load32((return_area) + 12)); index201 = index201 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 8)) + (index201 * 144) + let array272 : Array[@common.AgentMethod] = []; + for index273 = 0; index273 < (mbt_ffi_load32((return_area) + 100)); index273 = index273 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 96)) + (index273 * 88) - let lifted186 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { + let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaTypeBody::BoolType - } - 2 => { + let array247 : Array[@common.HttpEndpointDetails] = []; + for index248 = 0; index248 < (mbt_ffi_load32((iter_base) + 20)); index248 = index248 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index248 * 48) - @types.SchemaTypeBody::S8Type - } - 3 => { + let lifted228 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - @types.SchemaTypeBody::S16Type - } - 4 => { + @common.HttpMethod::Get + } + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + @common.HttpMethod::Head + } + 2 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + @common.HttpMethod::Post + } + 3 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @common.HttpMethod::Put + } + 4 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @common.HttpMethod::Delete + } + 5 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @common.HttpMethod::Connect + } + 6 => { - @types.SchemaTypeBody::U64Type - } - 10 => { + @common.HttpMethod::Options + } + 7 => { + + @common.HttpMethod::Trace + } + 8 => { + + @common.HttpMethod::Patch + } + 9 => { + + let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + + @common.HttpMethod::Custom(result227) + } + _ => panic() + } + + let array233 : Array[@common.PathSegment] = []; + for index234 = 0; index234 < (mbt_ffi_load32((iter_base) + 16)); index234 = index234 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index234 * 12) - @types.SchemaTypeBody::F32Type + let lifted232 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + let result229 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + + @common.PathSegment::Literal(result229) } - 11 => { + 1 => { - @types.SchemaTypeBody::F64Type + @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) } - 12 => { + 2 => { - @types.SchemaTypeBody::CharType + let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + + @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result230}) } - 13 => { + 3 => { - @types.SchemaTypeBody::StringType + let result231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result231}) } - 14 => { + _ => panic() + } - let array88 : Array[@types.NamedFieldType] = []; - for index89 = 0; index89 < (mbt_ffi_load32((iter_base) + 12)); index89 = index89 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index89 * 68) + array233.push(lifted232) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - let result76 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array237 : Array[@common.HeaderVariable] = []; + for index238 = 0; index238 < (mbt_ffi_load32((iter_base) + 24)); index238 = index238 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index238 * 16) - let lifted : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result77 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - Option::Some(result77) - } - _ => panic() - } + array237.push(@common.HeaderVariable::{header_name : result235, variable_name : result236}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) - let array : Array[String] = []; - for index79 = 0; index79 < (mbt_ffi_load32((iter_base) + 28)); index79 = index79 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index79 * 8) + let array241 : Array[@common.QueryVariable] = []; + for index242 = 0; index242 < (mbt_ffi_load32((iter_base) + 32)); index242 = index242 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index242 * 16) - let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result239 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array.push(result78) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let result240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array81 : Array[String] = []; - for index82 = 0; index82 < (mbt_ffi_load32((iter_base) + 36)); index82 = index82 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index82 * 8) + array241.push(@common.QueryVariable::{query_param_name : result239, variable_name : result240}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted243 : @common.AuthDetails? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - array81.push(result80) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + Option::Some(@common.AuthDetails::{required : (mbt_ffi_load8_u((iter_base) + 37) != 0)}) + } + _ => panic() + } - let lifted84 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + let array245 : Array[String] = []; + for index246 = 0; index246 < (mbt_ffi_load32((iter_base) + 44)); index246 = index246 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index246 * 8) - let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result244 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(result83) - } - _ => panic() - } + array245.push(result244) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let lifted87 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + array247.push(@common.HttpEndpointDetails::{http_method : lifted228, path_suffix : array233, header_vars : array237, query_vars : array241, auth_details : lifted243, cors_options : @common.CorsOptions::{allowed_patterns : array245}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted86 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted250 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - @types.Role::Multimodal - } - 1 => { + let result249 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - @types.Role::UnstructuredText - } - 2 => { + Option::Some(result249) + } + _ => panic() + } - @types.Role::UnstructuredBinary - } - 3 => { + let lifted268 = match (mbt_ffi_load8_u((iter_base) + 36)) { + 0 => { - let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let array266 : Array[@common.NamedField] = []; + for index267 = 0; index267 < (mbt_ffi_load32((iter_base) + 44)); index267 = index267 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index267 * 72) - @types.Role::Other(result85) - } - _ => panic() - } + let result251 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(lifted86) - } - _ => panic() - } + let lifted252 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { - array88.push(@types.NamedFieldType::{name : result76, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted, aliases : array, examples : array81, deprecated : lifted84, role : lifted87}}) + @common.FieldSource::UserSupplied } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + 1 => { - @types.SchemaTypeBody::RecordType(array88) + @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) + } + _ => panic() } - 15 => { - let array105 : Array[@types.VariantCaseType] = []; - for index106 = 0; index106 < (mbt_ffi_load32((iter_base) + 12)); index106 = index106 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index106 * 72) - - let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted254 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted91 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + Option::Some(result253) + } + _ => panic() + } - let lifted93 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + let array256 : Array[String] = []; + for index257 = 0; index257 < (mbt_ffi_load32((iter_base) + 32)); index257 = index257 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index257 * 8) - let result92 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result255 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(result92) - } - _ => panic() - } + array256.push(result255) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array95 : Array[String] = []; - for index96 = 0; index96 < (mbt_ffi_load32((iter_base) + 32)); index96 = index96 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index96 * 8) + let array259 : Array[String] = []; + for index260 = 0; index260 < (mbt_ffi_load32((iter_base) + 40)); index260 = index260 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index260 * 8) - let result94 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array95.push(result94) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + array259.push(result258) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array98 : Array[String] = []; - for index99 = 0; index99 < (mbt_ffi_load32((iter_base) + 40)); index99 = index99 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index99 * 8) + let lifted262 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - let result97 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - array98.push(result97) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + Option::Some(result261) + } + _ => panic() + } - let lifted101 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + let lifted265 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let lifted264 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - Option::Some(result100) + @types.Role::Multimodal } - _ => panic() - } - - let lifted104 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None 1 => { - let lifted103 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { - - @types.Role::Multimodal - } - 1 => { - - @types.Role::UnstructuredText - } - 2 => { - - @types.Role::UnstructuredBinary - } - 3 => { + @types.Role::UnstructuredText + } + 2 => { - let result102 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + @types.Role::UnstructuredBinary + } + 3 => { - @types.Role::Other(result102) - } - _ => panic() - } + let result263 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - Option::Some(lifted103) + @types.Role::Other(result263) } _ => panic() } - array105.push(@types.VariantCaseType::{name : result90, payload : lifted91, metadata : @types.MetadataEnvelope::{doc : lifted93, aliases : array95, examples : array98, deprecated : lifted101, role : lifted104}}) + Option::Some(lifted264) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::VariantType(array105) + _ => panic() } - 16 => { - let array108 : Array[String] = []; - for index109 = 0; index109 < (mbt_ffi_load32((iter_base) + 12)); index109 = index109 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index109 * 8) + array266.push(@common.NamedField::{name : result251, source : lifted252, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted254, aliases : array256, examples : array259, deprecated : lifted262, role : lifted265}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @common.InputSchema::Parameters(array266) + } + _ => panic() + } - array108.push(result107) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted269 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::EnumType(array108) - } - 17 => { + @common.OutputSchema::Unit + } + 1 => { - let array111 : Array[String] = []; - for index112 = 0; index112 < (mbt_ffi_load32((iter_base) + 12)); index112 = index112 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index112 * 8) + @common.OutputSchema::Single(mbt_ffi_load32((iter_base) + 52)) + } + _ => panic() + } - let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted271 : @common.ReadOnlyConfig? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - array111.push(result110) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted270 = match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => { - @types.SchemaTypeBody::FlagsType(array111) + @common.CachePolicy::NoCache } - 18 => { - - let array113 : Array[Int] = []; - for index114 = 0; index114 < (mbt_ffi_load32((iter_base) + 12)); index114 = index114 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index114 * 4) + 1 => { - array113.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::TupleType(array113) - } - 19 => { - - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { - - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { - - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + @common.CachePolicy::UntilWrite } - 22 => { + 2 => { - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + @common.CachePolicy::Ttl((mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64()) } - 23 => { - - let lifted115 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { - - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } - - let lifted116 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { - - Option::Some(mbt_ffi_load32((iter_base) + 20)) - } - _ => panic() - } + _ => panic() + } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted115, err : lifted116}) - } - 24 => { + Option::Some(@common.ReadOnlyConfig::{cache_policy : lifted270, uses_principal : (mbt_ffi_load8_u((iter_base) + 80) != 0)}) + } + _ => panic() + } - let lifted120 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + array272.push(@common.AgentMethod::{name : result225, description : result226, http_endpoint : array247, prompt_hint : lifted250, input_schema : lifted268, output_schema : lifted269, read_only : lifted271}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 96)) - let array118 : Array[String] = []; - for index119 = 0; index119 < (mbt_ffi_load32((iter_base) + 16)); index119 = index119 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index119 * 8) + let array552 : Array[@common.AgentDependency] = []; + for index553 = 0; index553 < (mbt_ffi_load32((return_area) + 108)); index553 = index553 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 104)) + (index553 * 92) - let result117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result274 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array118.push(result117) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + let lifted276 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - Option::Some(array118) - } - _ => panic() - } + let result275 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - let lifted121 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + Option::Some(result275) + } + _ => panic() + } - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let array473 : Array[@types.SchemaTypeNode] = []; + for index474 = 0; index474 < (mbt_ffi_load32((iter_base) + 24)); index474 = index474 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index474 * 144) - let lifted122 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let lifted459 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { - let lifted124 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::BoolType + } + 2 => { - let result123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let lifted283 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - Option::Some(result123) - } - _ => panic() - } + let lifted278 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted120, min_length : lifted121, max_length : lifted122, regex : lifted124}) - } - 25 => { + let lifted277 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted128 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let array126 : Array[String] = []; - for index127 = 0; index127 < (mbt_ffi_load32((iter_base) + 16)); index127 = index127 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index127 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - array126.push(result125) + Option::Some(lifted277) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - - Option::Some(array126) - } - _ => panic() - } - - let lifted129 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { - - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + _ => panic() } - _ => panic() - } - - let lifted130 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + let lifted280 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted128, min_bytes : lifted129, max_bytes : lifted130}) - } - 26 => { + let lifted279 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted134 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let array132 : Array[String] = []; - for index133 = 0; index133 < (mbt_ffi_load32((iter_base) + 20)); index133 = index133 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index133 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result131 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array132.push(result131) + Option::Some(lifted279) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - - Option::Some(array132) + _ => panic() } - _ => panic() - } - let lifted138 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { - - let array136 : Array[String] = []; - for index137 = 0; index137 < (mbt_ffi_load32((iter_base) + 32)); index137 = index137 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index137 * 8) + let lifted282 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result281 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array136.push(result135) + Option::Some(result281) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - - Option::Some(array136) + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted134, allowed_extensions : lifted138}) + Option::Some(@types.NumericRestrictions::{min : lifted278, max : lifted280, unit : lifted282}) + } + _ => panic() } - 27 => { - - let lifted142 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { - let array140 : Array[String] = []; - for index141 = 0; index141 < (mbt_ffi_load32((iter_base) + 16)); index141 = index141 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index141 * 8) + @types.SchemaTypeBody::S8Type(lifted283) + } + 3 => { - let result139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted290 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array140.push(result139) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + let lifted285 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - Option::Some(array140) - } - _ => panic() - } + let lifted284 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted146 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let array144 : Array[String] = []; - for index145 = 0; index145 < (mbt_ffi_load32((iter_base) + 28)); index145 = index145 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index145 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - array144.push(result143) + Option::Some(lifted284) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - - Option::Some(array144) + _ => panic() } - _ => panic() - } - - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted142, allowed_hosts : lifted146}) - } - 28 => { - - @types.SchemaTypeBody::DatetimeType - } - 29 => { - - @types.SchemaTypeBody::DurationType - } - 30 => { - - let result147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array149 : Array[String] = []; - for index150 = 0; index150 < (mbt_ffi_load32((iter_base) + 20)); index150 = index150 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index150 * 8) + let lifted287 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted286 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - array149.push(result148) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted152 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result151}) + Option::Some(lifted286) + } + _ => panic() } - _ => panic() - } - let lifted154 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let lifted289 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result288 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result153}) + Option::Some(result288) + } + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result147, allowed_suffixes : array149, min : lifted152, max : lifted154}) + Option::Some(@types.NumericRestrictions::{min : lifted285, max : lifted287, unit : lifted289}) + } + _ => panic() } - 31 => { - - let array178 : Array[@types.UnionBranch] = []; - for index179 = 0; index179 < (mbt_ffi_load32((iter_base) + 12)); index179 = index179 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index179 * 92) - - let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted164 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + @types.SchemaTypeBody::S16Type(lifted290) + } + 4 => { - let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted297 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.DiscriminatorRule::Prefix(result156) - } + let lifted292 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None 1 => { - let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - @types.DiscriminatorRule::Suffix(result157) - } - 2 => { - - let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - @types.DiscriminatorRule::Contains(result158) - } - 3 => { - - let result159 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - @types.DiscriminatorRule::Regex(result159) - } - 4 => { - - let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted291 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted162 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } 1 => { - let result161 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(result161) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result160, literal : lifted162}) - } - 5 => { - - let result163 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - @types.DiscriminatorRule::FieldAbsent(result163) + Option::Some(lifted291) } _ => panic() } - let lifted166 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted294 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let lifted293 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - Option::Some(result165) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let array168 : Array[String] = []; - for index169 = 0; index169 < (mbt_ffi_load32((iter_base) + 52)); index169 = index169 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index169 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result167 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array168.push(result167) + Option::Some(lifted293) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array171 : Array[String] = []; - for index172 = 0; index172 < (mbt_ffi_load32((iter_base) + 60)); index172 = index172 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index172 * 8) + let lifted296 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result295 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array171.push(result170) + Option::Some(result295) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted174 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + Option::Some(@types.NumericRestrictions::{min : lifted292, max : lifted294, unit : lifted296}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted297) + } + 5 => { + + let lifted304 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted299 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let lifted298 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result173) + Option::Some(lifted298) } _ => panic() } - let lifted177 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted301 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let lifted176 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted300 = match (mbt_ffi_load8_u((iter_base) + 48)) { 0 => { - @types.Role::Multimodal + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) } 1 => { - @types.Role::UnstructuredText + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) } 2 => { - @types.Role::UnstructuredBinary - } - 3 => { - - let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - - @types.Role::Other(result175) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) } _ => panic() } - Option::Some(lifted176) + Option::Some(lifted300) } _ => panic() } - array178.push(@types.UnionBranch::{tag : result155, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted164, metadata : @types.MetadataEnvelope::{doc : lifted166, aliases : array168, examples : array171, deprecated : lifted174, role : lifted177}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted303 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array178}) + let result302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result302) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted299, max : lifted301, unit : lifted303}) + } + _ => panic() } - 32 => { - let lifted181 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::S64Type(lifted304) + } + 6 => { - let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let lifted311 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - Option::Some(result180) - } - _ => panic() - } + let lifted306 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted181}) - } - 33 => { + let lifted305 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted183 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result182 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result182) + Option::Some(lifted305) + } + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted183}) - } - 34 => { + let lifted308 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted184 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted307 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::FutureType(lifted184) - } - 35 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted185 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(mbt_ffi_load32((iter_base) + 12)) + Option::Some(lifted307) + } + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::StreamType(lifted185) - } - _ => panic() - } + let lifted310 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted188 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { + let result309 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + Option::Some(result309) + } + _ => panic() + } - Option::Some(result187) + Option::Some(@types.NumericRestrictions::{min : lifted306, max : lifted308, unit : lifted310}) + } + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::U8Type(lifted311) } + 7 => { - let array190 : Array[String] = []; - for index191 = 0; index191 < (mbt_ffi_load32((iter_base) + 104)); index191 = index191 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index191 * 8) + let lifted318 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted313 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - array190.push(result189) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + let lifted312 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let array193 : Array[String] = []; - for index194 = 0; index194 < (mbt_ffi_load32((iter_base) + 112)); index194 = index194 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index194 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - array193.push(result192) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted196 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + Option::Some(lifted312) + } + _ => panic() + } - let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let lifted315 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - Option::Some(result195) - } - _ => panic() - } + let lifted314 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted199 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted198 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.Role::UnstructuredText + Option::Some(lifted314) + } + _ => panic() } - 2 => { - @types.Role::UnstructuredBinary - } - 3 => { + let lifted317 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result316 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.Role::Other(result197) + Option::Some(result316) + } + _ => panic() } - _ => panic() - } - Option::Some(lifted198) + Option::Some(@types.NumericRestrictions::{min : lifted313, max : lifted315, unit : lifted317}) + } + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::U16Type(lifted318) } + 8 => { - array200.push(@types.SchemaTypeNode::{body : lifted186, metadata : @types.MetadataEnvelope::{doc : lifted188, aliases : array190, examples : array193, deprecated : lifted196, role : lifted199}}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 8)) + let lifted325 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array205 : Array[@types.SchemaTypeDef] = []; - for index206 = 0; index206 < (mbt_ffi_load32((return_area) + 20)); index206 = index206 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index206 * 24) + let lifted320 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted319 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted204 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result203 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(result203) - } - _ => panic() - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - array205.push(@types.SchemaTypeDef::{id : result202, name : lifted204, body : mbt_ffi_load32((iter_base) + 20)}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) + Option::Some(lifted319) + } + _ => panic() + } - let array237 : Array[@types.SchemaValueNode] = []; - for index238 = 0; index238 < (mbt_ffi_load32((return_area) + 32)); index238 = index238 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 28)) + (index238 * 32) + let lifted322 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted236 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let lifted321 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + Option::Some(lifted321) + } + _ => panic() + } - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + let lifted324 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + let result323 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + Option::Some(result323) + } + _ => panic() + } - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + Option::Some(@types.NumericRestrictions::{min : lifted320, max : lifted322, unit : lifted324}) + } + _ => panic() } - 8 => { - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + @types.SchemaTypeBody::U32Type(lifted325) + } + 9 => { - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + let lifted332 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + let lifted327 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + let lifted326 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaValueNode::StringValue(result207) - } - 13 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let array208 : Array[Int] = []; - for index209 = 0; index209 < (mbt_ffi_load32((iter_base) + 12)); index209 = index209 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index209 * 4) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - array208.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + Option::Some(lifted326) + } + _ => panic() + } - @types.SchemaValueNode::RecordValue(array208) - } - 14 => { + let lifted329 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted210 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted328 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted328) + } + _ => panic() } - _ => panic() - } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted210}) - } - 15 => { + let lifted331 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + let result330 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let array211 : Array[Bool] = []; - for index212 = 0; index212 < (mbt_ffi_load32((iter_base) + 12)); index212 = index212 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index212 * 1) + Option::Some(result330) + } + _ => panic() + } - array211.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + Option::Some(@types.NumericRestrictions::{min : lifted327, max : lifted329, unit : lifted331}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array211) + _ => panic() } - 17 => { - let array213 : Array[Int] = []; - for index214 = 0; index214 < (mbt_ffi_load32((iter_base) + 12)); index214 = index214 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index214 * 4) + @types.SchemaTypeBody::U64Type(lifted332) + } + 10 => { - array213.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted339 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::TupleValue(array213) - } - 18 => { + let lifted334 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let array215 : Array[Int] = []; - for index216 = 0; index216 < (mbt_ffi_load32((iter_base) + 12)); index216 = index216 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index216 * 4) + let lifted333 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array215.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaValueNode::ListValue(array215) - } - 19 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let array217 : Array[Int] = []; - for index218 = 0; index218 < (mbt_ffi_load32((iter_base) + 12)); index218 = index218 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index218 * 4) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - array217.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + Option::Some(lifted333) + } + _ => panic() + } - @types.SchemaValueNode::FixedListValue(array217) - } - 20 => { + let lifted336 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array219 : Array[@types.MapEntry] = []; - for index220 = 0; index220 < (mbt_ffi_load32((iter_base) + 12)); index220 = index220 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index220 * 8) + let lifted335 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - array219.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaValueNode::MapValue(array219) - } - 21 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted221 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(mbt_ffi_load32((iter_base) + 12)) + Option::Some(lifted335) + } + _ => panic() } - _ => panic() - } - @types.SchemaValueNode::OptionValue(lifted221) + let lifted338 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result337 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result337) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted334, max : lifted336, unit : lifted338}) + } + _ => panic() } - 22 => { - let lifted224 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + @types.SchemaTypeBody::F32Type(lifted339) + } + 11 => { - let lifted222 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted346 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) + let lifted341 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted340 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() - } - @types.ResultValuePayload::OkValue(lifted222) + Option::Some(lifted340) + } + _ => panic() } - 1 => { - let lifted223 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted343 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) + let lifted342 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() + + Option::Some(lifted342) } + _ => panic() + } + + let lifted345 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.ResultValuePayload::ErrValue(lifted223) + Option::Some(result344) + } + _ => panic() } - _ => panic() - } - @types.SchemaValueNode::ResultValue(lifted224) + Option::Some(@types.NumericRestrictions::{min : lifted341, max : lifted343, unit : lifted345}) + } + _ => panic() } - 23 => { - let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.SchemaTypeBody::F64Type(lifted346) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array361 : Array[@types.NamedFieldType] = []; + for index362 = 0; index362 < (mbt_ffi_load32((iter_base) + 12)); index362 = index362 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index362 * 68) - let lifted227 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let result347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted349 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result348 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result226) + Option::Some(result348) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result225, language : lifted227}) - } - 24 => { + let array351 : Array[String] = []; + for index352 = 0; index352 < (mbt_ffi_load32((iter_base) + 28)); index352 = index352 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index352 * 8) + + let result350 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array351.push(result350) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array354 : Array[String] = []; + for index355 = 0; index355 < (mbt_ffi_load32((iter_base) + 36)); index355 = index355 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index355 * 8) - let result228 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result353 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array354.push(result353) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted230 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted357 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result229 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result229) + Option::Some(result356) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result228, mime_type : lifted230}) - } - 25 => { + let lifted360 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { - let result231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted359 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { - @types.SchemaValueNode::PathValue(result231) - } - 26 => { + @types.Role::Multimodal + } + 1 => { - let result232 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.Role::UnstructuredText + } + 2 => { - @types.SchemaValueNode::UrlValue(result232) - } - 27 => { + @types.Role::UnstructuredBinary + } + 3 => { - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) - } - 28 => { + let result358 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) - } - 29 => { + @types.Role::Other(result358) + } + _ => panic() + } - let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + Option::Some(lifted359) + } + _ => panic() + } - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result233}) + array361.push(@types.NamedFieldType::{name : result347, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted349, aliases : array351, examples : array354, deprecated : lifted357, role : lifted360}}) } - 30 => { - - let result234 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result234, body : mbt_ffi_load32((iter_base) + 16)}) - } - 31 => { + @types.SchemaTypeBody::RecordType(array361) + } + 15 => { - let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let array378 : Array[@types.VariantCaseType] = []; + for index379 = 0; index379 < (mbt_ffi_load32((iter_base) + 12)); index379 = index379 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index379 * 72) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result235}) - } - 32 => { + let result363 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) - } - _ => panic() - } + let lifted364 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array237.push(lifted236) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 28)) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - @common.AgentError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array200, defs : array205, root : mbt_ffi_load32((return_area) + 24)}, value : @types.SchemaValueTree::{value_nodes : array237, root : mbt_ffi_load32((return_area) + 36)}}) - } - _ => panic() - } + let lifted366 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - Result::Err(lifted239) - } - _ => panic() - } - let ret = lifted240 - mbt_ffi_free(ptr) - mbt_ffi_free(address66) - mbt_ffi_free(return_area) + let result365 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - cleanup_list.each(mbt_ffi_free) - return ret + Option::Some(result365) + } + _ => panic() + } -} -///| -/// Parses an agent-id (created by `make-agent-id`) into an agent type name and its constructor parameters -/// and an optional phantom ID. -/// -/// The constructor parameters are returned as a self-contained typed value -/// (graph + value tree) so the receiver can interpret them without an -/// external schema registry. -pub fn parse_agent_id(agent_id : String) -> Result[(String, @types.TypedSchemaValue, @types.Uuid?), @common.AgentError] { + let array368 : Array[String] = []; + for index369 = 0; index369 < (mbt_ffi_load32((iter_base) + 32)); index369 = index369 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index369 * 8) - let ptr = mbt_ffi_str2ptr(agent_id) - let return_area = mbt_ffi_malloc(72) - wasmImportParseAgentId(ptr, agent_id.length(), return_area); + let result367 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted333 = match (mbt_ffi_load8_u((return_area) + 0)) { - 0 => { + array368.push(result367) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + let array371 : Array[String] = []; + for index372 = 0; index372 < (mbt_ffi_load32((iter_base) + 40)); index372 = index372 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index372 * 8) - let array123 : Array[@types.SchemaTypeNode] = []; - for index124 = 0; index124 < (mbt_ffi_load32((return_area) + 20)); index124 = index124 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index124 * 144) + let result370 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted109 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + array371.push(result370) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { + let lifted374 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::BoolType - } - 2 => { + let result373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - @types.SchemaTypeBody::S8Type - } - 3 => { + Option::Some(result373) + } + _ => panic() + } - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted377 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted376 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + @types.Role::Multimodal + } + 1 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.Role::UnstructuredText + } + 2 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.Role::UnstructuredBinary + } + 3 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + let result375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.SchemaTypeBody::U64Type - } - 10 => { + @types.Role::Other(result375) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + Option::Some(lifted376) + } + _ => panic() + } - @types.SchemaTypeBody::F64Type - } - 12 => { + array378.push(@types.VariantCaseType::{name : result363, payload : lifted364, metadata : @types.MetadataEnvelope::{doc : lifted366, aliases : array368, examples : array371, deprecated : lifted374, role : lifted377}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::CharType - } - 13 => { + @types.SchemaTypeBody::VariantType(array378) + } + 16 => { - @types.SchemaTypeBody::StringType - } - 14 => { + let array381 : Array[String] = []; + for index382 = 0; index382 < (mbt_ffi_load32((iter_base) + 12)); index382 = index382 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index382 * 8) - let array11 : Array[@types.NamedFieldType] = []; - for index12 = 0; index12 < (mbt_ffi_load32((iter_base) + 12)); index12 = index12 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index12 * 68) + let result380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array381.push(result380) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let result0 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::EnumType(array381) + } + 17 => { - let lifted : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let array384 : Array[String] = []; + for index385 = 0; index385 < (mbt_ffi_load32((iter_base) + 12)); index385 = index385 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index385 * 8) - let result1 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(result1) - } - _ => panic() + array384.push(result383) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array : Array[String] = []; - for index = 0; index < (mbt_ffi_load32((iter_base) + 28)); index = index + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index * 8) + @types.SchemaTypeBody::FlagsType(array384) + } + 18 => { - let result2 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array386 : Array[Int] = []; + for index387 = 0; index387 < (mbt_ffi_load32((iter_base) + 12)); index387 = index387 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index387 * 4) - array.push(result2) + array386.push(mbt_ffi_load32((iter_base) + 0)) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::TupleType(array386) + } + 19 => { + + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { - let array4 : Array[String] = []; - for index5 = 0; index5 < (mbt_ffi_load32((iter_base) + 36)); index5 = index5 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index5 * 8) + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { - let result3 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { - array4.push(result3) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { - let lifted7 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted388 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result6 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - - Option::Some(result6) + Option::Some(mbt_ffi_load32((iter_base) + 12)) } _ => panic() } - let lifted10 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted389 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let lifted9 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } - @types.Role::Multimodal - } - 1 => { + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted388, err : lifted389}) + } + 24 => { - @types.Role::UnstructuredText - } - 2 => { + let lifted393 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredBinary - } - 3 => { + let array391 : Array[String] = []; + for index392 = 0; index392 < (mbt_ffi_load32((iter_base) + 16)); index392 = index392 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index392 * 8) - let result8 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result390 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.Role::Other(result8) - } - _ => panic() + array391.push(result390) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(lifted9) + Option::Some(array391) } _ => panic() } - array11.push(@types.NamedFieldType::{name : result0, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted, aliases : array, examples : array4, deprecated : lifted7, role : lifted10}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::RecordType(array11) - } - 15 => { - - let array28 : Array[@types.VariantCaseType] = []; - for index29 = 0; index29 < (mbt_ffi_load32((iter_base) + 12)); index29 = index29 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index29 * 72) + let lifted394 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - let result13 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } - let lifted14 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted395 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) } _ => panic() } - let lifted16 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted397 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result15 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result396 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result15) + Option::Some(result396) } _ => panic() } - let array18 : Array[String] = []; - for index19 = 0; index19 < (mbt_ffi_load32((iter_base) + 32)); index19 = index19 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index19 * 8) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted393, min_length : lifted394, max_length : lifted395, regex : lifted397}) + } + 25 => { - let result17 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted401 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array18.push(result17) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let array399 : Array[String] = []; + for index400 = 0; index400 < (mbt_ffi_load32((iter_base) + 16)); index400 = index400 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index400 * 8) - let array21 : Array[String] = []; - for index22 = 0; index22 < (mbt_ffi_load32((iter_base) + 40)); index22 = index22 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index22 * 8) + let result398 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result20 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + array399.push(result398) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - array21.push(result20) + Option::Some(array399) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted24 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted402 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let result23 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted403 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - Option::Some(result23) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) } _ => panic() } - let lifted27 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted401, min_bytes : lifted402, max_bytes : lifted403}) + } + 26 => { + + let lifted407 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let lifted26 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + let array405 : Array[String] = []; + for index406 = 0; index406 < (mbt_ffi_load32((iter_base) + 20)); index406 = index406 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index406 * 8) - @types.Role::Multimodal - } - 1 => { + let result404 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.Role::UnstructuredText - } - 2 => { + array405.push(result404) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @types.Role::UnstructuredBinary - } - 3 => { + Option::Some(array405) + } + _ => panic() + } + + let lifted411 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - let result25 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let array409 : Array[String] = []; + for index410 = 0; index410 < (mbt_ffi_load32((iter_base) + 32)); index410 = index410 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index410 * 8) - @types.Role::Other(result25) - } - _ => panic() + let result408 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array409.push(result408) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(lifted26) + Option::Some(array409) } _ => panic() } - array28.push(@types.VariantCaseType::{name : result13, payload : lifted14, metadata : @types.MetadataEnvelope::{doc : lifted16, aliases : array18, examples : array21, deprecated : lifted24, role : lifted27}}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted407, allowed_extensions : lifted411}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + 27 => { - @types.SchemaTypeBody::VariantType(array28) - } - 16 => { + let lifted415 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array31 : Array[String] = []; - for index32 = 0; index32 < (mbt_ffi_load32((iter_base) + 12)); index32 = index32 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index32 * 8) + let array413 : Array[String] = []; + for index414 = 0; index414 < (mbt_ffi_load32((iter_base) + 16)); index414 = index414 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index414 * 8) - let result30 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result412 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array31.push(result30) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + array413.push(result412) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @types.SchemaTypeBody::EnumType(array31) - } - 17 => { + Option::Some(array413) + } + _ => panic() + } - let array34 : Array[String] = []; - for index35 = 0; index35 < (mbt_ffi_load32((iter_base) + 12)); index35 = index35 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index35 * 8) + let lifted419 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - let result33 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array417 : Array[String] = []; + for index418 = 0; index418 < (mbt_ffi_load32((iter_base) + 28)); index418 = index418 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index418 * 8) - array34.push(result33) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let result416 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaTypeBody::FlagsType(array34) - } - 18 => { + array417.push(result416) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array36 : Array[Int] = []; - for index37 = 0; index37 < (mbt_ffi_load32((iter_base) + 12)); index37 = index37 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index37 * 4) + Option::Some(array417) + } + _ => panic() + } - array36.push(mbt_ffi_load32((iter_base) + 0)) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted415, allowed_hosts : lifted419}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + 28 => { - @types.SchemaTypeBody::TupleType(array36) - } - 19 => { + @types.SchemaTypeBody::DatetimeType + } + 29 => { - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + @types.SchemaTypeBody::DurationType + } + 30 => { - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + let array422 : Array[String] = []; + for index423 = 0; index423 < (mbt_ffi_load32((iter_base) + 20)); index423 = index423 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index423 * 8) - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) - } - 23 => { + let result421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted38 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + array422.push(result421) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) + let lifted425 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result424 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result424}) + } + _ => panic() } - _ => panic() - } - let lifted39 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + let lifted427 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 20)) + let result426 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result426}) + } + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result420, allowed_suffixes : array422, min : lifted425, max : lifted427}) } + 31 => { - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted38, err : lifted39}) - } - 24 => { + let array451 : Array[@types.UnionBranch] = []; + for index452 = 0; index452 < (mbt_ffi_load32((iter_base) + 12)); index452 = index452 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index452 * 92) - let lifted43 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result428 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array41 : Array[String] = []; - for index42 = 0; index42 < (mbt_ffi_load32((iter_base) + 16)); index42 = index42 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index42 * 8) + let lifted437 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { - let result40 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result429 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - array41.push(result40) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + @types.DiscriminatorRule::Prefix(result429) + } + 1 => { - Option::Some(array41) - } - _ => panic() - } + let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted44 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + @types.DiscriminatorRule::Suffix(result430) + } + 2 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let result431 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted45 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + @types.DiscriminatorRule::Contains(result431) + } + 3 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + let result432 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted47 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + @types.DiscriminatorRule::Regex(result432) + } + 4 => { - let result46 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result433 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result46) - } - _ => panic() - } + let lifted435 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted43, min_length : lifted44, max_length : lifted45, regex : lifted47}) - } - 25 => { + let result434 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - let lifted51 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + Option::Some(result434) + } + _ => panic() + } - let array49 : Array[String] = []; - for index50 = 0; index50 < (mbt_ffi_load32((iter_base) + 16)); index50 = index50 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index50 * 8) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result433, literal : lifted435}) + } + 5 => { - let result48 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result436 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - array49.push(result48) + @types.DiscriminatorRule::FieldAbsent(result436) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - - Option::Some(array49) - } - _ => panic() - } - let lifted52 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let lifted439 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let result438 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let lifted53 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + Option::Some(result438) + } + _ => panic() + } - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + let array441 : Array[String] = []; + for index442 = 0; index442 < (mbt_ffi_load32((iter_base) + 52)); index442 = index442 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index442 * 8) - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted51, min_bytes : lifted52, max_bytes : lifted53}) - } - 26 => { + let result440 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted57 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + array441.push(result440) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array55 : Array[String] = []; - for index56 = 0; index56 < (mbt_ffi_load32((iter_base) + 20)); index56 = index56 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index56 * 8) + let array444 : Array[String] = []; + for index445 = 0; index445 < (mbt_ffi_load32((iter_base) + 60)); index445 = index445 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index445 * 8) - let result54 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result443 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array55.push(result54) + array444.push(result443) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - Option::Some(array55) - } - _ => panic() - } + let lifted447 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted61 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + let result446 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let array59 : Array[String] = []; - for index60 = 0; index60 < (mbt_ffi_load32((iter_base) + 32)); index60 = index60 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index60 * 8) + Option::Some(result446) + } + _ => panic() + } - let result58 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted450 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { - array59.push(result58) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let lifted449 = match (mbt_ffi_load8_u((iter_base) + 80)) { + 0 => { - Option::Some(array59) - } - _ => panic() - } + @types.Role::Multimodal + } + 1 => { - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted57, allowed_extensions : lifted61}) - } - 27 => { + @types.Role::UnstructuredText + } + 2 => { - let lifted65 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.Role::UnstructuredBinary + } + 3 => { - let array63 : Array[String] = []; - for index64 = 0; index64 < (mbt_ffi_load32((iter_base) + 16)); index64 = index64 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index64 * 8) + let result448 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - let result62 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.Role::Other(result448) + } + _ => panic() + } - array63.push(result62) + Option::Some(lifted449) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array63) + array451.push(@types.UnionBranch::{tag : result428, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted437, metadata : @types.MetadataEnvelope::{doc : lifted439, aliases : array441, examples : array444, deprecated : lifted447, role : lifted450}}) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let lifted69 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array451}) + } + 32 => { - let array67 : Array[String] = []; - for index68 = 0; index68 < (mbt_ffi_load32((iter_base) + 28)); index68 = index68 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index68 * 8) + let lifted454 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result66 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result453 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - array67.push(result66) + Option::Some(result453) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - - Option::Some(array67) + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted454}) } + 33 => { - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted65, allowed_hosts : lifted69}) - } - 28 => { + let lifted456 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::DatetimeType - } - 29 => { + let result455 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @types.SchemaTypeBody::DurationType - } - 30 => { + Option::Some(result455) + } + _ => panic() + } - let result70 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted456}) + } + 34 => { - let array72 : Array[String] = []; - for index73 = 0; index73 < (mbt_ffi_load32((iter_base) + 20)); index73 = index73 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index73 * 8) + let lifted457 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result71 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - array72.push(result71) + @types.SchemaTypeBody::FutureType(lifted457) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - - let lifted75 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + 35 => { - let result74 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let lifted458 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result74}) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::StreamType(lifted458) } + _ => panic() + } - let lifted77 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let lifted461 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + 0 => Option::None + 1 => { - let result76 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result460 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result76}) - } - _ => panic() + Option::Some(result460) } - - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result70, allowed_suffixes : array72, min : lifted75, max : lifted77}) + _ => panic() } - 31 => { - - let array101 : Array[@types.UnionBranch] = []; - for index102 = 0; index102 < (mbt_ffi_load32((iter_base) + 12)); index102 = index102 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index102 * 92) - - let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted87 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + let array463 : Array[String] = []; + for index464 = 0; index464 < (mbt_ffi_load32((iter_base) + 104)); index464 = index464 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index464 * 8) - let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result462 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.DiscriminatorRule::Prefix(result79) - } - 1 => { + array463.push(result462) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let array466 : Array[String] = []; + for index467 = 0; index467 < (mbt_ffi_load32((iter_base) + 112)); index467 = index467 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index467 * 8) - @types.DiscriminatorRule::Suffix(result80) - } - 2 => { + let result465 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + array466.push(result465) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - @types.DiscriminatorRule::Contains(result81) - } - 3 => { + let lifted469 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { - let result82 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result468 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - @types.DiscriminatorRule::Regex(result82) - } - 4 => { + Option::Some(result468) + } + _ => panic() + } - let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted472 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { - let lifted85 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + let lifted471 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { - let result84 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + @types.Role::Multimodal + } + 1 => { - Option::Some(result84) - } - _ => panic() - } + @types.Role::UnstructuredText + } + 2 => { - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result83, literal : lifted85}) + @types.Role::UnstructuredBinary } - 5 => { + 3 => { - let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result470 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.DiscriminatorRule::FieldAbsent(result86) + @types.Role::Other(result470) } _ => panic() } - let lifted89 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + Option::Some(lifted471) + } + _ => panic() + } - let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + array473.push(@types.SchemaTypeNode::{body : lifted459, metadata : @types.MetadataEnvelope::{doc : lifted461, aliases : array463, examples : array466, deprecated : lifted469, role : lifted472}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) - Option::Some(result88) - } - _ => panic() - } + let array478 : Array[@types.SchemaTypeDef] = []; + for index479 = 0; index479 < (mbt_ffi_load32((iter_base) + 32)); index479 = index479 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index479 * 24) - let array91 : Array[String] = []; - for index92 = 0; index92 < (mbt_ffi_load32((iter_base) + 52)); index92 = index92 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index92 * 8) + let result475 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted477 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array91.push(result90) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + let result476 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - let array94 : Array[String] = []; - for index95 = 0; index95 < (mbt_ffi_load32((iter_base) + 60)); index95 = index95 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index95 * 8) + Option::Some(result476) + } + _ => panic() + } + + array478.push(@types.SchemaTypeDef::{id : result475, name : lifted477, body : mbt_ffi_load32((iter_base) + 20)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + let lifted481 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result480 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result480) + } + _ => panic() + } + + let result482 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + + let lifted484 : String? = match mbt_ffi_load8_u((iter_base) + 60) { + 0 => Option::None + 1 => { + + let result483 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + + Option::Some(result483) + } + _ => panic() + } + + let lifted502 = match (mbt_ffi_load8_u((iter_base) + 72)) { + 0 => { + + let array500 : Array[@common.NamedField] = []; + for index501 = 0; index501 < (mbt_ffi_load32((iter_base) + 80)); index501 = index501 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 76)) + (index501 * 72) + + let result485 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted486 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { + + @common.FieldSource::UserSupplied + } + 1 => { + + @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) + } + _ => panic() + } + + let lifted488 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result487 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - array94.push(result93) + Option::Some(result487) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted97 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let array490 : Array[String] = []; + for index491 = 0; index491 < (mbt_ffi_load32((iter_base) + 32)); index491 = index491 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index491 * 8) + + let result489 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array490.push(result489) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + let array493 : Array[String] = []; + for index494 = 0; index494 < (mbt_ffi_load32((iter_base) + 40)); index494 = index494 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index494 * 8) + + let result492 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array493.push(result492) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + + let lifted496 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result96 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result495 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result96) + Option::Some(result495) } _ => panic() } - let lifted100 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted499 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted99 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted498 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -7747,4598 +7787,13472 @@ pub fn parse_agent_id(agent_id : String) -> Result[(String, @types.TypedSchemaVa } 3 => { - let result98 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result497 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result98) + @types.Role::Other(result497) } _ => panic() } - Option::Some(lifted99) + Option::Some(lifted498) } _ => panic() } - array101.push(@types.UnionBranch::{tag : result78, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted87, metadata : @types.MetadataEnvelope::{doc : lifted89, aliases : array91, examples : array94, deprecated : lifted97, role : lifted100}}) + array500.push(@common.NamedField::{name : result485, source : lifted486, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted488, aliases : array490, examples : array493, deprecated : lifted496, role : lifted499}}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 76)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array101}) + @common.InputSchema::Parameters(array500) } - 32 => { + _ => panic() + } - let lifted104 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let array550 : Array[@common.AgentMethod] = []; + for index551 = 0; index551 < (mbt_ffi_load32((iter_base) + 88)); index551 = index551 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index551 * 88) - let result103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result503 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(result103) - } - _ => panic() - } + let result504 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted104}) - } - 33 => { + let array525 : Array[@common.HttpEndpointDetails] = []; + for index526 = 0; index526 < (mbt_ffi_load32((iter_base) + 20)); index526 = index526 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index526 * 48) - let lifted106 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None + let lifted506 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @common.HttpMethod::Get + } 1 => { - let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + @common.HttpMethod::Head + } + 2 => { - Option::Some(result105) + @common.HttpMethod::Post } - _ => panic() - } + 3 => { - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted106}) - } - 34 => { + @common.HttpMethod::Put + } + 4 => { - let lifted107 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @common.HttpMethod::Delete + } + 5 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) + @common.HttpMethod::Connect } - _ => panic() - } + 6 => { - @types.SchemaTypeBody::FutureType(lifted107) - } - 35 => { + @common.HttpMethod::Options + } + 7 => { - let lifted108 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @common.HttpMethod::Trace + } + 8 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) + @common.HttpMethod::Patch + } + 9 => { + + let result505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + + @common.HttpMethod::Custom(result505) } _ => panic() } - @types.SchemaTypeBody::StreamType(lifted108) - } - _ => panic() - } + let array511 : Array[@common.PathSegment] = []; + for index512 = 0; index512 < (mbt_ffi_load32((iter_base) + 16)); index512 = index512 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index512 * 12) - let lifted111 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { + let lifted510 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result507 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - Option::Some(result110) - } - _ => panic() - } + @common.PathSegment::Literal(result507) + } + 1 => { - let array113 : Array[String] = []; - for index114 = 0; index114 < (mbt_ffi_load32((iter_base) + 104)); index114 = index114 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index114 * 8) + @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) + } + 2 => { - let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result508 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - array113.push(result112) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result508}) + } + 3 => { - let array116 : Array[String] = []; - for index117 = 0; index117 < (mbt_ffi_load32((iter_base) + 112)); index117 = index117 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index117 * 8) + let result509 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let result115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result509}) + } + _ => panic() + } - array116.push(result115) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + array511.push(lifted510) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - let lifted119 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + let array515 : Array[@common.HeaderVariable] = []; + for index516 = 0; index516 < (mbt_ffi_load32((iter_base) + 24)); index516 = index516 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index516 * 16) - let result118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result513 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(result118) - } - _ => panic() - } + let result514 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted122 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + array515.push(@common.HeaderVariable::{header_name : result513, variable_name : result514}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) - let lifted121 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + let array519 : Array[@common.QueryVariable] = []; + for index520 = 0; index520 < (mbt_ffi_load32((iter_base) + 32)); index520 = index520 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index520 * 16) - @types.Role::Multimodal - } - 1 => { + let result517 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.Role::UnstructuredText - } - 2 => { + let result518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.Role::UnstructuredBinary - } - 3 => { + array519.push(@common.QueryVariable::{query_param_name : result517, variable_name : result518}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let result120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let lifted521 : @common.AuthDetails? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - @types.Role::Other(result120) + Option::Some(@common.AuthDetails::{required : (mbt_ffi_load8_u((iter_base) + 37) != 0)}) } _ => panic() } - Option::Some(lifted121) - } - _ => panic() - } + let array523 : Array[String] = []; + for index524 = 0; index524 < (mbt_ffi_load32((iter_base) + 44)); index524 = index524 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index524 * 8) - array123.push(@types.SchemaTypeNode::{body : lifted109, metadata : @types.MetadataEnvelope::{doc : lifted111, aliases : array113, examples : array116, deprecated : lifted119, role : lifted122}}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) + let result522 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array128 : Array[@types.SchemaTypeDef] = []; - for index129 = 0; index129 < (mbt_ffi_load32((return_area) + 28)); index129 = index129 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 24)) + (index129 * 24) + array523.push(result522) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + array525.push(@common.HttpEndpointDetails::{http_method : lifted506, path_suffix : array511, header_vars : array515, query_vars : array519, auth_details : lifted521, cors_options : @common.CorsOptions::{allowed_patterns : array523}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted127 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted528 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - let result126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result527 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result126) + Option::Some(result527) + } + _ => panic() } - _ => panic() - } - array128.push(@types.SchemaTypeDef::{id : result125, name : lifted127, body : mbt_ffi_load32((iter_base) + 20)}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 24)) + let lifted546 = match (mbt_ffi_load8_u((iter_base) + 36)) { + 0 => { - let array160 : Array[@types.SchemaValueNode] = []; - for index161 = 0; index161 < (mbt_ffi_load32((return_area) + 40)); index161 = index161 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 36)) + (index161 * 32) + let array544 : Array[@common.NamedField] = []; + for index545 = 0; index545 < (mbt_ffi_load32((iter_base) + 44)); index545 = index545 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index545 * 72) - let lifted159 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let result529 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + let lifted530 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + @common.FieldSource::UserSupplied + } + 1 => { - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + @common.FieldSource::AutoInjected(@common.AutoInjectedKind::from(mbt_ffi_load8_u((iter_base) + 9))) + } + _ => panic() + } - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + let lifted532 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + let result531 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + Option::Some(result531) + } + _ => panic() + } - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + let array534 : Array[String] = []; + for index535 = 0; index535 < (mbt_ffi_load32((iter_base) + 32)); index535 = index535 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index535 * 8) - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + let result533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + array534.push(result533) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + let array537 : Array[String] = []; + for index538 = 0; index538 < (mbt_ffi_load32((iter_base) + 40)); index538 = index538 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index538 * 8) - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + let result536 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + array537.push(result536) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let result130 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted540 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::StringValue(result130) - } - 13 => { + let result539 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - let array131 : Array[Int] = []; - for index132 = 0; index132 < (mbt_ffi_load32((iter_base) + 12)); index132 = index132 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index132 * 4) + Option::Some(result539) + } + _ => panic() + } - array131.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted543 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::RecordValue(array131) - } - 14 => { + let lifted542 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - let lifted133 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @types.Role::Multimodal + } + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } - - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted133}) - } - 15 => { + @types.Role::UnstructuredText + } + 2 => { - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + @types.Role::UnstructuredBinary + } + 3 => { - let array134 : Array[Bool] = []; - for index135 = 0; index135 < (mbt_ffi_load32((iter_base) + 12)); index135 = index135 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index135 * 1) + let result541 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - array134.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.Role::Other(result541) + } + _ => panic() + } - @types.SchemaValueNode::FlagsValue(array134) - } - 17 => { + Option::Some(lifted542) + } + _ => panic() + } - let array136 : Array[Int] = []; - for index137 = 0; index137 < (mbt_ffi_load32((iter_base) + 12)); index137 = index137 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index137 * 4) + array544.push(@common.NamedField::{name : result529, source : lifted530, schema : mbt_ffi_load32((iter_base) + 12), metadata : @types.MetadataEnvelope::{doc : lifted532, aliases : array534, examples : array537, deprecated : lifted540, role : lifted543}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - array136.push(mbt_ffi_load32((iter_base) + 0)) + @common.InputSchema::Parameters(array544) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::TupleValue(array136) + _ => panic() } - 18 => { - let array138 : Array[Int] = []; - for index139 = 0; index139 < (mbt_ffi_load32((iter_base) + 12)); index139 = index139 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index139 * 4) + let lifted547 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - array138.push(mbt_ffi_load32((iter_base) + 0)) + @common.OutputSchema::Unit } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::ListValue(array138) - } - 19 => { - - let array140 : Array[Int] = []; - for index141 = 0; index141 < (mbt_ffi_load32((iter_base) + 12)); index141 = index141 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index141 * 4) + 1 => { - array140.push(mbt_ffi_load32((iter_base) + 0)) + @common.OutputSchema::Single(mbt_ffi_load32((iter_base) + 52)) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FixedListValue(array140) + _ => panic() } - 20 => { - let array142 : Array[@types.MapEntry] = []; - for index143 = 0; index143 < (mbt_ffi_load32((iter_base) + 12)); index143 = index143 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index143 * 8) + let lifted549 : @common.ReadOnlyConfig? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - array142.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted548 = match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => { - @types.SchemaValueNode::MapValue(array142) - } - 21 => { + @common.CachePolicy::NoCache + } + 1 => { - let lifted144 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @common.CachePolicy::UntilWrite + } + 2 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) + @common.CachePolicy::Ttl((mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() - } - @types.SchemaValueNode::OptionValue(lifted144) + Option::Some(@common.ReadOnlyConfig::{cache_policy : lifted548, uses_principal : (mbt_ffi_load8_u((iter_base) + 80) != 0)}) + } + _ => panic() } - 22 => { - let lifted147 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + array550.push(@common.AgentMethod::{name : result503, description : result504, http_endpoint : array525, prompt_hint : lifted528, input_schema : lifted546, output_schema : lifted547, read_only : lifted549}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) - let lifted145 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + array552.push(@common.AgentDependency::{type_name : result274, description : lifted276, schema : @types.SchemaGraph::{type_nodes : array473, defs : array478, root : mbt_ffi_load32((iter_base) + 36)}, constructor_ : @common.AgentConstructor::{name : lifted481, description : result482, prompt_hint : lifted484, input_schema : lifted502}, methods : array550}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 104)) - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + let lifted570 : @common.HttpMountDetails? = match mbt_ffi_load8_u((return_area) + 116) { + 0 => Option::None + 1 => { - @types.ResultValuePayload::OkValue(lifted145) - } - 1 => { + let array558 : Array[@common.PathSegment] = []; + for index559 = 0; index559 < (mbt_ffi_load32((return_area) + 124)); index559 = index559 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 120)) + (index559 * 12) - let lifted146 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted557 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + let result554 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @types.ResultValuePayload::ErrValue(lifted146) + @common.PathSegment::Literal(result554) } - _ => panic() - } - - @types.SchemaValueNode::ResultValue(lifted147) - } - 23 => { - - let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - - let lifted150 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None 1 => { - let result149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - - Option::Some(result149) + @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) } - _ => panic() - } - - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result148, language : lifted150}) - } - 24 => { + 2 => { - let result151 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result555 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let lifted153 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result555}) + } + 3 => { - let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - Option::Some(result152) + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result556}) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result151, mime_type : lifted153}) + array558.push(lifted557) } - 25 => { + mbt_ffi_free(mbt_ffi_load32((return_area) + 120)) - let result154 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted560 : @common.AuthDetails? = match mbt_ffi_load8_u((return_area) + 128) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::PathValue(result154) + Option::Some(@common.AuthDetails::{required : (mbt_ffi_load8_u((return_area) + 129) != 0)}) + } + _ => panic() } - 26 => { - let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let array562 : Array[String] = []; + for index563 = 0; index563 < (mbt_ffi_load32((return_area) + 136)); index563 = index563 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 132)) + (index563 * 8) - @types.SchemaValueNode::UrlValue(result155) - } - 27 => { + let result561 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + array562.push(result561) } - 28 => { + mbt_ffi_free(mbt_ffi_load32((return_area) + 132)) - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) - } - 29 => { + let array568 : Array[@common.PathSegment] = []; + for index569 = 0; index569 < (mbt_ffi_load32((return_area) + 144)); index569 = index569 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 140)) + (index569 * 12) - let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let lifted567 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result156}) - } - 30 => { + let result564 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @common.PathSegment::Literal(result564) + } + 1 => { - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result157, body : mbt_ffi_load32((iter_base) + 16)}) - } - 31 => { + @common.PathSegment::SystemVariable(@common.SystemVariable::from(mbt_ffi_load8_u((iter_base) + 4))) + } + 2 => { - let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result158}) - } - 32 => { + @common.PathSegment::PathVariable(@common.PathVariable::{variable_name : result565}) + } + 3 => { - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) - } - _ => panic() - } + let result566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - array160.push(lifted159) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 36)) + @common.PathSegment::RemainingPathVariable(@common.PathVariable::{variable_name : result566}) + } + _ => panic() + } - let lifted162 : @types.Uuid? = match mbt_ffi_load8_u((return_area) + 48) { - 0 => Option::None - 1 => { + array568.push(lifted567) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 140)) - Option::Some(@types.Uuid::{high_bits : (mbt_ffi_load64((return_area) + 56)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((return_area) + 64)).reinterpret_as_uint64()}) + Option::Some(@common.HttpMountDetails::{path_prefix : array558, auth_details : lifted560, phantom_agent : (mbt_ffi_load8_u((return_area) + 130) != 0), cors_options : @common.CorsOptions::{allowed_patterns : array562}, webhook_suffix : array568}) } _ => panic() } - Result::Ok((result, @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array123, defs : array128, root : mbt_ffi_load32((return_area) + 32)}, value : @types.SchemaValueTree::{value_nodes : array160, root : mbt_ffi_load32((return_area) + 44)}}, lifted162)) - } - 1 => { - - let lifted332 = match (mbt_ffi_load8_u((return_area) + 8)) { + let lifted572 = match (mbt_ffi_load8_u((return_area) + 152)) { 0 => { - let result163 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - - @common.AgentError::InvalidInput(result163) + @common.Snapshotting::Disabled } 1 => { - let result164 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - - @common.AgentError::InvalidMethod(result164) - } - 2 => { + let lifted571 = match (mbt_ffi_load8_u((return_area) + 160)) { + 0 => { - let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + @common.SnapshottingConfig::Default + } + 1 => { - @common.AgentError::InvalidType(result165) - } - 3 => { + @common.SnapshottingConfig::Periodic((mbt_ffi_load64((return_area) + 168)).reinterpret_as_uint64()) + } + 2 => { - let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + @common.SnapshottingConfig::EveryNInvocation((mbt_ffi_load16_u((return_area) + 168).land(0xFFFF).reinterpret_as_uint())) + } + _ => panic() + } - @common.AgentError::InvalidAgentId(result166) + @common.Snapshotting::Enabled(lifted571) } - 4 => { - - let array293 : Array[@types.SchemaTypeNode] = []; - for index294 = 0; index294 < (mbt_ffi_load32((return_area) + 16)); index294 = index294 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index294 * 144) + _ => panic() + } - let lifted279 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let array576 : Array[@common.AgentConfigDeclaration] = []; + for index577 = 0; index577 < (mbt_ffi_load32((return_area) + 180)); index577 = index577 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 176)) + (index577 * 16) - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { + let array574 : Array[String] = []; + for index575 = 0; index575 < (mbt_ffi_load32((iter_base) + 8)); index575 = index575 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index575 * 8) - @types.SchemaTypeBody::BoolType - } - 2 => { + let result573 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaTypeBody::S8Type - } - 3 => { + array574.push(result573) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) - @types.SchemaTypeBody::S16Type - } - 4 => { + array576.push(@common.AgentConfigDeclaration::{source : @common.AgentConfigSource::from(mbt_ffi_load8_u((iter_base) + 0)), path : array574, value_type : mbt_ffi_load32((iter_base) + 12)}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 176)) - @types.SchemaTypeBody::S32Type - } - 5 => { + Option::Some(@common.RegisteredAgentType::{agent_type : @common.AgentType::{type_name : result, description : result0, source_language : result1, schema : @types.SchemaGraph::{type_nodes : array195, defs : array200, root : mbt_ffi_load32((return_area) + 48)}, constructor_ : @common.AgentConstructor::{name : lifted203, description : result204, prompt_hint : lifted206, input_schema : lifted224}, methods : array272, dependencies : array552, mode : @common.AgentMode::from(mbt_ffi_load8_u((return_area) + 112)), http_mount : lifted570, snapshotting : lifted572, config : array576}, implemented_by : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((return_area) + 184)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((return_area) + 192)).reinterpret_as_uint64()}}}) + } + _ => panic() + } + let ret = lifted578 + mbt_ffi_free(ptr) + mbt_ffi_free(return_area) + return ret - @types.SchemaTypeBody::S64Type - } - 6 => { +} +///| +/// Constructs a string agent-id from the agent type and its constructor parameters +/// and an optional phantom ID. +/// +/// `input` is a value tree whose root encodes the constructor's parameter list. +pub fn make_agent_id(agent_type_name : String, input : @types.SchemaValueTree, phantom_id : @types.Uuid?) -> Result[String, @common.AgentError] { + let cleanup_list : Array[Int] = [] - @types.SchemaTypeBody::U8Type - } - 7 => { + let ptr = mbt_ffi_str2ptr(agent_type_name) - @types.SchemaTypeBody::U16Type - } - 8 => { + let address66 = mbt_ffi_malloc(((input).value_nodes).length() * 32); + for index67 = 0; index67 < ((input).value_nodes).length(); index67 = index67 + 1 { + let iter_elem : @types.SchemaValueNode = ((input).value_nodes)[(index67)] + let iter_base = address66 + (index67 * 32); - @types.SchemaTypeBody::U32Type - } - 9 => { + match iter_elem { + BoolValue(payload) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) - @types.SchemaTypeBody::U64Type - } - 10 => { + () + } + S8Value(payload0) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) - @types.SchemaTypeBody::F32Type - } - 11 => { + () + } + S16Value(payload1) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) - @types.SchemaTypeBody::F64Type - } - 12 => { + () + } + S32Value(payload2) => { + mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload2) - @types.SchemaTypeBody::CharType - } - 13 => { + () + } + S64Value(payload3) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload3) - @types.SchemaTypeBody::StringType - } - 14 => { - - let array181 : Array[@types.NamedFieldType] = []; - for index182 = 0; index182 < (mbt_ffi_load32((iter_base) + 12)); index182 = index182 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index182 * 68) + () + } + U8Value(payload4) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) - let result167 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + U16Value(payload5) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) - let lifted169 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + () + } + U32Value(payload6) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) - let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + () + } + U64Value(payload7) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) - Option::Some(result168) - } - _ => panic() - } + () + } + F32Value(payload8) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload8) - let array171 : Array[String] = []; - for index172 = 0; index172 < (mbt_ffi_load32((iter_base) + 28)); index172 = index172 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index172 * 8) + () + } + F64Value(payload9) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload9) - let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + CharValue(payload10) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) - array171.push(result170) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + () + } + StringValue(payload11) => { + mbt_ffi_store8((iter_base) + 0, (12)) - let array174 : Array[String] = []; - for index175 = 0; index175 < (mbt_ffi_load32((iter_base) + 36)); index175 = index175 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index175 * 8) + let ptr12 = mbt_ffi_str2ptr(payload11) + mbt_ffi_store32((iter_base) + 12, payload11.length()) + mbt_ffi_store32((iter_base) + 8, ptr12) + cleanup_list.push(ptr12) - let result173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + RecordValue(payload13) => { + mbt_ffi_store8((iter_base) + 0, (13)) - array174.push(result173) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + let address = mbt_ffi_malloc((payload13).length() * 4); + for index = 0; index < (payload13).length(); index = index + 1 { + let iter_elem : Int = (payload13)[(index)] + let iter_base = address + (index * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - let lifted177 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + } + mbt_ffi_store32((iter_base) + 12, (payload13).length()) + mbt_ffi_store32((iter_base) + 8, address) + cleanup_list.push(address) - let result176 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + () + } + VariantValue(payload14) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) - Option::Some(result176) - } - _ => panic() - } + match ((payload14).payload) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - let lifted180 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + () + } + Some(payload16) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload16) - let lifted179 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + () + } + } - @types.Role::Multimodal - } - 1 => { + () + } + EnumValue(payload17) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) - @types.Role::UnstructuredText - } - 2 => { + () + } + FlagsValue(payload18) => { + mbt_ffi_store8((iter_base) + 0, (16)) - @types.Role::UnstructuredBinary - } - 3 => { + let address19 = mbt_ffi_malloc((payload18).length() * 1); + for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { + let iter_elem : Bool = (payload18)[(index20)] + let iter_base = address19 + (index20 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) - let result178 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + } + mbt_ffi_store32((iter_base) + 12, (payload18).length()) + mbt_ffi_store32((iter_base) + 8, address19) + cleanup_list.push(address19) - @types.Role::Other(result178) - } - _ => panic() - } + () + } + TupleValue(payload21) => { + mbt_ffi_store8((iter_base) + 0, (17)) - Option::Some(lifted179) - } - _ => panic() - } + let address22 = mbt_ffi_malloc((payload21).length() * 4); + for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { + let iter_elem : Int = (payload21)[(index23)] + let iter_base = address22 + (index23 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - array181.push(@types.NamedFieldType::{name : result167, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted169, aliases : array171, examples : array174, deprecated : lifted177, role : lifted180}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + } + mbt_ffi_store32((iter_base) + 12, (payload21).length()) + mbt_ffi_store32((iter_base) + 8, address22) + cleanup_list.push(address22) - @types.SchemaTypeBody::RecordType(array181) - } - 15 => { + () + } + ListValue(payload24) => { + mbt_ffi_store8((iter_base) + 0, (18)) - let array198 : Array[@types.VariantCaseType] = []; - for index199 = 0; index199 < (mbt_ffi_load32((iter_base) + 12)); index199 = index199 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index199 * 72) + let address25 = mbt_ffi_malloc((payload24).length() * 4); + for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { + let iter_elem : Int = (payload24)[(index26)] + let iter_base = address25 + (index26 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + } + mbt_ffi_store32((iter_base) + 12, (payload24).length()) + mbt_ffi_store32((iter_base) + 8, address25) + cleanup_list.push(address25) - let lifted184 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + FixedListValue(payload27) => { + mbt_ffi_store8((iter_base) + 0, (19)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let address28 = mbt_ffi_malloc((payload27).length() * 4); + for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { + let iter_elem : Int = (payload27)[(index29)] + let iter_base = address28 + (index29 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - let lifted186 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + } + mbt_ffi_store32((iter_base) + 12, (payload27).length()) + mbt_ffi_store32((iter_base) + 8, address28) + cleanup_list.push(address28) - let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + () + } + MapValue(payload30) => { + mbt_ffi_store8((iter_base) + 0, (20)) - Option::Some(result185) - } - _ => panic() - } + let address31 = mbt_ffi_malloc((payload30).length() * 8); + for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { + let iter_elem : @types.MapEntry = (payload30)[(index32)] + let iter_base = address31 + (index32 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) - let array188 : Array[String] = []; - for index189 = 0; index189 < (mbt_ffi_load32((iter_base) + 32)); index189 = index189 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index189 * 8) + } + mbt_ffi_store32((iter_base) + 12, (payload30).length()) + mbt_ffi_store32((iter_base) + 8, address31) + cleanup_list.push(address31) - let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + OptionValue(payload33) => { + mbt_ffi_store8((iter_base) + 0, (21)) - array188.push(result187) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + match (payload33) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let array191 : Array[String] = []; - for index192 = 0; index192 < (mbt_ffi_load32((iter_base) + 40)); index192 = index192 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index192 * 8) + () + } + Some(payload35) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload35) - let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + } - array191.push(result190) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + () + } + ResultValue(payload36) => { + mbt_ffi_store8((iter_base) + 0, (22)) - let lifted194 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + match payload36 { + OkValue(payload37) => { + mbt_ffi_store8((iter_base) + 8, (0)) - let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + match (payload37) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - Option::Some(result193) - } - _ => panic() - } + () + } + Some(payload39) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload39) - let lifted197 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + () + } + } - let lifted196 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + () + } + ErrValue(payload40) => { + mbt_ffi_store8((iter_base) + 8, (1)) - @types.Role::Multimodal - } - 1 => { + match (payload40) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - @types.Role::UnstructuredText - } - 2 => { + () + } + Some(payload42) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload42) - @types.Role::UnstructuredBinary - } - 3 => { + () + } + } - let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + () + } + } - @types.Role::Other(result195) - } - _ => panic() - } + () + } + TextValue(payload43) => { + mbt_ffi_store8((iter_base) + 0, (23)) - Option::Some(lifted196) - } - _ => panic() - } + let ptr44 = mbt_ffi_str2ptr((payload43).text) + mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr44) - array198.push(@types.VariantCaseType::{name : result183, payload : lifted184, metadata : @types.MetadataEnvelope::{doc : lifted186, aliases : array188, examples : array191, deprecated : lifted194, role : lifted197}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + match ((payload43).language) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - @types.SchemaTypeBody::VariantType(array198) - } - 16 => { + () + } + Some(payload46) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let array201 : Array[String] = []; - for index202 = 0; index202 < (mbt_ffi_load32((iter_base) + 12)); index202 = index202 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index202 * 8) + let ptr47 = mbt_ffi_str2ptr(payload46) + mbt_ffi_store32((iter_base) + 24, payload46.length()) + mbt_ffi_store32((iter_base) + 20, ptr47) + cleanup_list.push(ptr47) - let result200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + } + cleanup_list.push(ptr44) - array201.push(result200) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + BinaryValue(payload48) => { + mbt_ffi_store8((iter_base) + 0, (24)) - @types.SchemaTypeBody::EnumType(array201) - } - 17 => { + let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) - let array204 : Array[String] = []; - for index205 = 0; index205 < (mbt_ffi_load32((iter_base) + 12)); index205 = index205 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index205 * 8) + mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr49) - let result203 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + match ((payload48).mime_type) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - array204.push(result203) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + Some(payload51) => { + mbt_ffi_store8((iter_base) + 16, (1)) - @types.SchemaTypeBody::FlagsType(array204) - } - 18 => { + let ptr52 = mbt_ffi_str2ptr(payload51) + mbt_ffi_store32((iter_base) + 24, payload51.length()) + mbt_ffi_store32((iter_base) + 20, ptr52) + cleanup_list.push(ptr52) - let array206 : Array[Int] = []; - for index207 = 0; index207 < (mbt_ffi_load32((iter_base) + 12)); index207 = index207 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index207 * 4) + () + } + } + cleanup_list.push(ptr49) - array206.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + PathValue(payload53) => { + mbt_ffi_store8((iter_base) + 0, (25)) - @types.SchemaTypeBody::TupleType(array206) - } - 19 => { + let ptr54 = mbt_ffi_str2ptr(payload53) + mbt_ffi_store32((iter_base) + 12, payload53.length()) + mbt_ffi_store32((iter_base) + 8, ptr54) + cleanup_list.push(ptr54) - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + () + } + UrlValue(payload55) => { + mbt_ffi_store8((iter_base) + 0, (26)) - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + let ptr56 = mbt_ffi_str2ptr(payload55) + mbt_ffi_store32((iter_base) + 12, payload55.length()) + mbt_ffi_store32((iter_base) + 8, ptr56) + cleanup_list.push(ptr56) - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + () + } + DatetimeValue(payload57) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload57).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) - } - 23 => { + () + } + DurationValue(payload58) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) - let lifted208 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + QuantityValueNode(payload59) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload59).scale) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let ptr60 = mbt_ffi_str2ptr((payload59).unit) + mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr60) + cleanup_list.push(ptr60) - let lifted209 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + () + } + UnionValue(payload61) => { + mbt_ffi_store8((iter_base) + 0, (30)) - Option::Some(mbt_ffi_load32((iter_base) + 20)) - } - _ => panic() - } + let ptr62 = mbt_ffi_str2ptr((payload61).tag) + mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr62) + mbt_ffi_store32((iter_base) + 16, (payload61).body) + cleanup_list.push(ptr62) - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted208, err : lifted209}) - } - 24 => { + () + } + SecretValue(payload63) => { + mbt_ffi_store8((iter_base) + 0, (31)) - let lifted213 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr64) + cleanup_list.push(ptr64) - let array211 : Array[String] = []; - for index212 = 0; index212 < (mbt_ffi_load32((iter_base) + 16)); index212 = index212 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index212 * 8) + () + } + QuotaTokenHandle(payload65) => { + mbt_ffi_store8((iter_base) + 0, (32)) - let result210 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let @types.QuotaToken(handle) = payload65 + mbt_ffi_store32((iter_base) + 8, handle) - array211.push(result210) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + () + } + } - Option::Some(array211) - } - _ => panic() - } + } - let lifted214 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let (lowered, lowered70, lowered71) = match (phantom_id) { + None => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + ((0), 0L, 0L) + } + Some(payload69) => { - let lifted215 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + ((1), ((payload69).high_bits).reinterpret_as_int64(), ((payload69).low_bits).reinterpret_as_int64()) + } + } + let return_area = mbt_ffi_malloc(40) + wasmImportMakeAgentId(ptr, agent_type_name.length(), address66, ((input).value_nodes).length(), (input).root, lowered, lowered70, lowered71, return_area); - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + let lifted310 = match (mbt_ffi_load8_u((return_area) + 0)) { + 0 => { - let lifted217 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 4), mbt_ffi_load32((return_area) + 8)) - let result216 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + Result::Ok(result) + } + 1 => { - Option::Some(result216) - } - _ => panic() - } + let lifted309 = match (mbt_ffi_load8_u((return_area) + 4)) { + 0 => { - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted213, min_length : lifted214, max_length : lifted215, regex : lifted217}) - } - 25 => { + let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - let lifted221 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @common.AgentError::InvalidInput(result72) + } + 1 => { - let array219 : Array[String] = []; - for index220 = 0; index220 < (mbt_ffi_load32((iter_base) + 16)); index220 = index220 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index220 * 8) + let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - let result218 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @common.AgentError::InvalidMethod(result73) + } + 2 => { - array219.push(result218) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + let result74 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - Option::Some(array219) - } - _ => panic() - } + @common.AgentError::InvalidType(result74) + } + 3 => { - let lifted222 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let result75 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + @common.AgentError::InvalidAgentId(result75) + } + 4 => { - let lifted223 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let array270 : Array[@types.SchemaTypeNode] = []; + for index271 = 0; index271 < (mbt_ffi_load32((return_area) + 12)); index271 = index271 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 8)) + (index271 * 144) - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + let lifted256 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted221, min_bytes : lifted222, max_bytes : lifted223}) + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) } - 26 => { + 1 => { + + @types.SchemaTypeBody::BoolType + } + 2 => { - let lifted227 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted81 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array225 : Array[String] = []; - for index226 = 0; index226 < (mbt_ffi_load32((iter_base) + 20)); index226 = index226 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index226 * 8) - - let result224 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array225.push(result224) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + let lifted76 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - Option::Some(array225) - } - _ => panic() - } + let lifted = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted231 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let array229 : Array[String] = []; - for index230 = 0; index230 < (mbt_ffi_load32((iter_base) + 32)); index230 = index230 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index230 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - array229.push(result228) + Option::Some(lifted) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array229) - } - _ => panic() - } + let lifted78 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted227, allowed_extensions : lifted231}) - } - 27 => { + let lifted77 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted235 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let array233 : Array[String] = []; - for index234 = 0; index234 < (mbt_ffi_load32((iter_base) + 16)); index234 = index234 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index234 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result232 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array233.push(result232) + Option::Some(lifted77) + } + _ => panic() + } + + let lifted80 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result79) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array233) + Option::Some(@types.NumericRestrictions::{min : lifted76, max : lifted78, unit : lifted80}) } _ => panic() } - let lifted239 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + @types.SchemaTypeBody::S8Type(lifted81) + } + 3 => { + + let lifted88 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array237 : Array[String] = []; - for index238 = 0; index238 < (mbt_ffi_load32((iter_base) + 28)); index238 = index238 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index238 * 8) - - let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted83 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - array237.push(result236) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted82 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(array237) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted235, allowed_hosts : lifted239}) - } - 28 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::DatetimeType - } - 29 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::DurationType - } - 30 => { + Option::Some(lifted82) + } + _ => panic() + } - let result240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted85 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array242 : Array[String] = []; - for index243 = 0; index243 < (mbt_ffi_load32((iter_base) + 20)); index243 = index243 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index243 * 8) + let lifted84 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - array242.push(result241) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted245 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result244 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + Option::Some(lifted84) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result244}) - } - _ => panic() - } + let lifted87 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted247 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result246 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + Option::Some(result86) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result246}) + Option::Some(@types.NumericRestrictions::{min : lifted83, max : lifted85, unit : lifted87}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result240, allowed_suffixes : array242, min : lifted245, max : lifted247}) + @types.SchemaTypeBody::S16Type(lifted88) } - 31 => { - - let array271 : Array[@types.UnionBranch] = []; - for index272 = 0; index272 < (mbt_ffi_load32((iter_base) + 12)); index272 = index272 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index272 * 92) - - let result248 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + 4 => { - let lifted257 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + let lifted95 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result249 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted90 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.DiscriminatorRule::Prefix(result249) - } - 1 => { + let lifted89 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result250 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.DiscriminatorRule::Suffix(result250) - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result251 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.DiscriminatorRule::Contains(result251) + Option::Some(lifted89) + } + _ => panic() } - 3 => { - let result252 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - @types.DiscriminatorRule::Regex(result252) - } - 4 => { + let lifted92 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted91 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted255 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result254 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(result254) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() - } - - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result253, literal : lifted255}) - } - 5 => { - - let result256 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result256) + Option::Some(lifted91) + } + _ => panic() } - _ => panic() - } - let lifted259 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + let lifted94 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result258) + Option::Some(result93) + } + _ => panic() } - _ => panic() - } - let array261 : Array[String] = []; - for index262 = 0; index262 < (mbt_ffi_load32((iter_base) + 52)); index262 = index262 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index262 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted90, max : lifted92, unit : lifted94}) + } + _ => panic() + } - let result260 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S32Type(lifted95) + } + 5 => { - array261.push(result260) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + let lifted102 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array264 : Array[String] = []; - for index265 = 0; index265 < (mbt_ffi_load32((iter_base) + 60)); index265 = index265 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index265 * 8) + let lifted97 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result263 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted96 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array264.push(result263) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted267 : String? = match mbt_ffi_load8_u((iter_base) + 64) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result266 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result266) + Option::Some(lifted96) + } + _ => panic() } - _ => panic() - } - let lifted270 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { - 0 => Option::None - 1 => { + let lifted99 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted269 = match (mbt_ffi_load8_u((iter_base) + 80)) { - 0 => { + let lifted98 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - - let result268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result268) - } - _ => panic() + Option::Some(lifted98) } - - Option::Some(lifted269) + _ => panic() } - _ => panic() - } - array271.push(@types.UnionBranch::{tag : result248, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted257, metadata : @types.MetadataEnvelope::{doc : lifted259, aliases : array261, examples : array264, deprecated : lifted267, role : lifted270}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array271}) - } - 32 => { + let lifted101 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted274 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result273 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + Option::Some(result100) + } + _ => panic() + } - Option::Some(result273) + Option::Some(@types.NumericRestrictions::{min : lifted97, max : lifted99, unit : lifted101}) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted274}) + @types.SchemaTypeBody::S64Type(lifted102) } - 33 => { + 6 => { - let lifted276 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted109 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result275 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let lifted104 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - Option::Some(result275) - } - _ => panic() - } + let lifted103 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted276}) - } - 34 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted277 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::FutureType(lifted277) - } - 35 => { + Option::Some(lifted103) + } + _ => panic() + } - let lifted278 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted106 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let lifted105 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::StreamType(lifted278) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted281 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result280) - } - _ => panic() - } + Option::Some(lifted105) + } + _ => panic() + } - let array283 : Array[String] = []; - for index284 = 0; index284 < (mbt_ffi_load32((iter_base) + 104)); index284 = index284 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index284 * 8) + let lifted108 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result282 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array283.push(result282) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + Option::Some(result107) + } + _ => panic() + } - let array286 : Array[String] = []; - for index287 = 0; index287 < (mbt_ffi_load32((iter_base) + 112)); index287 = index287 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index287 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted104, max : lifted106, unit : lifted108}) + } + _ => panic() + } - let result285 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::U8Type(lifted109) + } + 7 => { - array286.push(result285) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + let lifted116 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let lifted289 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + let lifted111 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result288 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let lifted110 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(result288) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted292 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted291 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.Role::Multimodal - } - 1 => { + Option::Some(lifted110) + } + _ => panic() + } - @types.Role::UnstructuredText - } - 2 => { + let lifted113 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredBinary - } - 3 => { + let lifted112 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result290 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::Other(result290) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(lifted291) - } - _ => panic() - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array293.push(@types.SchemaTypeNode::{body : lifted279, metadata : @types.MetadataEnvelope::{doc : lifted281, aliases : array283, examples : array286, deprecated : lifted289, role : lifted292}}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) + Option::Some(lifted112) + } + _ => panic() + } - let array298 : Array[@types.SchemaTypeDef] = []; - for index299 = 0; index299 < (mbt_ffi_load32((return_area) + 24)); index299 = index299 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index299 * 24) + let lifted115 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result295 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted297 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + Option::Some(result114) + } + _ => panic() + } - let result296 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + Option::Some(@types.NumericRestrictions::{min : lifted111, max : lifted113, unit : lifted115}) + } + _ => panic() + } - Option::Some(result296) + @types.SchemaTypeBody::U16Type(lifted116) } - _ => panic() - } - - array298.push(@types.SchemaTypeDef::{id : result295, name : lifted297, body : mbt_ffi_load32((iter_base) + 20)}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 20)) - - let array330 : Array[@types.SchemaValueNode] = []; - for index331 = 0; index331 < (mbt_ffi_load32((return_area) + 36)); index331 = index331 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index331 * 32) + 8 => { - let lifted329 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let lifted123 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + let lifted118 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + let lifted117 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + Option::Some(lifted117) + } + _ => panic() + } - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + let lifted120 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + let lifted119 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + Option::Some(lifted119) + } + _ => panic() + } - let result300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted122 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::StringValue(result300) - } - 13 => { + let result121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let array301 : Array[Int] = []; - for index302 = 0; index302 < (mbt_ffi_load32((iter_base) + 12)); index302 = index302 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index302 * 4) + Option::Some(result121) + } + _ => panic() + } - array301.push(mbt_ffi_load32((iter_base) + 0)) + Option::Some(@types.NumericRestrictions::{min : lifted118, max : lifted120, unit : lifted122}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array301) + @types.SchemaTypeBody::U32Type(lifted123) } - 14 => { + 9 => { - let lifted303 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted130 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } - - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted303}) - } - 15 => { + let lifted125 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + let lifted124 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let array304 : Array[Bool] = []; - for index305 = 0; index305 < (mbt_ffi_load32((iter_base) + 12)); index305 = index305 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index305 * 1) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - array304.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::FlagsValue(array304) - } - 17 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let array306 : Array[Int] = []; - for index307 = 0; index307 < (mbt_ffi_load32((iter_base) + 12)); index307 = index307 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index307 * 4) + Option::Some(lifted124) + } + _ => panic() + } - array306.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted127 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::TupleValue(array306) - } - 18 => { + let lifted126 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array308 : Array[Int] = []; - for index309 = 0; index309 < (mbt_ffi_load32((iter_base) + 12)); index309 = index309 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index309 * 4) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - array308.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::ListValue(array308) - } - 19 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let array310 : Array[Int] = []; - for index311 = 0; index311 < (mbt_ffi_load32((iter_base) + 12)); index311 = index311 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index311 * 4) + Option::Some(lifted126) + } + _ => panic() + } - array310.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted129 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::FixedListValue(array310) - } - 20 => { + let result128 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let array312 : Array[@types.MapEntry] = []; - for index313 = 0; index313 < (mbt_ffi_load32((iter_base) + 12)); index313 = index313 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index313 * 8) + Option::Some(result128) + } + _ => panic() + } - array312.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + Option::Some(@types.NumericRestrictions::{min : lifted125, max : lifted127, unit : lifted129}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array312) + @types.SchemaTypeBody::U64Type(lifted130) } - 21 => { + 10 => { - let lifted314 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted137 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let lifted132 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::OptionValue(lifted314) - } - 22 => { + let lifted131 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted317 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted315 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + Option::Some(lifted131) + } + _ => panic() + } + + let lifted134 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) + let lifted133 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted133) } _ => panic() } - @types.ResultValuePayload::OkValue(lifted315) - } - 1 => { - - let lifted316 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted136 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) + let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result135) } _ => panic() } - @types.ResultValuePayload::ErrValue(lifted316) + Option::Some(@types.NumericRestrictions::{min : lifted132, max : lifted134, unit : lifted136}) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted317) + @types.SchemaTypeBody::F32Type(lifted137) } - 23 => { - - let result318 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + 11 => { - let lifted320 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted144 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result319 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - - Option::Some(result319) - } - _ => panic() - } + let lifted139 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result318, language : lifted320}) - } - 24 => { + let lifted138 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result321 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted323 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result322 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result322) - } - _ => panic() - } + Option::Some(lifted138) + } + _ => panic() + } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result321, mime_type : lifted323}) - } - 25 => { + let lifted141 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result324 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted140 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaValueNode::PathValue(result324) - } - 26 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::UrlValue(result325) - } - 27 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) - } - 28 => { + Option::Some(lifted140) + } + _ => panic() + } - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) - } - 29 => { + let lifted143 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result326 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result326}) - } - 30 => { + Option::Some(result142) + } + _ => panic() + } - let result327 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(@types.NumericRestrictions::{min : lifted139, max : lifted141, unit : lifted143}) + } + _ => panic() + } - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result327, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaTypeBody::F64Type(lifted144) } - 31 => { - - let result328 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + 12 => { - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result328}) + @types.SchemaTypeBody::CharType } - 32 => { + 13 => { - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) + @types.SchemaTypeBody::StringType } - _ => panic() - } + 14 => { - array330.push(lifted329) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) + let array158 : Array[@types.NamedFieldType] = []; + for index159 = 0; index159 < (mbt_ffi_load32((iter_base) + 12)); index159 = index159 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index159 * 68) - @common.AgentError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array293, defs : array298, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array330, root : mbt_ffi_load32((return_area) + 40)}}) - } - _ => panic() - } + let result145 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Result::Err(lifted332) - } - _ => panic() - } - let ret = lifted333 - mbt_ffi_free(ptr) - mbt_ffi_free(return_area) - return ret + let lifted147 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { -} -///| -/// Creates a webhook that can be used to integrate with webhook driven apis. -/// When the created url is called with a post request, the provided promise-id is completed with the body of the post request. -/// Note the following behaviours: -/// * Only agents whoose agent types are _currently_ deployed via an http api are allowed to create a webhook. Calling this function while the agent -/// is not deployed via an http api will trap. -/// * Only the agent type that created the promise is allowed to create a webhook for it. Using this host function -/// from a different agent type will trap. -pub fn create_webhook(promise_id : @types.PromiseId) -> String { + let result146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let ptr = mbt_ffi_str2ptr(((promise_id).agent_id).agent_id) - let return_area = mbt_ffi_malloc(8) - wasmImportCreateWebhook((((((promise_id).agent_id).component_id).uuid).high_bits).reinterpret_as_int64(), (((((promise_id).agent_id).component_id).uuid).low_bits).reinterpret_as_int64(), ptr, ((promise_id).agent_id).agent_id.length(), ((promise_id).oplog_idx).reinterpret_as_int64(), return_area); + Option::Some(result146) + } + _ => panic() + } - let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 0), mbt_ffi_load32((return_area) + 4)) - let ret = result - mbt_ffi_free(ptr) - mbt_ffi_free(return_area) - return ret + let array : Array[String] = []; + for index149 = 0; index149 < (mbt_ffi_load32((iter_base) + 28)); index149 = index149 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index149 * 8) -} -///| -/// Constructs the RPC client connecting to the given target agent. -/// -/// `constructor` is a value tree whose root encodes the target agent -/// constructor's parameter list. -pub fn WasmRpc::wasm_rpc(agent_type_name : String, constructor_ : @types.SchemaValueTree, phantom_id : @types.Uuid?, agent_config : Array[@common.TypedAgentConfigValue]) -> WasmRpc { - let cleanup_list : Array[Int] = [] + let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let ptr = mbt_ffi_str2ptr(agent_type_name) + array.push(result148) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let address66 = mbt_ffi_malloc(((constructor_).value_nodes).length() * 32); - for index67 = 0; index67 < ((constructor_).value_nodes).length(); index67 = index67 + 1 { - let iter_elem : @types.SchemaValueNode = ((constructor_).value_nodes)[(index67)] - let iter_base = address66 + (index67 * 32); + let array151 : Array[String] = []; + for index152 = 0; index152 < (mbt_ffi_load32((iter_base) + 36)); index152 = index152 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index152 * 8) - match iter_elem { - BoolValue(payload) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) + let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - S8Value(payload0) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) + array151.push(result150) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - () - } - S16Value(payload1) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) + let lifted154 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - S32Value(payload2) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload2) + let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - () - } - S64Value(payload3) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload3) + Option::Some(result153) + } + _ => panic() + } - () - } - U8Value(payload4) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) + let lifted157 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { - () - } - U16Value(payload5) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) + let lifted156 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { - () - } - U32Value(payload6) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) + @types.Role::Multimodal + } + 1 => { - () - } - U64Value(payload7) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) + @types.Role::UnstructuredText + } + 2 => { - () - } - F32Value(payload8) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload8) + @types.Role::UnstructuredBinary + } + 3 => { - () - } - F64Value(payload9) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload9) + let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - () - } - CharValue(payload10) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) + @types.Role::Other(result155) + } + _ => panic() + } - () - } - StringValue(payload11) => { - mbt_ffi_store8((iter_base) + 0, (12)) + Option::Some(lifted156) + } + _ => panic() + } - let ptr12 = mbt_ffi_str2ptr(payload11) - mbt_ffi_store32((iter_base) + 12, payload11.length()) - mbt_ffi_store32((iter_base) + 8, ptr12) - cleanup_list.push(ptr12) + array158.push(@types.NamedFieldType::{name : result145, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted147, aliases : array, examples : array151, deprecated : lifted154, role : lifted157}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - RecordValue(payload13) => { - mbt_ffi_store8((iter_base) + 0, (13)) + @types.SchemaTypeBody::RecordType(array158) + } + 15 => { - let address = mbt_ffi_malloc((payload13).length() * 4); - for index = 0; index < (payload13).length(); index = index + 1 { - let iter_elem : Int = (payload13)[(index)] - let iter_base = address + (index * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let array175 : Array[@types.VariantCaseType] = []; + for index176 = 0; index176 < (mbt_ffi_load32((iter_base) + 12)); index176 = index176 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index176 * 72) - } - mbt_ffi_store32((iter_base) + 12, (payload13).length()) - mbt_ffi_store32((iter_base) + 8, address) - cleanup_list.push(address) + let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - VariantValue(payload14) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) + let lifted161 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - match ((payload14).payload) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - () - } - Some(payload16) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload16) + let lifted163 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - } + let result162 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - () - } - EnumValue(payload17) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) + Option::Some(result162) + } + _ => panic() + } - () - } - FlagsValue(payload18) => { - mbt_ffi_store8((iter_base) + 0, (16)) + let array165 : Array[String] = []; + for index166 = 0; index166 < (mbt_ffi_load32((iter_base) + 32)); index166 = index166 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index166 * 8) - let address19 = mbt_ffi_malloc((payload18).length() * 1); - for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { - let iter_elem : Bool = (payload18)[(index20)] - let iter_base = address19 + (index20 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + let result164 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - } - mbt_ffi_store32((iter_base) + 12, (payload18).length()) - mbt_ffi_store32((iter_base) + 8, address19) - cleanup_list.push(address19) + array165.push(result164) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - () - } - TupleValue(payload21) => { - mbt_ffi_store8((iter_base) + 0, (17)) + let array168 : Array[String] = []; + for index169 = 0; index169 < (mbt_ffi_load32((iter_base) + 40)); index169 = index169 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index169 * 8) - let address22 = mbt_ffi_malloc((payload21).length() * 4); - for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { - let iter_elem : Int = (payload21)[(index23)] - let iter_base = address22 + (index23 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let result167 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - } - mbt_ffi_store32((iter_base) + 12, (payload21).length()) - mbt_ffi_store32((iter_base) + 8, address22) - cleanup_list.push(address22) + array168.push(result167) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - () - } - ListValue(payload24) => { - mbt_ffi_store8((iter_base) + 0, (18)) + let lifted171 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - let address25 = mbt_ffi_malloc((payload24).length() * 4); - for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { - let iter_elem : Int = (payload24)[(index26)] - let iter_base = address25 + (index26 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - } - mbt_ffi_store32((iter_base) + 12, (payload24).length()) - mbt_ffi_store32((iter_base) + 8, address25) - cleanup_list.push(address25) + Option::Some(result170) + } + _ => panic() + } - () - } - FixedListValue(payload27) => { - mbt_ffi_store8((iter_base) + 0, (19)) + let lifted174 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let address28 = mbt_ffi_malloc((payload27).length() * 4); - for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { - let iter_elem : Int = (payload27)[(index29)] - let iter_base = address28 + (index29 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted173 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - } - mbt_ffi_store32((iter_base) + 12, (payload27).length()) - mbt_ffi_store32((iter_base) + 8, address28) - cleanup_list.push(address28) + @types.Role::Multimodal + } + 1 => { - () - } - MapValue(payload30) => { - mbt_ffi_store8((iter_base) + 0, (20)) + @types.Role::UnstructuredText + } + 2 => { - let address31 = mbt_ffi_malloc((payload30).length() * 8); - for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { - let iter_elem : @types.MapEntry = (payload30)[(index32)] - let iter_base = address31 + (index32 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + @types.Role::UnstructuredBinary + } + 3 => { - } - mbt_ffi_store32((iter_base) + 12, (payload30).length()) - mbt_ffi_store32((iter_base) + 8, address31) - cleanup_list.push(address31) + let result172 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - () - } - OptionValue(payload33) => { - mbt_ffi_store8((iter_base) + 0, (21)) + @types.Role::Other(result172) + } + _ => panic() + } - match (payload33) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + Option::Some(lifted173) + } + _ => panic() + } - () - } - Some(payload35) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload35) + array175.push(@types.VariantCaseType::{name : result160, payload : lifted161, metadata : @types.MetadataEnvelope::{doc : lifted163, aliases : array165, examples : array168, deprecated : lifted171, role : lifted174}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - } + @types.SchemaTypeBody::VariantType(array175) + } + 16 => { - () - } - ResultValue(payload36) => { - mbt_ffi_store8((iter_base) + 0, (22)) + let array178 : Array[String] = []; + for index179 = 0; index179 < (mbt_ffi_load32((iter_base) + 12)); index179 = index179 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index179 * 8) - match payload36 { - OkValue(payload37) => { - mbt_ffi_store8((iter_base) + 8, (0)) + let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - match (payload37) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + array178.push(result177) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () + @types.SchemaTypeBody::EnumType(array178) } - Some(payload39) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload39) + 17 => { - () - } - } + let array181 : Array[String] = []; + for index182 = 0; index182 < (mbt_ffi_load32((iter_base) + 12)); index182 = index182 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index182 * 8) - () - } - ErrValue(payload40) => { - mbt_ffi_store8((iter_base) + 8, (1)) + let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - match (payload40) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + array181.push(result180) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () + @types.SchemaTypeBody::FlagsType(array181) } - Some(payload42) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload42) + 18 => { - () - } - } + let array183 : Array[Int] = []; + for index184 = 0; index184 < (mbt_ffi_load32((iter_base) + 12)); index184 = index184 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index184 * 4) - () - } - } + array183.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - TextValue(payload43) => { - mbt_ffi_store8((iter_base) + 0, (23)) + @types.SchemaTypeBody::TupleType(array183) + } + 19 => { - let ptr44 = mbt_ffi_str2ptr((payload43).text) - mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr44) + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { - match ((payload43).language) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { - () - } - Some(payload46) => { - mbt_ffi_store8((iter_base) + 16, (1)) + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { - let ptr47 = mbt_ffi_str2ptr(payload46) - mbt_ffi_store32((iter_base) + 24, payload46.length()) - mbt_ffi_store32((iter_base) + 20, ptr47) - cleanup_list.push(ptr47) + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { - () - } - } - cleanup_list.push(ptr44) + let lifted185 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - BinaryValue(payload48) => { - mbt_ffi_store8((iter_base) + 0, (24)) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) + let lifted186 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr49) - - match ((payload48).mime_type) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } - () - } - Some(payload51) => { - mbt_ffi_store8((iter_base) + 16, (1)) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted185, err : lifted186}) + } + 24 => { - let ptr52 = mbt_ffi_str2ptr(payload51) - mbt_ffi_store32((iter_base) + 24, payload51.length()) - mbt_ffi_store32((iter_base) + 20, ptr52) - cleanup_list.push(ptr52) + let lifted190 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - } - cleanup_list.push(ptr49) + let array188 : Array[String] = []; + for index189 = 0; index189 < (mbt_ffi_load32((iter_base) + 16)); index189 = index189 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index189 * 8) - () - } - PathValue(payload53) => { - mbt_ffi_store8((iter_base) + 0, (25)) + let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let ptr54 = mbt_ffi_str2ptr(payload53) - mbt_ffi_store32((iter_base) + 12, payload53.length()) - mbt_ffi_store32((iter_base) + 8, ptr54) - cleanup_list.push(ptr54) + array188.push(result187) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - () - } - UrlValue(payload55) => { - mbt_ffi_store8((iter_base) + 0, (26)) + Option::Some(array188) + } + _ => panic() + } - let ptr56 = mbt_ffi_str2ptr(payload55) - mbt_ffi_store32((iter_base) + 12, payload55.length()) - mbt_ffi_store32((iter_base) + 8, ptr56) - cleanup_list.push(ptr56) + let lifted191 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - () - } - DatetimeValue(payload57) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload57).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } - () - } - DurationValue(payload58) => { - mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) + let lifted192 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - () - } - QuantityValueNode(payload59) => { - mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload59).scale) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } - let ptr60 = mbt_ffi_str2ptr((payload59).unit) - mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr60) - cleanup_list.push(ptr60) + let lifted194 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - () - } - UnionValue(payload61) => { - mbt_ffi_store8((iter_base) + 0, (30)) + let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let ptr62 = mbt_ffi_str2ptr((payload61).tag) - mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr62) - mbt_ffi_store32((iter_base) + 16, (payload61).body) - cleanup_list.push(ptr62) + Option::Some(result193) + } + _ => panic() + } - () - } - SecretValue(payload63) => { - mbt_ffi_store8((iter_base) + 0, (31)) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted190, min_length : lifted191, max_length : lifted192, regex : lifted194}) + } + 25 => { - let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr64) - cleanup_list.push(ptr64) + let lifted198 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - QuotaTokenHandle(payload65) => { - mbt_ffi_store8((iter_base) + 0, (32)) + let array196 : Array[String] = []; + for index197 = 0; index197 < (mbt_ffi_load32((iter_base) + 16)); index197 = index197 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index197 * 8) - let @types.QuotaToken(handle) = payload65 - mbt_ffi_store32((iter_base) + 8, handle) + let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - } + array196.push(result195) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - } + Option::Some(array196) + } + _ => panic() + } - let (lowered, lowered70, lowered71) = match (phantom_id) { - None => { + let lifted199 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - ((0), 0L, 0L) - } - Some(payload69) => { + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } - ((1), ((payload69).high_bits).reinterpret_as_int64(), ((payload69).low_bits).reinterpret_as_int64()) - } - } + let lifted200 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - let address366 = mbt_ffi_malloc((agent_config).length() * 40); - for index367 = 0; index367 < (agent_config).length(); index367 = index367 + 1 { - let iter_elem : @common.TypedAgentConfigValue = (agent_config)[(index367)] - let iter_base = address366 + (index367 * 40); + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } - let address73 = mbt_ffi_malloc(((iter_elem).path).length() * 8); - for index74 = 0; index74 < ((iter_elem).path).length(); index74 = index74 + 1 { - let iter_elem : String = ((iter_elem).path)[(index74)] - let iter_base = address73 + (index74 * 8); + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted198, min_bytes : lifted199, max_bytes : lifted200}) + } + 26 => { - let ptr72 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr72) - cleanup_list.push(ptr72) + let lifted204 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 4, ((iter_elem).path).length()) - mbt_ffi_store32((iter_base) + 0, address73) + let array202 : Array[String] = []; + for index203 = 0; index203 < (mbt_ffi_load32((iter_base) + 20)); index203 = index203 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index203 * 8) - let address286 = mbt_ffi_malloc(((((iter_elem).value).graph).type_nodes).length() * 144); - for index287 = 0; index287 < ((((iter_elem).value).graph).type_nodes).length(); index287 = index287 + 1 { - let iter_elem : @types.SchemaTypeNode = ((((iter_elem).value).graph).type_nodes)[(index287)] - let iter_base = address286 + (index287 * 144); + let result201 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - match (iter_elem).body { - RefType(payload75) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store32((iter_base) + 8, payload75) + array202.push(result201) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - () - } - BoolType => { - mbt_ffi_store8((iter_base) + 0, (1)) + Option::Some(array202) + } + _ => panic() + } - () - } - S8Type => { - mbt_ffi_store8((iter_base) + 0, (2)) + let lifted208 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - () - } - S16Type => { - mbt_ffi_store8((iter_base) + 0, (3)) + let array206 : Array[String] = []; + for index207 = 0; index207 < (mbt_ffi_load32((iter_base) + 32)); index207 = index207 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index207 * 8) - () - } - S32Type => { - mbt_ffi_store8((iter_base) + 0, (4)) + let result205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - S64Type => { - mbt_ffi_store8((iter_base) + 0, (5)) + array206.push(result205) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - () - } - U8Type => { - mbt_ffi_store8((iter_base) + 0, (6)) + Option::Some(array206) + } + _ => panic() + } - () - } - U16Type => { - mbt_ffi_store8((iter_base) + 0, (7)) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted204, allowed_extensions : lifted208}) + } + 27 => { - () - } - U32Type => { - mbt_ffi_store8((iter_base) + 0, (8)) + let lifted212 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - U64Type => { - mbt_ffi_store8((iter_base) + 0, (9)) + let array210 : Array[String] = []; + for index211 = 0; index211 < (mbt_ffi_load32((iter_base) + 16)); index211 = index211 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index211 * 8) - () - } - F32Type => { - mbt_ffi_store8((iter_base) + 0, (10)) + let result209 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - F64Type => { - mbt_ffi_store8((iter_base) + 0, (11)) + array210.push(result209) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - () - } - CharType => { - mbt_ffi_store8((iter_base) + 0, (12)) + Option::Some(array210) + } + _ => panic() + } - () - } - StringType => { - mbt_ffi_store8((iter_base) + 0, (13)) + let lifted216 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - () - } - RecordType(payload89) => { - mbt_ffi_store8((iter_base) + 0, (14)) + let array214 : Array[String] = []; + for index215 = 0; index215 < (mbt_ffi_load32((iter_base) + 28)); index215 = index215 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index215 * 8) - let address110 = mbt_ffi_malloc((payload89).length() * 68); - for index111 = 0; index111 < (payload89).length(); index111 = index111 + 1 { - let iter_elem : @types.NamedFieldType = (payload89)[(index111)] - let iter_base = address110 + (index111 * 68); + let result213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let ptr90 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr90) - mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + array214.push(result213) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + Option::Some(array214) + } + _ => panic() + } - () + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted212, allowed_hosts : lifted216}) } - Some(payload92) => { - mbt_ffi_store8((iter_base) + 12, (1)) + 28 => { - let ptr93 = mbt_ffi_str2ptr(payload92) - mbt_ffi_store32((iter_base) + 20, payload92.length()) - mbt_ffi_store32((iter_base) + 16, ptr93) - cleanup_list.push(ptr93) + @types.SchemaTypeBody::DatetimeType + } + 29 => { - () + @types.SchemaTypeBody::DurationType } - } + 30 => { - let address95 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index96 = 0; index96 < (((iter_elem).metadata).aliases).length(); index96 = index96 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index96)] - let iter_base = address95 + (index96 * 8); + let result217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let ptr94 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr94) - cleanup_list.push(ptr94) + let array219 : Array[String] = []; + for index220 = 0; index220 < (mbt_ffi_load32((iter_base) + 20)); index220 = index220 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index220 * 8) - } - mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 24, address95) + let result218 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let address98 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index99 = 0; index99 < (((iter_elem).metadata).examples).length(); index99 = index99 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index99)] - let iter_base = address98 + (index99 * 8); + array219.push(result218) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let ptr97 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr97) - cleanup_list.push(ptr97) + let lifted222 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 32, address98) + let result221 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 40, (0)) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result221}) + } + _ => panic() + } - () - } - Some(payload101) => { - mbt_ffi_store8((iter_base) + 40, (1)) + let lifted224 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let ptr102 = mbt_ffi_str2ptr(payload101) - mbt_ffi_store32((iter_base) + 48, payload101.length()) - mbt_ffi_store32((iter_base) + 44, ptr102) - cleanup_list.push(ptr102) + let result223 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - () + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result223}) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result217, allowed_suffixes : array219, min : lifted222, max : lifted224}) } - } + 31 => { - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 52, (0)) + let array248 : Array[@types.UnionBranch] = []; + for index249 = 0; index249 < (mbt_ffi_load32((iter_base) + 12)); index249 = index249 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index249 * 92) - () - } - Some(payload104) => { - mbt_ffi_store8((iter_base) + 52, (1)) + let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - match payload104 { - Multimodal => { - mbt_ffi_store8((iter_base) + 56, (0)) + let lifted234 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { - () + let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Prefix(result226) + } + 1 => { + + let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Suffix(result227) + } + 2 => { + + let result228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Contains(result228) + } + 3 => { + + let result229 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Regex(result229) + } + 4 => { + + let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + let lifted232 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + + Option::Some(result231) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result230, literal : lifted232}) + } + 5 => { + + let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::FieldAbsent(result233) + } + _ => panic() } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 56, (1)) - () + let lifted236 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result235) + } + _ => panic() } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 56, (2)) - () + let array238 : Array[String] = []; + for index239 = 0; index239 < (mbt_ffi_load32((iter_base) + 52)); index239 = index239 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index239 * 8) + + let result237 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array238.push(result237) } - Other(payload108) => { - mbt_ffi_store8((iter_base) + 56, (3)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let ptr109 = mbt_ffi_str2ptr(payload108) - mbt_ffi_store32((iter_base) + 64, payload108.length()) - mbt_ffi_store32((iter_base) + 60, ptr109) - cleanup_list.push(ptr109) + let array241 : Array[String] = []; + for index242 = 0; index242 < (mbt_ffi_load32((iter_base) + 60)); index242 = index242 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index242 * 8) - () + let result240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array241.push(result240) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + + let lifted244 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result243) + } + _ => panic() + } + + let lifted247 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { + + let lifted246 = match (mbt_ffi_load8_u((iter_base) + 80)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result245 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + + @types.Role::Other(result245) + } + _ => panic() + } + + Option::Some(lifted246) + } + _ => panic() } + + array248.push(@types.UnionBranch::{tag : result225, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted234, metadata : @types.MetadataEnvelope::{doc : lifted236, aliases : array238, examples : array241, deprecated : lifted244, role : lifted247}}) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array248}) } - } - cleanup_list.push(ptr90) - cleanup_list.push(address95) - cleanup_list.push(address98) + 32 => { - } - mbt_ffi_store32((iter_base) + 12, (payload89).length()) - mbt_ffi_store32((iter_base) + 8, address110) - cleanup_list.push(address110) + let lifted251 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - VariantType(payload112) => { - mbt_ffi_store8((iter_base) + 0, (15)) + let result250 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result250) + } + _ => panic() + } - let address135 = mbt_ffi_malloc((payload112).length() * 72); - for index136 = 0; index136 < (payload112).length(); index136 = index136 + 1 { - let iter_elem : @types.VariantCaseType = (payload112)[(index136)] - let iter_base = address135 + (index136 * 72); + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted251}) + } + 33 => { - let ptr113 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr113) + let lifted253 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - match ((iter_elem).payload) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let result252 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - () - } - Some(payload115) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload115) + Option::Some(result252) + } + _ => panic() + } - () + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted253}) } - } + 34 => { - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + let lifted254 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::FutureType(lifted254) } - Some(payload117) => { - mbt_ffi_store8((iter_base) + 16, (1)) + 35 => { - let ptr118 = mbt_ffi_str2ptr(payload117) - mbt_ffi_store32((iter_base) + 24, payload117.length()) - mbt_ffi_store32((iter_base) + 20, ptr118) - cleanup_list.push(ptr118) + let lifted255 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::StreamType(lifted255) } + _ => panic() } - let address120 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index121 = 0; index121 < (((iter_elem).metadata).aliases).length(); index121 = index121 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index121)] - let iter_base = address120 + (index121 * 8); + let lifted258 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + 0 => Option::None + 1 => { - let ptr119 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr119) - cleanup_list.push(ptr119) + let result257 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + Option::Some(result257) + } + _ => panic() } - mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 28, address120) - let address123 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index124 = 0; index124 < (((iter_elem).metadata).examples).length(); index124 = index124 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index124)] - let iter_base = address123 + (index124 * 8); + let array260 : Array[String] = []; + for index261 = 0; index261 < (mbt_ffi_load32((iter_base) + 104)); index261 = index261 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index261 * 8) - let ptr122 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr122) - cleanup_list.push(ptr122) + let result259 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + array260.push(result259) } - mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 36, address123) - - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 44, (0)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - () - } - Some(payload126) => { - mbt_ffi_store8((iter_base) + 44, (1)) + let array263 : Array[String] = []; + for index264 = 0; index264 < (mbt_ffi_load32((iter_base) + 112)); index264 = index264 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index264 * 8) - let ptr127 = mbt_ffi_str2ptr(payload126) - mbt_ffi_store32((iter_base) + 52, payload126.length()) - mbt_ffi_store32((iter_base) + 48, ptr127) - cleanup_list.push(ptr127) + let result262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } + array263.push(result262) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 56, (0)) + let lifted266 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { - () + let result265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + + Option::Some(result265) } - Some(payload129) => { - mbt_ffi_store8((iter_base) + 56, (1)) + _ => panic() + } - match payload129 { - Multimodal => { - mbt_ffi_store8((iter_base) + 60, (0)) + let lifted269 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { - () + let lifted268 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { + + @types.Role::Multimodal } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 60, (1)) + 1 => { - () + @types.Role::UnstructuredText } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 60, (2)) + 2 => { - () + @types.Role::UnstructuredBinary } - Other(payload133) => { - mbt_ffi_store8((iter_base) + 60, (3)) + 3 => { - let ptr134 = mbt_ffi_str2ptr(payload133) - mbt_ffi_store32((iter_base) + 68, payload133.length()) - mbt_ffi_store32((iter_base) + 64, ptr134) - cleanup_list.push(ptr134) + let result267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - () + @types.Role::Other(result267) } + _ => panic() } - () + Option::Some(lifted268) } + _ => panic() } - cleanup_list.push(ptr113) - cleanup_list.push(address120) - cleanup_list.push(address123) + array270.push(@types.SchemaTypeNode::{body : lifted256, metadata : @types.MetadataEnvelope::{doc : lifted258, aliases : array260, examples : array263, deprecated : lifted266, role : lifted269}}) } - mbt_ffi_store32((iter_base) + 12, (payload112).length()) - mbt_ffi_store32((iter_base) + 8, address135) - cleanup_list.push(address135) - - () - } - EnumType(payload137) => { - mbt_ffi_store8((iter_base) + 0, (16)) - - let address139 = mbt_ffi_malloc((payload137).length() * 8); - for index140 = 0; index140 < (payload137).length(); index140 = index140 + 1 { - let iter_elem : String = (payload137)[(index140)] - let iter_base = address139 + (index140 * 8); + mbt_ffi_free(mbt_ffi_load32((return_area) + 8)) - let ptr138 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr138) - cleanup_list.push(ptr138) + let array275 : Array[@types.SchemaTypeDef] = []; + for index276 = 0; index276 < (mbt_ffi_load32((return_area) + 20)); index276 = index276 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index276 * 24) - } - mbt_ffi_store32((iter_base) + 12, (payload137).length()) - mbt_ffi_store32((iter_base) + 8, address139) - cleanup_list.push(address139) + let result272 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - FlagsType(payload141) => { - mbt_ffi_store8((iter_base) + 0, (17)) + let lifted274 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let address143 = mbt_ffi_malloc((payload141).length() * 8); - for index144 = 0; index144 < (payload141).length(); index144 = index144 + 1 { - let iter_elem : String = (payload141)[(index144)] - let iter_base = address143 + (index144 * 8); + let result273 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - let ptr142 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr142) - cleanup_list.push(ptr142) + Option::Some(result273) + } + _ => panic() + } + array275.push(@types.SchemaTypeDef::{id : result272, name : lifted274, body : mbt_ffi_load32((iter_base) + 20)}) } - mbt_ffi_store32((iter_base) + 12, (payload141).length()) - mbt_ffi_store32((iter_base) + 8, address143) - cleanup_list.push(address143) + mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) - () - } - TupleType(payload145) => { - mbt_ffi_store8((iter_base) + 0, (18)) + let array307 : Array[@types.SchemaValueNode] = []; + for index308 = 0; index308 < (mbt_ffi_load32((return_area) + 32)); index308 = index308 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 28)) + (index308 * 32) - let address146 = mbt_ffi_malloc((payload145).length() * 4); - for index147 = 0; index147 < (payload145).length(); index147 = index147 + 1 { - let iter_elem : Int = (payload145)[(index147)] - let iter_base = address146 + (index147 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted306 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - } - mbt_ffi_store32((iter_base) + 12, (payload145).length()) - mbt_ffi_store32((iter_base) + 8, address146) - cleanup_list.push(address146) + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) + } + 1 => { - () - } - ListType(payload148) => { - mbt_ffi_store8((iter_base) + 0, (19)) - mbt_ffi_store32((iter_base) + 8, payload148) + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { - () - } - FixedListType(payload149) => { - mbt_ffi_store8((iter_base) + 0, (20)) - mbt_ffi_store32((iter_base) + 8, (payload149).element) - mbt_ffi_store32((iter_base) + 12, ((payload149).length).reinterpret_as_int()) - - () - } - MapType(payload150) => { - mbt_ffi_store8((iter_base) + 0, (21)) - mbt_ffi_store32((iter_base) + 8, (payload150).key) - mbt_ffi_store32((iter_base) + 12, (payload150).value) + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { - () - } - OptionType(payload151) => { - mbt_ffi_store8((iter_base) + 0, (22)) - mbt_ffi_store32((iter_base) + 8, payload151) + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { - () - } - ResultType(payload152) => { - mbt_ffi_store8((iter_base) + 0, (23)) + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { - match ((payload152).ok) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { - () - } - Some(payload154) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload154) + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { - () - } - } + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { - match ((payload152).err) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { - () - } - Some(payload156) => { - mbt_ffi_store8((iter_base) + 16, (1)) - mbt_ffi_store32((iter_base) + 20, payload156) + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { - () - } - } + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { - () - } - TextType(payload157) => { - mbt_ffi_store8((iter_base) + 0, (24)) + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { - match ((payload157).languages) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let result277 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - () - } - Some(payload159) => { - mbt_ffi_store8((iter_base) + 8, (1)) + @types.SchemaValueNode::StringValue(result277) + } + 13 => { - let address161 = mbt_ffi_malloc((payload159).length() * 8); - for index162 = 0; index162 < (payload159).length(); index162 = index162 + 1 { - let iter_elem : String = (payload159)[(index162)] - let iter_base = address161 + (index162 * 8); + let array278 : Array[Int] = []; + for index279 = 0; index279 < (mbt_ffi_load32((iter_base) + 12)); index279 = index279 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index279 * 4) - let ptr160 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr160) - cleanup_list.push(ptr160) + array278.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaValueNode::RecordValue(array278) } - mbt_ffi_store32((iter_base) + 16, (payload159).length()) - mbt_ffi_store32((iter_base) + 12, address161) - cleanup_list.push(address161) - - () - } - } + 14 => { - match ((payload157).min_length) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + let lifted280 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - () - } - Some(payload164) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload164).reinterpret_as_int()) + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - () - } - } + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted280}) + } + 15 => { - match ((payload157).max_length) { - None => { - mbt_ffi_store8((iter_base) + 28, (0)) + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { - () - } - Some(payload166) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload166).reinterpret_as_int()) + let array281 : Array[Bool] = []; + for index282 = 0; index282 < (mbt_ffi_load32((iter_base) + 12)); index282 = index282 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index282 * 1) - () - } - } + array281.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - match ((payload157).regex) { - None => { - mbt_ffi_store8((iter_base) + 36, (0)) + @types.SchemaValueNode::FlagsValue(array281) + } + 17 => { - () - } - Some(payload168) => { - mbt_ffi_store8((iter_base) + 36, (1)) + let array283 : Array[Int] = []; + for index284 = 0; index284 < (mbt_ffi_load32((iter_base) + 12)); index284 = index284 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index284 * 4) - let ptr169 = mbt_ffi_str2ptr(payload168) - mbt_ffi_store32((iter_base) + 44, payload168.length()) - mbt_ffi_store32((iter_base) + 40, ptr169) - cleanup_list.push(ptr169) + array283.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - } + @types.SchemaValueNode::TupleValue(array283) + } + 18 => { - () - } - BinaryType(payload170) => { - mbt_ffi_store8((iter_base) + 0, (25)) + let array285 : Array[Int] = []; + for index286 = 0; index286 < (mbt_ffi_load32((iter_base) + 12)); index286 = index286 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index286 * 4) - match ((payload170).mime_types) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + array285.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - Some(payload172) => { - mbt_ffi_store8((iter_base) + 8, (1)) + @types.SchemaValueNode::ListValue(array285) + } + 19 => { - let address174 = mbt_ffi_malloc((payload172).length() * 8); - for index175 = 0; index175 < (payload172).length(); index175 = index175 + 1 { - let iter_elem : String = (payload172)[(index175)] - let iter_base = address174 + (index175 * 8); + let array287 : Array[Int] = []; + for index288 = 0; index288 < (mbt_ffi_load32((iter_base) + 12)); index288 = index288 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index288 * 4) - let ptr173 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr173) - cleanup_list.push(ptr173) + array287.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaValueNode::FixedListValue(array287) } - mbt_ffi_store32((iter_base) + 16, (payload172).length()) - mbt_ffi_store32((iter_base) + 12, address174) - cleanup_list.push(address174) + 20 => { - () - } - } + let array289 : Array[@types.MapEntry] = []; + for index290 = 0; index290 < (mbt_ffi_load32((iter_base) + 12)); index290 = index290 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index290 * 8) - match ((payload170).min_bytes) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + array289.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - Some(payload177) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload177).reinterpret_as_int()) + @types.SchemaValueNode::MapValue(array289) + } + 21 => { - () - } - } + let lifted291 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - match ((payload170).max_bytes) { - None => { - mbt_ffi_store8((iter_base) + 28, (0)) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - () - } - Some(payload179) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload179).reinterpret_as_int()) + @types.SchemaValueNode::OptionValue(lifted291) + } + 22 => { - () - } - } + let lifted294 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { - () - } - PathType(payload180) => { - mbt_ffi_store8((iter_base) + 0, (26)) - mbt_ffi_store8((iter_base) + 8, (payload180).direction.ordinal()) - mbt_ffi_store8((iter_base) + 9, (payload180).kind.ordinal()) + let lifted292 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - match ((payload180).allowed_mime_types) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - () - } - Some(payload182) => { - mbt_ffi_store8((iter_base) + 12, (1)) + @types.ResultValuePayload::OkValue(lifted292) + } + 1 => { - let address184 = mbt_ffi_malloc((payload182).length() * 8); - for index185 = 0; index185 < (payload182).length(); index185 = index185 + 1 { - let iter_elem : String = (payload182)[(index185)] - let iter_base = address184 + (index185 * 8); + let lifted293 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - let ptr183 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr183) - cleanup_list.push(ptr183) + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 20, (payload182).length()) - mbt_ffi_store32((iter_base) + 16, address184) - cleanup_list.push(address184) + @types.ResultValuePayload::ErrValue(lifted293) + } + _ => panic() + } - () - } - } + @types.SchemaValueNode::ResultValue(lifted294) + } + 23 => { - match ((payload180).allowed_extensions) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + let result295 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - () - } - Some(payload187) => { - mbt_ffi_store8((iter_base) + 24, (1)) + let lifted297 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let address189 = mbt_ffi_malloc((payload187).length() * 8); - for index190 = 0; index190 < (payload187).length(); index190 = index190 + 1 { - let iter_elem : String = (payload187)[(index190)] - let iter_base = address189 + (index190 * 8); + let result296 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - let ptr188 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr188) - cleanup_list.push(ptr188) + Option::Some(result296) + } + _ => panic() + } + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result295, language : lifted297}) } - mbt_ffi_store32((iter_base) + 32, (payload187).length()) - mbt_ffi_store32((iter_base) + 28, address189) - cleanup_list.push(address189) + 24 => { - () - } - } + let result298 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - () - } - UrlType(payload191) => { - mbt_ffi_store8((iter_base) + 0, (27)) + let lifted300 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - match ((payload191).allowed_schemes) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let result299 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - () - } - Some(payload193) => { - mbt_ffi_store8((iter_base) + 8, (1)) + Option::Some(result299) + } + _ => panic() + } - let address195 = mbt_ffi_malloc((payload193).length() * 8); - for index196 = 0; index196 < (payload193).length(); index196 = index196 + 1 { - let iter_elem : String = (payload193)[(index196)] - let iter_base = address195 + (index196 * 8); + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result298, mime_type : lifted300}) + } + 25 => { - let ptr194 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr194) - cleanup_list.push(ptr194) + let result301 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.SchemaValueNode::PathValue(result301) } - mbt_ffi_store32((iter_base) + 16, (payload193).length()) - mbt_ffi_store32((iter_base) + 12, address195) - cleanup_list.push(address195) + 26 => { - () - } - } + let result302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - match ((payload191).allowed_hosts) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + @types.SchemaValueNode::UrlValue(result302) + } + 27 => { - () - } - Some(payload198) => { - mbt_ffi_store8((iter_base) + 20, (1)) + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + } + 28 => { - let address200 = mbt_ffi_malloc((payload198).length() * 8); - for index201 = 0; index201 < (payload198).length(); index201 = index201 + 1 { - let iter_elem : String = (payload198)[(index201)] - let iter_base = address200 + (index201 * 8); + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + } + 29 => { - let ptr199 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr199) - cleanup_list.push(ptr199) + let result303 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result303}) } - mbt_ffi_store32((iter_base) + 28, (payload198).length()) - mbt_ffi_store32((iter_base) + 24, address200) - cleanup_list.push(address200) + 30 => { - () - } - } + let result304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - () - } - DatetimeType => { - mbt_ffi_store8((iter_base) + 0, (28)) - - () - } - DurationType => { - mbt_ffi_store8((iter_base) + 0, (29)) - - () - } - QuantityType(payload204) => { - mbt_ffi_store8((iter_base) + 0, (30)) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result304, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { - let ptr205 = mbt_ffi_str2ptr((payload204).base_unit) - mbt_ffi_store32((iter_base) + 12, (payload204).base_unit.length()) - mbt_ffi_store32((iter_base) + 8, ptr205) + let result305 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let address207 = mbt_ffi_malloc(((payload204).allowed_suffixes).length() * 8); - for index208 = 0; index208 < ((payload204).allowed_suffixes).length(); index208 = index208 + 1 { - let iter_elem : String = ((payload204).allowed_suffixes)[(index208)] - let iter_base = address207 + (index208 * 8); + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result305}) + } + 32 => { - let ptr206 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr206) - cleanup_list.push(ptr206) + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) + } + _ => panic() + } + array307.push(lifted306) } - mbt_ffi_store32((iter_base) + 20, ((payload204).allowed_suffixes).length()) - mbt_ffi_store32((iter_base) + 16, address207) - - match ((payload204).min) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_free(mbt_ffi_load32((return_area) + 28)) - () - } - Some(payload210) => { - mbt_ffi_store8((iter_base) + 24, (1)) - mbt_ffi_store64((iter_base) + 32, (payload210).mantissa) - mbt_ffi_store32((iter_base) + 40, (payload210).scale) + @common.AgentError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array270, defs : array275, root : mbt_ffi_load32((return_area) + 24)}, value : @types.SchemaValueTree::{value_nodes : array307, root : mbt_ffi_load32((return_area) + 36)}}) + } + _ => panic() + } - let ptr211 = mbt_ffi_str2ptr((payload210).unit) - mbt_ffi_store32((iter_base) + 48, (payload210).unit.length()) - mbt_ffi_store32((iter_base) + 44, ptr211) - cleanup_list.push(ptr211) + Result::Err(lifted309) + } + _ => panic() + } + let ret = lifted310 + mbt_ffi_free(ptr) + mbt_ffi_free(address66) + mbt_ffi_free(return_area) - () - } - } + cleanup_list.each(mbt_ffi_free) + return ret - match ((payload204).max) { - None => { - mbt_ffi_store8((iter_base) + 56, (0)) +} +///| +/// Parses an agent-id (created by `make-agent-id`) into an agent type name and its constructor parameters +/// and an optional phantom ID. +/// +/// The constructor parameters are returned as a self-contained typed value +/// (graph + value tree) so the receiver can interpret them without an +/// external schema registry. +pub fn parse_agent_id(agent_id : String) -> Result[(String, @types.TypedSchemaValue, @types.Uuid?), @common.AgentError] { - () - } - Some(payload213) => { - mbt_ffi_store8((iter_base) + 56, (1)) - mbt_ffi_store64((iter_base) + 64, (payload213).mantissa) - mbt_ffi_store32((iter_base) + 72, (payload213).scale) + let ptr = mbt_ffi_str2ptr(agent_id) + let return_area = mbt_ffi_malloc(72) + wasmImportParseAgentId(ptr, agent_id.length(), return_area); - let ptr214 = mbt_ffi_str2ptr((payload213).unit) - mbt_ffi_store32((iter_base) + 80, (payload213).unit.length()) - mbt_ffi_store32((iter_base) + 76, ptr214) - cleanup_list.push(ptr214) + let lifted473 = match (mbt_ffi_load8_u((return_area) + 0)) { + 0 => { - () - } - } - cleanup_list.push(ptr205) - cleanup_list.push(address207) + let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - () - } - UnionType(payload215) => { - mbt_ffi_store8((iter_base) + 0, (31)) + let array193 : Array[@types.SchemaTypeNode] = []; + for index194 = 0; index194 < (mbt_ffi_load32((return_area) + 20)); index194 = index194 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index194 * 144) - let address251 = mbt_ffi_malloc(((payload215).branches).length() * 92); - for index252 = 0; index252 < ((payload215).branches).length(); index252 = index252 + 1 { - let iter_elem : @types.UnionBranch = ((payload215).branches)[(index252)] - let iter_base = address251 + (index252 * 92); + let lifted179 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - let ptr216 = mbt_ffi_str2ptr((iter_elem).tag) - mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) - mbt_ffi_store32((iter_base) + 0, ptr216) - mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { - match (iter_elem).discriminator { - Prefix(payload217) => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.SchemaTypeBody::BoolType + } + 2 => { - let ptr218 = mbt_ffi_str2ptr(payload217) - mbt_ffi_store32((iter_base) + 20, payload217.length()) - mbt_ffi_store32((iter_base) + 16, ptr218) - cleanup_list.push(ptr218) + let lifted5 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - Suffix(payload219) => { - mbt_ffi_store8((iter_base) + 12, (1)) + let lifted0 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let ptr220 = mbt_ffi_str2ptr(payload219) - mbt_ffi_store32((iter_base) + 20, payload219.length()) - mbt_ffi_store32((iter_base) + 16, ptr220) - cleanup_list.push(ptr220) + let lifted = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - Contains(payload221) => { - mbt_ffi_store8((iter_base) + 12, (2)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let ptr222 = mbt_ffi_str2ptr(payload221) - mbt_ffi_store32((iter_base) + 20, payload221.length()) - mbt_ffi_store32((iter_base) + 16, ptr222) - cleanup_list.push(ptr222) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - Regex(payload223) => { - mbt_ffi_store8((iter_base) + 12, (3)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let ptr224 = mbt_ffi_str2ptr(payload223) - mbt_ffi_store32((iter_base) + 20, payload223.length()) - mbt_ffi_store32((iter_base) + 16, ptr224) - cleanup_list.push(ptr224) + Option::Some(lifted) + } + _ => panic() + } - () - } - FieldEquals(payload225) => { - mbt_ffi_store8((iter_base) + 12, (4)) + let lifted2 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let ptr226 = mbt_ffi_str2ptr((payload225).field_name) - mbt_ffi_store32((iter_base) + 20, (payload225).field_name.length()) - mbt_ffi_store32((iter_base) + 16, ptr226) + let lifted1 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - match ((payload225).literal) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - Some(payload228) => { - mbt_ffi_store8((iter_base) + 24, (1)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let ptr229 = mbt_ffi_str2ptr(payload228) - mbt_ffi_store32((iter_base) + 32, payload228.length()) - mbt_ffi_store32((iter_base) + 28, ptr229) - cleanup_list.push(ptr229) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () + Option::Some(lifted1) } + _ => panic() } - cleanup_list.push(ptr226) - - () - } - FieldAbsent(payload230) => { - mbt_ffi_store8((iter_base) + 12, (5)) - - let ptr231 = mbt_ffi_str2ptr(payload230) - mbt_ffi_store32((iter_base) + 20, payload230.length()) - mbt_ffi_store32((iter_base) + 16, ptr231) - cleanup_list.push(ptr231) - () - } - } - - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 36, (0)) + let lifted4 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - Some(payload233) => { - mbt_ffi_store8((iter_base) + 36, (1)) + let result3 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let ptr234 = mbt_ffi_str2ptr(payload233) - mbt_ffi_store32((iter_base) + 44, payload233.length()) - mbt_ffi_store32((iter_base) + 40, ptr234) - cleanup_list.push(ptr234) + Option::Some(result3) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{min : lifted0, max : lifted2, unit : lifted4}) } + _ => panic() } - let address236 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index237 = 0; index237 < (((iter_elem).metadata).aliases).length(); index237 = index237 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index237)] - let iter_base = address236 + (index237 * 8); - - let ptr235 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr235) - cleanup_list.push(ptr235) + @types.SchemaTypeBody::S8Type(lifted5) + } + 3 => { - } - mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 48, address236) + let lifted12 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let address239 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index240 = 0; index240 < (((iter_elem).metadata).examples).length(); index240 = index240 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index240)] - let iter_base = address239 + (index240 * 8); + let lifted7 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let ptr238 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr238) - cleanup_list.push(ptr238) + let lifted6 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - } - mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 56, address239) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 64, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - Some(payload242) => { - mbt_ffi_store8((iter_base) + 64, (1)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let ptr243 = mbt_ffi_str2ptr(payload242) - mbt_ffi_store32((iter_base) + 72, payload242.length()) - mbt_ffi_store32((iter_base) + 68, ptr243) - cleanup_list.push(ptr243) + Option::Some(lifted6) + } + _ => panic() + } - () - } - } + let lifted9 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 76, (0)) + let lifted8 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - Some(payload245) => { - mbt_ffi_store8((iter_base) + 76, (1)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - match payload245 { - Multimodal => { - mbt_ffi_store8((iter_base) + 80, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 80, (1)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () + Option::Some(lifted8) } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 80, (2)) + _ => panic() + } - () - } - Other(payload249) => { - mbt_ffi_store8((iter_base) + 80, (3)) + let lifted11 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let ptr250 = mbt_ffi_str2ptr(payload249) - mbt_ffi_store32((iter_base) + 88, payload249.length()) - mbt_ffi_store32((iter_base) + 84, ptr250) - cleanup_list.push(ptr250) + let result10 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () + Option::Some(result10) } + _ => panic() } - () + Option::Some(@types.NumericRestrictions::{min : lifted7, max : lifted9, unit : lifted11}) } + _ => panic() } - cleanup_list.push(ptr216) - cleanup_list.push(address236) - cleanup_list.push(address239) + @types.SchemaTypeBody::S16Type(lifted12) } - mbt_ffi_store32((iter_base) + 12, ((payload215).branches).length()) - mbt_ffi_store32((iter_base) + 8, address251) - cleanup_list.push(address251) + 4 => { - () - } - SecretType(payload253) => { - mbt_ffi_store8((iter_base) + 0, (32)) + let lifted19 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - match ((payload253).category) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted14 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - Some(payload255) => { - mbt_ffi_store8((iter_base) + 8, (1)) + let lifted13 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let ptr256 = mbt_ffi_str2ptr(payload255) - mbt_ffi_store32((iter_base) + 16, payload255.length()) - mbt_ffi_store32((iter_base) + 12, ptr256) - cleanup_list.push(ptr256) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - QuotaTokenType(payload257) => { - mbt_ffi_store8((iter_base) + 0, (33)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - match ((payload257).resource_name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + Option::Some(lifted13) + } + _ => panic() + } - () - } - Some(payload259) => { - mbt_ffi_store8((iter_base) + 8, (1)) + let lifted16 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let ptr260 = mbt_ffi_str2ptr(payload259) - mbt_ffi_store32((iter_base) + 16, payload259.length()) - mbt_ffi_store32((iter_base) + 12, ptr260) - cleanup_list.push(ptr260) + let lifted15 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - FutureType(payload261) => { - mbt_ffi_store8((iter_base) + 0, (34)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - match (payload261) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload263) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload263) + Option::Some(lifted15) + } + _ => panic() + } - () - } - } + let lifted18 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - StreamType(payload264) => { - mbt_ffi_store8((iter_base) + 0, (35)) + let result17 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - match (payload264) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + Option::Some(result17) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{min : lifted14, max : lifted16, unit : lifted18}) + } + _ => panic() } - Some(payload266) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload266) - () - } + @types.SchemaTypeBody::S32Type(lifted19) } + 5 => { - () - } - } - - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 88, (0)) - - () - } - Some(payload268) => { - mbt_ffi_store8((iter_base) + 88, (1)) - - let ptr269 = mbt_ffi_str2ptr(payload268) - mbt_ffi_store32((iter_base) + 96, payload268.length()) - mbt_ffi_store32((iter_base) + 92, ptr269) - cleanup_list.push(ptr269) - - () - } - } + let lifted26 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let address271 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index272 = 0; index272 < (((iter_elem).metadata).aliases).length(); index272 = index272 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index272)] - let iter_base = address271 + (index272 * 8); + let lifted21 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let ptr270 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr270) - cleanup_list.push(ptr270) + let lifted20 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - } - mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 100, address271) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let address274 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index275 = 0; index275 < (((iter_elem).metadata).examples).length(); index275 = index275 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index275)] - let iter_base = address274 + (index275 * 8); + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let ptr273 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr273) - cleanup_list.push(ptr273) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 108, address274) + Option::Some(lifted20) + } + _ => panic() + } - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 116, (0)) + let lifted23 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - Some(payload277) => { - mbt_ffi_store8((iter_base) + 116, (1)) + let lifted22 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let ptr278 = mbt_ffi_str2ptr(payload277) - mbt_ffi_store32((iter_base) + 124, payload277.length()) - mbt_ffi_store32((iter_base) + 120, ptr278) - cleanup_list.push(ptr278) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 128, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload280) => { - mbt_ffi_store8((iter_base) + 128, (1)) + Option::Some(lifted22) + } + _ => panic() + } - match payload280 { - Multimodal => { - mbt_ffi_store8((iter_base) + 132, (0)) + let lifted25 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 132, (1)) + let result24 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 132, (2)) + Option::Some(result24) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{min : lifted21, max : lifted23, unit : lifted25}) + } + _ => panic() } - Other(payload284) => { - mbt_ffi_store8((iter_base) + 132, (3)) - let ptr285 = mbt_ffi_str2ptr(payload284) - mbt_ffi_store32((iter_base) + 140, payload284.length()) - mbt_ffi_store32((iter_base) + 136, ptr285) - cleanup_list.push(ptr285) - - () - } + @types.SchemaTypeBody::S64Type(lifted26) } + 6 => { - () - } - } - cleanup_list.push(address271) - cleanup_list.push(address274) + let lifted33 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, ((((iter_elem).value).graph).type_nodes).length()) - mbt_ffi_store32((iter_base) + 8, address286) + let lifted28 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let address292 = mbt_ffi_malloc(((((iter_elem).value).graph).defs).length() * 24); - for index293 = 0; index293 < ((((iter_elem).value).graph).defs).length(); index293 = index293 + 1 { - let iter_elem : @types.SchemaTypeDef = ((((iter_elem).value).graph).defs)[(index293)] - let iter_base = address292 + (index293 * 24); + let lifted27 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let ptr288 = mbt_ffi_str2ptr((iter_elem).id) - mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) - mbt_ffi_store32((iter_base) + 0, ptr288) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - match ((iter_elem).name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - Some(payload290) => { - mbt_ffi_store8((iter_base) + 8, (1)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let ptr291 = mbt_ffi_str2ptr(payload290) - mbt_ffi_store32((iter_base) + 16, payload290.length()) - mbt_ffi_store32((iter_base) + 12, ptr291) - cleanup_list.push(ptr291) + Option::Some(lifted27) + } + _ => panic() + } - () - } - } - mbt_ffi_store32((iter_base) + 20, (iter_elem).body) - cleanup_list.push(ptr288) + let lifted30 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 20, ((((iter_elem).value).graph).defs).length()) - mbt_ffi_store32((iter_base) + 16, address292) - mbt_ffi_store32((iter_base) + 24, (((iter_elem).value).graph).root) + let lifted29 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let address364 = mbt_ffi_malloc(((((iter_elem).value).value).value_nodes).length() * 32); - for index365 = 0; index365 < ((((iter_elem).value).value).value_nodes).length(); index365 = index365 + 1 { - let iter_elem : @types.SchemaValueNode = ((((iter_elem).value).value).value_nodes)[(index365)] - let iter_base = address364 + (index365 * 32); + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - match iter_elem { - BoolValue(payload294) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload294 { 1 } else { 0 })) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - S8Value(payload295) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload295)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - S16Value(payload296) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload296)) + Option::Some(lifted29) + } + _ => panic() + } - () - } - S32Value(payload297) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload297) + let lifted32 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - S64Value(payload298) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload298) + let result31 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - U8Value(payload299) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload299).to_int()) + Option::Some(result31) + } + _ => panic() + } - () - } - U16Value(payload300) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload300).reinterpret_as_int()) + Option::Some(@types.NumericRestrictions::{min : lifted28, max : lifted30, unit : lifted32}) + } + _ => panic() + } - () - } - U32Value(payload301) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload301).reinterpret_as_int()) + @types.SchemaTypeBody::U8Type(lifted33) + } + 7 => { - () - } - U64Value(payload302) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload302).reinterpret_as_int64()) + let lifted40 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - F32Value(payload303) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload303) + let lifted35 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - F64Value(payload304) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload304) + let lifted34 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - CharValue(payload305) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload305).to_int()) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - StringValue(payload306) => { - mbt_ffi_store8((iter_base) + 0, (12)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let ptr307 = mbt_ffi_str2ptr(payload306) - mbt_ffi_store32((iter_base) + 12, payload306.length()) - mbt_ffi_store32((iter_base) + 8, ptr307) - cleanup_list.push(ptr307) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - RecordValue(payload308) => { - mbt_ffi_store8((iter_base) + 0, (13)) + Option::Some(lifted34) + } + _ => panic() + } - let address309 = mbt_ffi_malloc((payload308).length() * 4); - for index310 = 0; index310 < (payload308).length(); index310 = index310 + 1 { - let iter_elem : Int = (payload308)[(index310)] - let iter_base = address309 + (index310 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted37 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload308).length()) - mbt_ffi_store32((iter_base) + 8, address309) - cleanup_list.push(address309) + let lifted36 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - VariantValue(payload311) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload311).case).reinterpret_as_int()) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - match ((payload311).payload) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - Some(payload313) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload313) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - } + Option::Some(lifted36) + } + _ => panic() + } - () - } - EnumValue(payload314) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload314).reinterpret_as_int()) + let lifted39 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - FlagsValue(payload315) => { - mbt_ffi_store8((iter_base) + 0, (16)) + let result38 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let address316 = mbt_ffi_malloc((payload315).length() * 1); - for index317 = 0; index317 < (payload315).length(); index317 = index317 + 1 { - let iter_elem : Bool = (payload315)[(index317)] - let iter_base = address316 + (index317 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + Option::Some(result38) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted35, max : lifted37, unit : lifted39}) + } + _ => panic() + } + @types.SchemaTypeBody::U16Type(lifted40) } - mbt_ffi_store32((iter_base) + 12, (payload315).length()) - mbt_ffi_store32((iter_base) + 8, address316) - cleanup_list.push(address316) + 8 => { - () - } - TupleValue(payload318) => { - mbt_ffi_store8((iter_base) + 0, (17)) + let lifted47 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let address319 = mbt_ffi_malloc((payload318).length() * 4); - for index320 = 0; index320 < (payload318).length(); index320 = index320 + 1 { - let iter_elem : Int = (payload318)[(index320)] - let iter_base = address319 + (index320 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted42 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload318).length()) - mbt_ffi_store32((iter_base) + 8, address319) - cleanup_list.push(address319) + let lifted41 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - ListValue(payload321) => { - mbt_ffi_store8((iter_base) + 0, (18)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let address322 = mbt_ffi_malloc((payload321).length() * 4); - for index323 = 0; index323 < (payload321).length(); index323 = index323 + 1 { - let iter_elem : Int = (payload321)[(index323)] - let iter_base = address322 + (index323 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - } - mbt_ffi_store32((iter_base) + 12, (payload321).length()) - mbt_ffi_store32((iter_base) + 8, address322) - cleanup_list.push(address322) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - FixedListValue(payload324) => { - mbt_ffi_store8((iter_base) + 0, (19)) + Option::Some(lifted41) + } + _ => panic() + } - let address325 = mbt_ffi_malloc((payload324).length() * 4); - for index326 = 0; index326 < (payload324).length(); index326 = index326 + 1 { - let iter_elem : Int = (payload324)[(index326)] - let iter_base = address325 + (index326 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted44 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload324).length()) - mbt_ffi_store32((iter_base) + 8, address325) - cleanup_list.push(address325) + let lifted43 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - MapValue(payload327) => { - mbt_ffi_store8((iter_base) + 0, (20)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let address328 = mbt_ffi_malloc((payload327).length() * 8); - for index329 = 0; index329 < (payload327).length(); index329 = index329 + 1 { - let iter_elem : @types.MapEntry = (payload327)[(index329)] - let iter_base = address328 + (index329 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - } - mbt_ffi_store32((iter_base) + 12, (payload327).length()) - mbt_ffi_store32((iter_base) + 8, address328) - cleanup_list.push(address328) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - OptionValue(payload330) => { - mbt_ffi_store8((iter_base) + 0, (21)) + Option::Some(lifted43) + } + _ => panic() + } - match (payload330) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted46 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - Some(payload332) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload332) + let result45 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () + Option::Some(result45) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted42, max : lifted44, unit : lifted46}) + } + _ => panic() } - } - () - } - ResultValue(payload333) => { - mbt_ffi_store8((iter_base) + 0, (22)) + @types.SchemaTypeBody::U32Type(lifted47) + } + 9 => { - match payload333 { - OkValue(payload334) => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted54 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - match (payload334) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let lifted49 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - Some(payload336) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload336) + let lifted48 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - ErrValue(payload337) => { - mbt_ffi_store8((iter_base) + 8, (1)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - match (payload337) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () + Option::Some(lifted48) + } + _ => panic() } - Some(payload339) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload339) - () - } - } + let lifted51 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - } + let lifted50 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - TextValue(payload340) => { - mbt_ffi_store8((iter_base) + 0, (23)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let ptr341 = mbt_ffi_str2ptr((payload340).text) - mbt_ffi_store32((iter_base) + 12, (payload340).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr341) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - match ((payload340).language) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload343) => { - mbt_ffi_store8((iter_base) + 16, (1)) + Option::Some(lifted50) + } + _ => panic() + } + + let lifted53 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let ptr344 = mbt_ffi_str2ptr(payload343) - mbt_ffi_store32((iter_base) + 24, payload343.length()) - mbt_ffi_store32((iter_base) + 20, ptr344) - cleanup_list.push(ptr344) + let result52 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () + Option::Some(result52) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted49, max : lifted51, unit : lifted53}) + } + _ => panic() } + + @types.SchemaTypeBody::U64Type(lifted54) } - cleanup_list.push(ptr341) + 10 => { - () - } - BinaryValue(payload345) => { - mbt_ffi_store8((iter_base) + 0, (24)) + let lifted61 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr346 = mbt_ffi_bytes2ptr((payload345).bytes) + let lifted56 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - mbt_ffi_store32((iter_base) + 12, (payload345).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr346) + let lifted55 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - match ((payload345).mime_type) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - Some(payload348) => { - mbt_ffi_store8((iter_base) + 16, (1)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let ptr349 = mbt_ffi_str2ptr(payload348) - mbt_ffi_store32((iter_base) + 24, payload348.length()) - mbt_ffi_store32((iter_base) + 20, ptr349) - cleanup_list.push(ptr349) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - } - cleanup_list.push(ptr346) + Option::Some(lifted55) + } + _ => panic() + } - () - } - PathValue(payload350) => { - mbt_ffi_store8((iter_base) + 0, (25)) + let lifted58 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let ptr351 = mbt_ffi_str2ptr(payload350) - mbt_ffi_store32((iter_base) + 12, payload350.length()) - mbt_ffi_store32((iter_base) + 8, ptr351) - cleanup_list.push(ptr351) + let lifted57 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - UrlValue(payload352) => { - mbt_ffi_store8((iter_base) + 0, (26)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let ptr353 = mbt_ffi_str2ptr(payload352) - mbt_ffi_store32((iter_base) + 12, payload352.length()) - mbt_ffi_store32((iter_base) + 8, ptr353) - cleanup_list.push(ptr353) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - DatetimeValue(payload354) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload354).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload354).nanoseconds).reinterpret_as_int()) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - DurationValue(payload355) => { - mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload355).nanoseconds) + Option::Some(lifted57) + } + _ => panic() + } - () - } - QuantityValueNode(payload356) => { - mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload356).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload356).scale) + let lifted60 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let ptr357 = mbt_ffi_str2ptr((payload356).unit) - mbt_ffi_store32((iter_base) + 24, (payload356).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr357) - cleanup_list.push(ptr357) + let result59 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - UnionValue(payload358) => { - mbt_ffi_store8((iter_base) + 0, (30)) + Option::Some(result59) + } + _ => panic() + } - let ptr359 = mbt_ffi_str2ptr((payload358).tag) - mbt_ffi_store32((iter_base) + 12, (payload358).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr359) - mbt_ffi_store32((iter_base) + 16, (payload358).body) - cleanup_list.push(ptr359) + Option::Some(@types.NumericRestrictions::{min : lifted56, max : lifted58, unit : lifted60}) + } + _ => panic() + } - () - } - SecretValue(payload360) => { - mbt_ffi_store8((iter_base) + 0, (31)) + @types.SchemaTypeBody::F32Type(lifted61) + } + 11 => { - let ptr361 = mbt_ffi_str2ptr((payload360).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload360).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr361) - cleanup_list.push(ptr361) + let lifted68 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - QuotaTokenHandle(payload362) => { - mbt_ffi_store8((iter_base) + 0, (32)) + let lifted63 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let @types.QuotaToken(handle363) = payload362 - mbt_ffi_store32((iter_base) + 8, handle363) + let lifted62 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted62) + } + _ => panic() + } + + let lifted65 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted64 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted64) + } + _ => panic() + } + + let lifted67 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result66 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result66) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted63, max : lifted65, unit : lifted67}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted68) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array81 : Array[@types.NamedFieldType] = []; + for index82 = 0; index82 < (mbt_ffi_load32((iter_base) + 12)); index82 = index82 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index82 * 68) + + let result69 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted71 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result70 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result70) + } + _ => panic() + } + + let array : Array[String] = []; + for index = 0; index < (mbt_ffi_load32((iter_base) + 28)); index = index + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index * 8) + + let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array.push(result72) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array74 : Array[String] = []; + for index75 = 0; index75 < (mbt_ffi_load32((iter_base) + 36)); index75 = index75 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index75 * 8) + + let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array74.push(result73) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted77 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result76 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result76) + } + _ => panic() + } + + let lifted80 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted79 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result78) + } + _ => panic() + } + + Option::Some(lifted79) + } + _ => panic() + } + + array81.push(@types.NamedFieldType::{name : result69, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted71, aliases : array, examples : array74, deprecated : lifted77, role : lifted80}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array81) + } + 15 => { + + let array98 : Array[@types.VariantCaseType] = []; + for index99 = 0; index99 < (mbt_ffi_load32((iter_base) + 12)); index99 = index99 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index99 * 72) + + let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted84 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + let lifted86 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result85) + } + _ => panic() + } + + let array88 : Array[String] = []; + for index89 = 0; index89 < (mbt_ffi_load32((iter_base) + 32)); index89 = index89 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index89 * 8) + + let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array88.push(result87) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + let array91 : Array[String] = []; + for index92 = 0; index92 < (mbt_ffi_load32((iter_base) + 40)); index92 = index92 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index92 * 8) + + let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array91.push(result90) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + + let lifted94 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { + + let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + + Option::Some(result93) + } + _ => panic() + } + + let lifted97 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let lifted96 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result95 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + + @types.Role::Other(result95) + } + _ => panic() + } + + Option::Some(lifted96) + } + _ => panic() + } + + array98.push(@types.VariantCaseType::{name : result83, payload : lifted84, metadata : @types.MetadataEnvelope::{doc : lifted86, aliases : array88, examples : array91, deprecated : lifted94, role : lifted97}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::VariantType(array98) + } + 16 => { + + let array101 : Array[String] = []; + for index102 = 0; index102 < (mbt_ffi_load32((iter_base) + 12)); index102 = index102 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index102 * 8) + + let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array101.push(result100) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::EnumType(array101) + } + 17 => { + + let array104 : Array[String] = []; + for index105 = 0; index105 < (mbt_ffi_load32((iter_base) + 12)); index105 = index105 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index105 * 8) + + let result103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array104.push(result103) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::FlagsType(array104) + } + 18 => { + + let array106 : Array[Int] = []; + for index107 = 0; index107 < (mbt_ffi_load32((iter_base) + 12)); index107 = index107 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index107 * 4) + + array106.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::TupleType(array106) + } + 19 => { + + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { + + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { + + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { + + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { + + let lifted108 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + let lifted109 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } + + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted108, err : lifted109}) + } + 24 => { + + let lifted113 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array111 : Array[String] = []; + for index112 = 0; index112 < (mbt_ffi_load32((iter_base) + 16)); index112 = index112 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index112 * 8) + + let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array111.push(result110) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array111) + } + _ => panic() + } + + let lifted114 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted115 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted117 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result116 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result116) + } + _ => panic() + } + + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted113, min_length : lifted114, max_length : lifted115, regex : lifted117}) + } + 25 => { + + let lifted121 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array119 : Array[String] = []; + for index120 = 0; index120 < (mbt_ffi_load32((iter_base) + 16)); index120 = index120 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index120 * 8) + + let result118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array119.push(result118) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array119) + } + _ => panic() + } + + let lifted122 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted123 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted121, min_bytes : lifted122, max_bytes : lifted123}) + } + 26 => { + + let lifted127 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let array125 : Array[String] = []; + for index126 = 0; index126 < (mbt_ffi_load32((iter_base) + 20)); index126 = index126 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index126 * 8) + + let result124 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array125.push(result124) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + Option::Some(array125) + } + _ => panic() + } + + let lifted131 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let array129 : Array[String] = []; + for index130 = 0; index130 < (mbt_ffi_load32((iter_base) + 32)); index130 = index130 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index130 * 8) + + let result128 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array129.push(result128) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + Option::Some(array129) + } + _ => panic() + } + + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted127, allowed_extensions : lifted131}) + } + 27 => { + + let lifted135 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array133 : Array[String] = []; + for index134 = 0; index134 < (mbt_ffi_load32((iter_base) + 16)); index134 = index134 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index134 * 8) + + let result132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array133.push(result132) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array133) + } + _ => panic() + } + + let lifted139 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + let array137 : Array[String] = []; + for index138 = 0; index138 < (mbt_ffi_load32((iter_base) + 28)); index138 = index138 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index138 * 8) + + let result136 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array137.push(result136) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + Option::Some(array137) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted135, allowed_hosts : lifted139}) + } + 28 => { + + @types.SchemaTypeBody::DatetimeType + } + 29 => { + + @types.SchemaTypeBody::DurationType + } + 30 => { + + let result140 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let array142 : Array[String] = []; + for index143 = 0; index143 < (mbt_ffi_load32((iter_base) + 20)); index143 = index143 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index143 * 8) + + let result141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array142.push(result141) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + let lifted145 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result144}) + } + _ => panic() + } + + let lifted147 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let result146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result146}) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result140, allowed_suffixes : array142, min : lifted145, max : lifted147}) + } + 31 => { + + let array171 : Array[@types.UnionBranch] = []; + for index172 = 0; index172 < (mbt_ffi_load32((iter_base) + 12)); index172 = index172 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index172 * 92) + + let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted157 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { + + let result149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Prefix(result149) + } + 1 => { + + let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Suffix(result150) + } + 2 => { + + let result151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Contains(result151) + } + 3 => { + + let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Regex(result152) + } + 4 => { + + let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + let lifted155 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result154 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + + Option::Some(result154) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result153, literal : lifted155}) + } + 5 => { + + let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::FieldAbsent(result156) + } + _ => panic() + } + + let lifted159 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result158) + } + _ => panic() + } + + let array161 : Array[String] = []; + for index162 = 0; index162 < (mbt_ffi_load32((iter_base) + 52)); index162 = index162 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index162 * 8) + + let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array161.push(result160) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + + let array164 : Array[String] = []; + for index165 = 0; index165 < (mbt_ffi_load32((iter_base) + 60)); index165 = index165 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index165 * 8) + + let result163 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array164.push(result163) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + + let lifted167 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result166) + } + _ => panic() + } + + let lifted170 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { + + let lifted169 = match (mbt_ffi_load8_u((iter_base) + 80)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + + @types.Role::Other(result168) + } + _ => panic() + } + + Option::Some(lifted169) + } + _ => panic() + } + + array171.push(@types.UnionBranch::{tag : result148, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted157, metadata : @types.MetadataEnvelope::{doc : lifted159, aliases : array161, examples : array164, deprecated : lifted167, role : lifted170}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array171}) + } + 32 => { + + let lifted174 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result173) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted174}) + } + 33 => { + + let lifted176 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result175) + } + _ => panic() + } + + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted176}) + } + 34 => { + + let lifted177 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::FutureType(lifted177) + } + 35 => { + + let lifted178 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::StreamType(lifted178) + } + _ => panic() + } + + let lifted181 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + 0 => Option::None + 1 => { + + let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + + Option::Some(result180) + } + _ => panic() + } + + let array183 : Array[String] = []; + for index184 = 0; index184 < (mbt_ffi_load32((iter_base) + 104)); index184 = index184 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index184 * 8) + + let result182 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array183.push(result182) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + + let array186 : Array[String] = []; + for index187 = 0; index187 < (mbt_ffi_load32((iter_base) + 112)); index187 = index187 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index187 * 8) + + let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array186.push(result185) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + + let lifted189 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { + + let result188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + + Option::Some(result188) + } + _ => panic() + } + + let lifted192 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { + + let lifted191 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + + @types.Role::Other(result190) + } + _ => panic() + } + + Option::Some(lifted191) + } + _ => panic() + } + + array193.push(@types.SchemaTypeNode::{body : lifted179, metadata : @types.MetadataEnvelope::{doc : lifted181, aliases : array183, examples : array186, deprecated : lifted189, role : lifted192}}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) + + let array198 : Array[@types.SchemaTypeDef] = []; + for index199 = 0; index199 < (mbt_ffi_load32((return_area) + 28)); index199 = index199 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 24)) + (index199 * 24) + + let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted197 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result196) + } + _ => panic() + } + + array198.push(@types.SchemaTypeDef::{id : result195, name : lifted197, body : mbt_ffi_load32((iter_base) + 20)}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 24)) + + let array230 : Array[@types.SchemaValueNode] = []; + for index231 = 0; index231 < (mbt_ffi_load32((return_area) + 40)); index231 = index231 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 36)) + (index231 * 32) + + let lifted229 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) + } + 1 => { + + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { + + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { + + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { + + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { + + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { + + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { + + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { + + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { + + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { + + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { + + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { + + let result200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::StringValue(result200) + } + 13 => { + + let array201 : Array[Int] = []; + for index202 = 0; index202 < (mbt_ffi_load32((iter_base) + 12)); index202 = index202 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index202 * 4) + + array201.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::RecordValue(array201) + } + 14 => { + + let lifted203 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted203}) + } + 15 => { + + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { + + let array204 : Array[Bool] = []; + for index205 = 0; index205 < (mbt_ffi_load32((iter_base) + 12)); index205 = index205 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index205 * 1) + + array204.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FlagsValue(array204) + } + 17 => { + + let array206 : Array[Int] = []; + for index207 = 0; index207 < (mbt_ffi_load32((iter_base) + 12)); index207 = index207 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index207 * 4) + + array206.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::TupleValue(array206) + } + 18 => { + + let array208 : Array[Int] = []; + for index209 = 0; index209 < (mbt_ffi_load32((iter_base) + 12)); index209 = index209 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index209 * 4) + + array208.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::ListValue(array208) + } + 19 => { + + let array210 : Array[Int] = []; + for index211 = 0; index211 < (mbt_ffi_load32((iter_base) + 12)); index211 = index211 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index211 * 4) + + array210.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array210) + } + 20 => { + + let array212 : Array[@types.MapEntry] = []; + for index213 = 0; index213 < (mbt_ffi_load32((iter_base) + 12)); index213 = index213 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index213 * 8) + + array212.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::MapValue(array212) + } + 21 => { + + let lifted214 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaValueNode::OptionValue(lifted214) + } + 22 => { + + let lifted217 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { + + let lifted215 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::OkValue(lifted215) + } + 1 => { + + let lifted216 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::ErrValue(lifted216) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted217) + } + 23 => { + + let result218 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted220 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result219 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result219) + } + _ => panic() + } + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result218, language : lifted220}) + } + 24 => { + + let result221 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted223 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result222 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result222) + } + _ => panic() + } + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result221, mime_type : lifted223}) + } + 25 => { + + let result224 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::PathValue(result224) + } + 26 => { + + let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UrlValue(result225) + } + 27 => { + + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + } + 28 => { + + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + } + 29 => { + + let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result226}) + } + 30 => { + + let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result227, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { + + let result228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result228}) + } + 32 => { + + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) + } + _ => panic() + } + + array230.push(lifted229) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 36)) + + let lifted232 : @types.Uuid? = match mbt_ffi_load8_u((return_area) + 48) { + 0 => Option::None + 1 => { + + Option::Some(@types.Uuid::{high_bits : (mbt_ffi_load64((return_area) + 56)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((return_area) + 64)).reinterpret_as_uint64()}) + } + _ => panic() + } + + Result::Ok((result, @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array193, defs : array198, root : mbt_ffi_load32((return_area) + 32)}, value : @types.SchemaValueTree::{value_nodes : array230, root : mbt_ffi_load32((return_area) + 44)}}, lifted232)) + } + 1 => { + + let lifted472 = match (mbt_ffi_load8_u((return_area) + 8)) { + 0 => { + + let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidInput(result233) + } + 1 => { + + let result234 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidMethod(result234) + } + 2 => { + + let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidType(result235) + } + 3 => { + + let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidAgentId(result236) + } + 4 => { + + let array433 : Array[@types.SchemaTypeNode] = []; + for index434 = 0; index434 < (mbt_ffi_load32((return_area) + 16)); index434 = index434 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index434 * 144) + + let lifted419 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { + + @types.SchemaTypeBody::BoolType + } + 2 => { + + let lifted243 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted238 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted237 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted237) + } + _ => panic() + } + + let lifted240 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted239 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted239) + } + _ => panic() + } + + let lifted242 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result241) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted238, max : lifted240, unit : lifted242}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted243) + } + 3 => { + + let lifted250 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted245 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted244 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted244) + } + _ => panic() + } + + let lifted247 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted246 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted246) + } + _ => panic() + } + + let lifted249 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result248 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result248) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted245, max : lifted247, unit : lifted249}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted250) + } + 4 => { + + let lifted257 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted252 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted251 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted251) + } + _ => panic() + } + + let lifted254 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted253 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted253) + } + _ => panic() + } + + let lifted256 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result255 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result255) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted252, max : lifted254, unit : lifted256}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted257) + } + 5 => { + + let lifted264 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted259 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted258 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted258) + } + _ => panic() + } + + let lifted261 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted260 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted260) + } + _ => panic() + } + + let lifted263 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result262) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted259, max : lifted261, unit : lifted263}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted264) + } + 6 => { + + let lifted271 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted266 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted265 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted265) + } + _ => panic() + } + + let lifted268 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted267 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted267) + } + _ => panic() + } + + let lifted270 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result269 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result269) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted266, max : lifted268, unit : lifted270}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted271) + } + 7 => { + + let lifted278 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted273 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted272 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted272) + } + _ => panic() + } + + let lifted275 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted274 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted274) + } + _ => panic() + } + + let lifted277 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result276 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result276) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted273, max : lifted275, unit : lifted277}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted278) + } + 8 => { + + let lifted285 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted280 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted279 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted279) + } + _ => panic() + } + + let lifted282 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted281 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted281) + } + _ => panic() + } + + let lifted284 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result283 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result283) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted280, max : lifted282, unit : lifted284}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted285) + } + 9 => { + + let lifted292 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted287 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted286 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted286) + } + _ => panic() + } + + let lifted289 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted288 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted288) + } + _ => panic() + } + + let lifted291 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result290 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result290) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted287, max : lifted289, unit : lifted291}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted292) + } + 10 => { + + let lifted299 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted294 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted293 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted293) + } + _ => panic() + } + + let lifted296 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted295 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted295) + } + _ => panic() + } + + let lifted298 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result297 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result297) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted294, max : lifted296, unit : lifted298}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted299) + } + 11 => { + + let lifted306 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted301 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted300 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted300) + } + _ => panic() + } + + let lifted303 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted302 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted302) + } + _ => panic() + } + + let lifted305 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result304) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted301, max : lifted303, unit : lifted305}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted306) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array321 : Array[@types.NamedFieldType] = []; + for index322 = 0; index322 < (mbt_ffi_load32((iter_base) + 12)); index322 = index322 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index322 * 68) + + let result307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted309 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result308) + } + _ => panic() + } + + let array311 : Array[String] = []; + for index312 = 0; index312 < (mbt_ffi_load32((iter_base) + 28)); index312 = index312 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index312 * 8) + + let result310 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array311.push(result310) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array314 : Array[String] = []; + for index315 = 0; index315 < (mbt_ffi_load32((iter_base) + 36)); index315 = index315 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index315 * 8) + + let result313 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array314.push(result313) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted317 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result316 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result316) + } + _ => panic() + } + + let lifted320 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted319 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result318 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result318) + } + _ => panic() + } + + Option::Some(lifted319) + } + _ => panic() + } + + array321.push(@types.NamedFieldType::{name : result307, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted309, aliases : array311, examples : array314, deprecated : lifted317, role : lifted320}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array321) + } + 15 => { + + let array338 : Array[@types.VariantCaseType] = []; + for index339 = 0; index339 < (mbt_ffi_load32((iter_base) + 12)); index339 = index339 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index339 * 72) + + let result323 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted324 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + let lifted326 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result325) + } + _ => panic() + } + + let array328 : Array[String] = []; + for index329 = 0; index329 < (mbt_ffi_load32((iter_base) + 32)); index329 = index329 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index329 * 8) + + let result327 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array328.push(result327) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + let array331 : Array[String] = []; + for index332 = 0; index332 < (mbt_ffi_load32((iter_base) + 40)); index332 = index332 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index332 * 8) + + let result330 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array331.push(result330) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + + let lifted334 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { + + let result333 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + + Option::Some(result333) + } + _ => panic() + } + + let lifted337 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let lifted336 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + + @types.Role::Other(result335) + } + _ => panic() + } + + Option::Some(lifted336) + } + _ => panic() + } + + array338.push(@types.VariantCaseType::{name : result323, payload : lifted324, metadata : @types.MetadataEnvelope::{doc : lifted326, aliases : array328, examples : array331, deprecated : lifted334, role : lifted337}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::VariantType(array338) + } + 16 => { + + let array341 : Array[String] = []; + for index342 = 0; index342 < (mbt_ffi_load32((iter_base) + 12)); index342 = index342 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index342 * 8) + + let result340 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array341.push(result340) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::EnumType(array341) + } + 17 => { + + let array344 : Array[String] = []; + for index345 = 0; index345 < (mbt_ffi_load32((iter_base) + 12)); index345 = index345 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index345 * 8) + + let result343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array344.push(result343) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::FlagsType(array344) + } + 18 => { + + let array346 : Array[Int] = []; + for index347 = 0; index347 < (mbt_ffi_load32((iter_base) + 12)); index347 = index347 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index347 * 4) + + array346.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::TupleType(array346) + } + 19 => { + + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { + + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { + + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { + + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { + + let lifted348 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + let lifted349 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } + + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted348, err : lifted349}) + } + 24 => { + + let lifted353 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array351 : Array[String] = []; + for index352 = 0; index352 < (mbt_ffi_load32((iter_base) + 16)); index352 = index352 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index352 * 8) + + let result350 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array351.push(result350) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array351) + } + _ => panic() + } + + let lifted354 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted355 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted357 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result356) + } + _ => panic() + } + + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted353, min_length : lifted354, max_length : lifted355, regex : lifted357}) + } + 25 => { + + let lifted361 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array359 : Array[String] = []; + for index360 = 0; index360 < (mbt_ffi_load32((iter_base) + 16)); index360 = index360 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index360 * 8) + + let result358 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array359.push(result358) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array359) + } + _ => panic() + } + + let lifted362 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted363 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted361, min_bytes : lifted362, max_bytes : lifted363}) + } + 26 => { + + let lifted367 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let array365 : Array[String] = []; + for index366 = 0; index366 < (mbt_ffi_load32((iter_base) + 20)); index366 = index366 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index366 * 8) + + let result364 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array365.push(result364) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + Option::Some(array365) + } + _ => panic() + } + + let lifted371 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let array369 : Array[String] = []; + for index370 = 0; index370 < (mbt_ffi_load32((iter_base) + 32)); index370 = index370 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index370 * 8) + + let result368 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array369.push(result368) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + Option::Some(array369) + } + _ => panic() + } + + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted367, allowed_extensions : lifted371}) + } + 27 => { + + let lifted375 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array373 : Array[String] = []; + for index374 = 0; index374 < (mbt_ffi_load32((iter_base) + 16)); index374 = index374 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index374 * 8) + + let result372 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array373.push(result372) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array373) + } + _ => panic() + } + + let lifted379 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + let array377 : Array[String] = []; + for index378 = 0; index378 < (mbt_ffi_load32((iter_base) + 28)); index378 = index378 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index378 * 8) + + let result376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array377.push(result376) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + Option::Some(array377) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted375, allowed_hosts : lifted379}) + } + 28 => { + + @types.SchemaTypeBody::DatetimeType + } + 29 => { + + @types.SchemaTypeBody::DurationType + } + 30 => { + + let result380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let array382 : Array[String] = []; + for index383 = 0; index383 < (mbt_ffi_load32((iter_base) + 20)); index383 = index383 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index383 * 8) + + let result381 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array382.push(result381) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + let lifted385 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result384}) + } + _ => panic() + } + + let lifted387 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let result386 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result386}) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result380, allowed_suffixes : array382, min : lifted385, max : lifted387}) + } + 31 => { + + let array411 : Array[@types.UnionBranch] = []; + for index412 = 0; index412 < (mbt_ffi_load32((iter_base) + 12)); index412 = index412 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index412 * 92) + + let result388 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted397 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { + + let result389 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Prefix(result389) + } + 1 => { + + let result390 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Suffix(result390) + } + 2 => { + + let result391 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Contains(result391) + } + 3 => { + + let result392 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Regex(result392) + } + 4 => { + + let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + let lifted395 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result394 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + + Option::Some(result394) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result393, literal : lifted395}) + } + 5 => { + + let result396 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::FieldAbsent(result396) + } + _ => panic() + } + + let lifted399 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result398 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result398) + } + _ => panic() + } + + let array401 : Array[String] = []; + for index402 = 0; index402 < (mbt_ffi_load32((iter_base) + 52)); index402 = index402 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index402 * 8) + + let result400 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array401.push(result400) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + + let array404 : Array[String] = []; + for index405 = 0; index405 < (mbt_ffi_load32((iter_base) + 60)); index405 = index405 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index405 * 8) + + let result403 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array404.push(result403) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + + let lifted407 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result406 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result406) + } + _ => panic() + } + + let lifted410 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { + + let lifted409 = match (mbt_ffi_load8_u((iter_base) + 80)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result408 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + + @types.Role::Other(result408) + } + _ => panic() + } + + Option::Some(lifted409) + } + _ => panic() + } + + array411.push(@types.UnionBranch::{tag : result388, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted397, metadata : @types.MetadataEnvelope::{doc : lifted399, aliases : array401, examples : array404, deprecated : lifted407, role : lifted410}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array411}) + } + 32 => { + + let lifted414 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result413 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result413) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted414}) + } + 33 => { + + let lifted416 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result415) + } + _ => panic() + } + + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted416}) + } + 34 => { + + let lifted417 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::FutureType(lifted417) + } + 35 => { + + let lifted418 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::StreamType(lifted418) + } + _ => panic() + } + + let lifted421 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + 0 => Option::None + 1 => { + + let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + + Option::Some(result420) + } + _ => panic() + } + + let array423 : Array[String] = []; + for index424 = 0; index424 < (mbt_ffi_load32((iter_base) + 104)); index424 = index424 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index424 * 8) + + let result422 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array423.push(result422) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + + let array426 : Array[String] = []; + for index427 = 0; index427 < (mbt_ffi_load32((iter_base) + 112)); index427 = index427 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index427 * 8) + + let result425 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array426.push(result425) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + + let lifted429 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { + + let result428 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + + Option::Some(result428) + } + _ => panic() + } + + let lifted432 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { + + let lifted431 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + + @types.Role::Other(result430) + } + _ => panic() + } + + Option::Some(lifted431) + } + _ => panic() + } + + array433.push(@types.SchemaTypeNode::{body : lifted419, metadata : @types.MetadataEnvelope::{doc : lifted421, aliases : array423, examples : array426, deprecated : lifted429, role : lifted432}}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) + + let array438 : Array[@types.SchemaTypeDef] = []; + for index439 = 0; index439 < (mbt_ffi_load32((return_area) + 24)); index439 = index439 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index439 * 24) + + let result435 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted437 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result436 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result436) + } + _ => panic() + } + + array438.push(@types.SchemaTypeDef::{id : result435, name : lifted437, body : mbt_ffi_load32((iter_base) + 20)}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 20)) + + let array470 : Array[@types.SchemaValueNode] = []; + for index471 = 0; index471 < (mbt_ffi_load32((return_area) + 36)); index471 = index471 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index471 * 32) + + let lifted469 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) + } + 1 => { + + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { + + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { + + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { + + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { + + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { + + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { + + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { + + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { + + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { + + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { + + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { + + let result440 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::StringValue(result440) + } + 13 => { + + let array441 : Array[Int] = []; + for index442 = 0; index442 < (mbt_ffi_load32((iter_base) + 12)); index442 = index442 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index442 * 4) + + array441.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::RecordValue(array441) + } + 14 => { + + let lifted443 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted443}) + } + 15 => { + + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { + + let array444 : Array[Bool] = []; + for index445 = 0; index445 < (mbt_ffi_load32((iter_base) + 12)); index445 = index445 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index445 * 1) + + array444.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FlagsValue(array444) + } + 17 => { + + let array446 : Array[Int] = []; + for index447 = 0; index447 < (mbt_ffi_load32((iter_base) + 12)); index447 = index447 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index447 * 4) + + array446.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::TupleValue(array446) + } + 18 => { + + let array448 : Array[Int] = []; + for index449 = 0; index449 < (mbt_ffi_load32((iter_base) + 12)); index449 = index449 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index449 * 4) + + array448.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::ListValue(array448) + } + 19 => { + + let array450 : Array[Int] = []; + for index451 = 0; index451 < (mbt_ffi_load32((iter_base) + 12)); index451 = index451 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index451 * 4) + + array450.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array450) + } + 20 => { + + let array452 : Array[@types.MapEntry] = []; + for index453 = 0; index453 < (mbt_ffi_load32((iter_base) + 12)); index453 = index453 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index453 * 8) + + array452.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::MapValue(array452) + } + 21 => { + + let lifted454 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaValueNode::OptionValue(lifted454) + } + 22 => { + + let lifted457 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { + + let lifted455 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::OkValue(lifted455) + } + 1 => { + + let lifted456 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::ErrValue(lifted456) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted457) + } + 23 => { + + let result458 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted460 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result459 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result459) + } + _ => panic() + } + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result458, language : lifted460}) + } + 24 => { + + let result461 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted463 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result462 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result462) + } + _ => panic() + } + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result461, mime_type : lifted463}) + } + 25 => { + + let result464 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::PathValue(result464) + } + 26 => { + + let result465 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UrlValue(result465) + } + 27 => { + + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + } + 28 => { + + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + } + 29 => { + + let result466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result466}) + } + 30 => { + + let result467 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result467, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { + + let result468 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result468}) + } + 32 => { + + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) + } + _ => panic() + } + + array470.push(lifted469) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) + + @common.AgentError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array433, defs : array438, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array470, root : mbt_ffi_load32((return_area) + 40)}}) + } + _ => panic() + } + + Result::Err(lifted472) + } + _ => panic() + } + let ret = lifted473 + mbt_ffi_free(ptr) + mbt_ffi_free(return_area) + return ret + +} +///| +/// Creates a webhook that can be used to integrate with webhook driven apis. +/// When the created url is called with a post request, the provided promise-id is completed with the body of the post request. +/// Note the following behaviours: +/// * Only agents whoose agent types are _currently_ deployed via an http api are allowed to create a webhook. Calling this function while the agent +/// is not deployed via an http api will trap. +/// * Only the agent type that created the promise is allowed to create a webhook for it. Using this host function +/// from a different agent type will trap. +pub fn create_webhook(promise_id : @types.PromiseId) -> String { + + let ptr = mbt_ffi_str2ptr(((promise_id).agent_id).agent_id) + let return_area = mbt_ffi_malloc(8) + wasmImportCreateWebhook((((((promise_id).agent_id).component_id).uuid).high_bits).reinterpret_as_int64(), (((((promise_id).agent_id).component_id).uuid).low_bits).reinterpret_as_int64(), ptr, ((promise_id).agent_id).agent_id.length(), ((promise_id).oplog_idx).reinterpret_as_int64(), return_area); + + let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 0), mbt_ffi_load32((return_area) + 4)) + let ret = result + mbt_ffi_free(ptr) + mbt_ffi_free(return_area) + return ret + +} +///| +/// Constructs the RPC client connecting to the given target agent. +/// +/// `constructor` is a value tree whose root encodes the target agent +/// constructor's parameter list. +pub fn WasmRpc::wasm_rpc(agent_type_name : String, constructor_ : @types.SchemaValueTree, phantom_id : @types.Uuid?, agent_config : Array[@common.TypedAgentConfigValue]) -> WasmRpc { + let cleanup_list : Array[Int] = [] + + let ptr = mbt_ffi_str2ptr(agent_type_name) + + let address66 = mbt_ffi_malloc(((constructor_).value_nodes).length() * 32); + for index67 = 0; index67 < ((constructor_).value_nodes).length(); index67 = index67 + 1 { + let iter_elem : @types.SchemaValueNode = ((constructor_).value_nodes)[(index67)] + let iter_base = address66 + (index67 * 32); + + match iter_elem { + BoolValue(payload) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) + + () + } + S8Value(payload0) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) + + () + } + S16Value(payload1) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) + + () + } + S32Value(payload2) => { + mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload2) + + () + } + S64Value(payload3) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload3) + + () + } + U8Value(payload4) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) + + () + } + U16Value(payload5) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) + + () + } + U32Value(payload6) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) + + () + } + U64Value(payload7) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) + + () + } + F32Value(payload8) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload8) + + () + } + F64Value(payload9) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload9) + + () + } + CharValue(payload10) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) + + () + } + StringValue(payload11) => { + mbt_ffi_store8((iter_base) + 0, (12)) + + let ptr12 = mbt_ffi_str2ptr(payload11) + mbt_ffi_store32((iter_base) + 12, payload11.length()) + mbt_ffi_store32((iter_base) + 8, ptr12) + cleanup_list.push(ptr12) + + () + } + RecordValue(payload13) => { + mbt_ffi_store8((iter_base) + 0, (13)) + + let address = mbt_ffi_malloc((payload13).length() * 4); + for index = 0; index < (payload13).length(); index = index + 1 { + let iter_elem : Int = (payload13)[(index)] + let iter_base = address + (index * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload13).length()) + mbt_ffi_store32((iter_base) + 8, address) + cleanup_list.push(address) + + () + } + VariantValue(payload14) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) + + match ((payload14).payload) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload16) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload16) + + () + } + } + + () + } + EnumValue(payload17) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) + + () + } + FlagsValue(payload18) => { + mbt_ffi_store8((iter_base) + 0, (16)) + + let address19 = mbt_ffi_malloc((payload18).length() * 1); + for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { + let iter_elem : Bool = (payload18)[(index20)] + let iter_base = address19 + (index20 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + + } + mbt_ffi_store32((iter_base) + 12, (payload18).length()) + mbt_ffi_store32((iter_base) + 8, address19) + cleanup_list.push(address19) + + () + } + TupleValue(payload21) => { + mbt_ffi_store8((iter_base) + 0, (17)) + + let address22 = mbt_ffi_malloc((payload21).length() * 4); + for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { + let iter_elem : Int = (payload21)[(index23)] + let iter_base = address22 + (index23 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload21).length()) + mbt_ffi_store32((iter_base) + 8, address22) + cleanup_list.push(address22) + + () + } + ListValue(payload24) => { + mbt_ffi_store8((iter_base) + 0, (18)) + + let address25 = mbt_ffi_malloc((payload24).length() * 4); + for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { + let iter_elem : Int = (payload24)[(index26)] + let iter_base = address25 + (index26 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload24).length()) + mbt_ffi_store32((iter_base) + 8, address25) + cleanup_list.push(address25) + + () + } + FixedListValue(payload27) => { + mbt_ffi_store8((iter_base) + 0, (19)) + + let address28 = mbt_ffi_malloc((payload27).length() * 4); + for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { + let iter_elem : Int = (payload27)[(index29)] + let iter_base = address28 + (index29 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload27).length()) + mbt_ffi_store32((iter_base) + 8, address28) + cleanup_list.push(address28) + + () + } + MapValue(payload30) => { + mbt_ffi_store8((iter_base) + 0, (20)) + + let address31 = mbt_ffi_malloc((payload30).length() * 8); + for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { + let iter_elem : @types.MapEntry = (payload30)[(index32)] + let iter_base = address31 + (index32 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + + } + mbt_ffi_store32((iter_base) + 12, (payload30).length()) + mbt_ffi_store32((iter_base) + 8, address31) + cleanup_list.push(address31) + + () + } + OptionValue(payload33) => { + mbt_ffi_store8((iter_base) + 0, (21)) + + match (payload33) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload35) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload35) + + () + } + } + + () + } + ResultValue(payload36) => { + mbt_ffi_store8((iter_base) + 0, (22)) + + match payload36 { + OkValue(payload37) => { + mbt_ffi_store8((iter_base) + 8, (0)) + + match (payload37) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload39) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload39) + + () + } + } + + () + } + ErrValue(payload40) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match (payload40) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload42) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload42) + + () + } + } + + () + } + } + + () + } + TextValue(payload43) => { + mbt_ffi_store8((iter_base) + 0, (23)) + + let ptr44 = mbt_ffi_str2ptr((payload43).text) + mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr44) + + match ((payload43).language) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload46) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr47 = mbt_ffi_str2ptr(payload46) + mbt_ffi_store32((iter_base) + 24, payload46.length()) + mbt_ffi_store32((iter_base) + 20, ptr47) + cleanup_list.push(ptr47) + + () + } + } + cleanup_list.push(ptr44) + + () + } + BinaryValue(payload48) => { + mbt_ffi_store8((iter_base) + 0, (24)) + + let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) + + mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr49) + + match ((payload48).mime_type) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload51) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr52 = mbt_ffi_str2ptr(payload51) + mbt_ffi_store32((iter_base) + 24, payload51.length()) + mbt_ffi_store32((iter_base) + 20, ptr52) + cleanup_list.push(ptr52) + + () + } + } + cleanup_list.push(ptr49) + + () + } + PathValue(payload53) => { + mbt_ffi_store8((iter_base) + 0, (25)) + + let ptr54 = mbt_ffi_str2ptr(payload53) + mbt_ffi_store32((iter_base) + 12, payload53.length()) + mbt_ffi_store32((iter_base) + 8, ptr54) + cleanup_list.push(ptr54) + + () + } + UrlValue(payload55) => { + mbt_ffi_store8((iter_base) + 0, (26)) + + let ptr56 = mbt_ffi_str2ptr(payload55) + mbt_ffi_store32((iter_base) + 12, payload55.length()) + mbt_ffi_store32((iter_base) + 8, ptr56) + cleanup_list.push(ptr56) + + () + } + DatetimeValue(payload57) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload57).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) + + () + } + DurationValue(payload58) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) + + () + } + QuantityValueNode(payload59) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload59).scale) + + let ptr60 = mbt_ffi_str2ptr((payload59).unit) + mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr60) + cleanup_list.push(ptr60) + + () + } + UnionValue(payload61) => { + mbt_ffi_store8((iter_base) + 0, (30)) + + let ptr62 = mbt_ffi_str2ptr((payload61).tag) + mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr62) + mbt_ffi_store32((iter_base) + 16, (payload61).body) + cleanup_list.push(ptr62) + + () + } + SecretValue(payload63) => { + mbt_ffi_store8((iter_base) + 0, (31)) + + let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr64) + cleanup_list.push(ptr64) + + () + } + QuotaTokenHandle(payload65) => { + mbt_ffi_store8((iter_base) + 0, (32)) + + let @types.QuotaToken(handle) = payload65 + mbt_ffi_store32((iter_base) + 8, handle) + + () + } + } + + } + + let (lowered, lowered70, lowered71) = match (phantom_id) { + None => { + + ((0), 0L, 0L) + } + Some(payload69) => { + + ((1), ((payload69).high_bits).reinterpret_as_int64(), ((payload69).low_bits).reinterpret_as_int64()) + } + } + + let address516 = mbt_ffi_malloc((agent_config).length() * 40); + for index517 = 0; index517 < (agent_config).length(); index517 = index517 + 1 { + let iter_elem : @common.TypedAgentConfigValue = (agent_config)[(index517)] + let iter_base = address516 + (index517 * 40); + + let address73 = mbt_ffi_malloc(((iter_elem).path).length() * 8); + for index74 = 0; index74 < ((iter_elem).path).length(); index74 = index74 + 1 { + let iter_elem : String = ((iter_elem).path)[(index74)] + let iter_base = address73 + (index74 * 8); + + let ptr72 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr72) + cleanup_list.push(ptr72) + + } + mbt_ffi_store32((iter_base) + 4, ((iter_elem).path).length()) + mbt_ffi_store32((iter_base) + 0, address73) + + let address436 = mbt_ffi_malloc(((((iter_elem).value).graph).type_nodes).length() * 144); + for index437 = 0; index437 < ((((iter_elem).value).graph).type_nodes).length(); index437 = index437 + 1 { + let iter_elem : @types.SchemaTypeNode = ((((iter_elem).value).graph).type_nodes)[(index437)] + let iter_base = address436 + (index437 * 144); + + match (iter_elem).body { + RefType(payload75) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store32((iter_base) + 8, payload75) + + () + } + BoolType => { + mbt_ffi_store8((iter_base) + 0, (1)) + + () + } + S8Type(payload77) => { + mbt_ffi_store8((iter_base) + 0, (2)) + + match (payload77) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload79) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload79).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload81) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload81 { + Signed(payload82) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload82) + + () + } + Unsigned(payload83) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload83).reinterpret_as_int64()) + + () + } + FloatBits(payload84) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload84).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload79).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload86) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload86 { + Signed(payload87) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload87) + + () + } + Unsigned(payload88) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload88).reinterpret_as_int64()) + + () + } + FloatBits(payload89) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload89).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload79).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload91) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr92 = mbt_ffi_str2ptr(payload91) + mbt_ffi_store32((iter_base) + 72, payload91.length()) + mbt_ffi_store32((iter_base) + 68, ptr92) + cleanup_list.push(ptr92) + + () + } + } + + () + } + } + + () + } + S16Type(payload93) => { + mbt_ffi_store8((iter_base) + 0, (3)) + + match (payload93) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload95) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload95).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload97) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload97 { + Signed(payload98) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload98) + + () + } + Unsigned(payload99) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload99).reinterpret_as_int64()) + + () + } + FloatBits(payload100) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload100).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload95).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload102) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload102 { + Signed(payload103) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload103) + + () + } + Unsigned(payload104) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload104).reinterpret_as_int64()) + + () + } + FloatBits(payload105) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload105).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload95).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload107) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr108 = mbt_ffi_str2ptr(payload107) + mbt_ffi_store32((iter_base) + 72, payload107.length()) + mbt_ffi_store32((iter_base) + 68, ptr108) + cleanup_list.push(ptr108) + + () + } + } + + () + } + } + + () + } + S32Type(payload109) => { + mbt_ffi_store8((iter_base) + 0, (4)) + + match (payload109) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload111) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload111).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload113) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload113 { + Signed(payload114) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload114) + + () + } + Unsigned(payload115) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload115).reinterpret_as_int64()) + + () + } + FloatBits(payload116) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload116).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload111).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload118) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload118 { + Signed(payload119) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload119) + + () + } + Unsigned(payload120) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload120).reinterpret_as_int64()) + + () + } + FloatBits(payload121) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload121).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload111).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload123) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr124 = mbt_ffi_str2ptr(payload123) + mbt_ffi_store32((iter_base) + 72, payload123.length()) + mbt_ffi_store32((iter_base) + 68, ptr124) + cleanup_list.push(ptr124) + + () + } + } + + () + } + } + + () + } + S64Type(payload125) => { + mbt_ffi_store8((iter_base) + 0, (5)) + + match (payload125) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload127) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload127).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload129) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload129 { + Signed(payload130) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload130) + + () + } + Unsigned(payload131) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload131).reinterpret_as_int64()) + + () + } + FloatBits(payload132) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload132).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload127).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload134) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload134 { + Signed(payload135) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload135) + + () + } + Unsigned(payload136) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload136).reinterpret_as_int64()) + + () + } + FloatBits(payload137) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload137).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload127).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload139) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr140 = mbt_ffi_str2ptr(payload139) + mbt_ffi_store32((iter_base) + 72, payload139.length()) + mbt_ffi_store32((iter_base) + 68, ptr140) + cleanup_list.push(ptr140) + + () + } + } + + () + } + } + + () + } + U8Type(payload141) => { + mbt_ffi_store8((iter_base) + 0, (6)) + + match (payload141) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload143) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload143).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload145) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload145 { + Signed(payload146) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload146) + + () + } + Unsigned(payload147) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload147).reinterpret_as_int64()) + + () + } + FloatBits(payload148) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload148).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload143).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload150) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload150 { + Signed(payload151) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload151) + + () + } + Unsigned(payload152) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload152).reinterpret_as_int64()) + + () + } + FloatBits(payload153) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload153).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload143).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload155) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr156 = mbt_ffi_str2ptr(payload155) + mbt_ffi_store32((iter_base) + 72, payload155.length()) + mbt_ffi_store32((iter_base) + 68, ptr156) + cleanup_list.push(ptr156) + + () + } + } + + () + } + } + + () + } + U16Type(payload157) => { + mbt_ffi_store8((iter_base) + 0, (7)) + + match (payload157) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload159) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload159).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload161) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload161 { + Signed(payload162) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload162) + + () + } + Unsigned(payload163) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload163).reinterpret_as_int64()) + + () + } + FloatBits(payload164) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload164).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload159).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload166) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload166 { + Signed(payload167) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload167) + + () + } + Unsigned(payload168) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload168).reinterpret_as_int64()) + + () + } + FloatBits(payload169) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload169).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload159).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload171) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr172 = mbt_ffi_str2ptr(payload171) + mbt_ffi_store32((iter_base) + 72, payload171.length()) + mbt_ffi_store32((iter_base) + 68, ptr172) + cleanup_list.push(ptr172) + + () + } + } + + () + } + } + + () + } + U32Type(payload173) => { + mbt_ffi_store8((iter_base) + 0, (8)) + + match (payload173) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload175) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload175).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload177) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload177 { + Signed(payload178) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload178) + + () + } + Unsigned(payload179) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload179).reinterpret_as_int64()) + + () + } + FloatBits(payload180) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload180).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload175).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload182) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload182 { + Signed(payload183) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload183) + + () + } + Unsigned(payload184) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload184).reinterpret_as_int64()) + + () + } + FloatBits(payload185) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload185).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload175).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload187) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr188 = mbt_ffi_str2ptr(payload187) + mbt_ffi_store32((iter_base) + 72, payload187.length()) + mbt_ffi_store32((iter_base) + 68, ptr188) + cleanup_list.push(ptr188) + + () + } + } + + () + } + } + + () + } + U64Type(payload189) => { + mbt_ffi_store8((iter_base) + 0, (9)) + + match (payload189) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload191) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload191).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload193) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload193 { + Signed(payload194) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload194) + + () + } + Unsigned(payload195) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload195).reinterpret_as_int64()) + + () + } + FloatBits(payload196) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload196).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload191).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload198) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload198 { + Signed(payload199) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload199) + + () + } + Unsigned(payload200) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload200).reinterpret_as_int64()) + + () + } + FloatBits(payload201) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload201).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload191).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload203) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr204 = mbt_ffi_str2ptr(payload203) + mbt_ffi_store32((iter_base) + 72, payload203.length()) + mbt_ffi_store32((iter_base) + 68, ptr204) + cleanup_list.push(ptr204) + + () + } + } + + () + } + } + + () + } + F32Type(payload205) => { + mbt_ffi_store8((iter_base) + 0, (10)) + + match (payload205) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload207) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload207).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload209) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload209 { + Signed(payload210) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload210) + + () + } + Unsigned(payload211) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload211).reinterpret_as_int64()) + + () + } + FloatBits(payload212) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload212).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload207).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload214) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload214 { + Signed(payload215) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload215) + + () + } + Unsigned(payload216) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload216).reinterpret_as_int64()) + + () + } + FloatBits(payload217) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload217).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload207).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload219) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr220 = mbt_ffi_str2ptr(payload219) + mbt_ffi_store32((iter_base) + 72, payload219.length()) + mbt_ffi_store32((iter_base) + 68, ptr220) + cleanup_list.push(ptr220) + + () + } + } + + () + } + } + + () + } + F64Type(payload221) => { + mbt_ffi_store8((iter_base) + 0, (11)) + + match (payload221) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload223) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload223).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload225) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload225 { + Signed(payload226) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload226) + + () + } + Unsigned(payload227) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload227).reinterpret_as_int64()) + + () + } + FloatBits(payload228) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload228).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload223).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload230) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload230 { + Signed(payload231) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload231) + + () + } + Unsigned(payload232) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload232).reinterpret_as_int64()) + + () + } + FloatBits(payload233) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload233).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload223).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload235) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr236 = mbt_ffi_str2ptr(payload235) + mbt_ffi_store32((iter_base) + 72, payload235.length()) + mbt_ffi_store32((iter_base) + 68, ptr236) + cleanup_list.push(ptr236) + + () + } + } + + () + } + } + + () + } + CharType => { + mbt_ffi_store8((iter_base) + 0, (12)) + + () + } + StringType => { + mbt_ffi_store8((iter_base) + 0, (13)) + + () + } + RecordType(payload239) => { + mbt_ffi_store8((iter_base) + 0, (14)) + + let address260 = mbt_ffi_malloc((payload239).length() * 68); + for index261 = 0; index261 < (payload239).length(); index261 = index261 + 1 { + let iter_elem : @types.NamedFieldType = (payload239)[(index261)] + let iter_base = address260 + (index261 * 68); + + let ptr240 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr240) + mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload242) => { + mbt_ffi_store8((iter_base) + 12, (1)) + + let ptr243 = mbt_ffi_str2ptr(payload242) + mbt_ffi_store32((iter_base) + 20, payload242.length()) + mbt_ffi_store32((iter_base) + 16, ptr243) + cleanup_list.push(ptr243) + + () + } + } + + let address245 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index246 = 0; index246 < (((iter_elem).metadata).aliases).length(); index246 = index246 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index246)] + let iter_base = address245 + (index246 * 8); + + let ptr244 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr244) + cleanup_list.push(ptr244) + + } + mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 24, address245) + + let address248 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index249 = 0; index249 < (((iter_elem).metadata).examples).length(); index249 = index249 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index249)] + let iter_base = address248 + (index249 * 8); + + let ptr247 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr247) + cleanup_list.push(ptr247) + + } + mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 32, address248) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload251) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + let ptr252 = mbt_ffi_str2ptr(payload251) + mbt_ffi_store32((iter_base) + 48, payload251.length()) + mbt_ffi_store32((iter_base) + 44, ptr252) + cleanup_list.push(ptr252) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 52, (0)) + + () + } + Some(payload254) => { + mbt_ffi_store8((iter_base) + 52, (1)) + + match payload254 { + Multimodal => { + mbt_ffi_store8((iter_base) + 56, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 56, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 56, (2)) + + () + } + Other(payload258) => { + mbt_ffi_store8((iter_base) + 56, (3)) + + let ptr259 = mbt_ffi_str2ptr(payload258) + mbt_ffi_store32((iter_base) + 64, payload258.length()) + mbt_ffi_store32((iter_base) + 60, ptr259) + cleanup_list.push(ptr259) + + () + } + } + + () + } + } + cleanup_list.push(ptr240) + cleanup_list.push(address245) + cleanup_list.push(address248) + + } + mbt_ffi_store32((iter_base) + 12, (payload239).length()) + mbt_ffi_store32((iter_base) + 8, address260) + cleanup_list.push(address260) + + () + } + VariantType(payload262) => { + mbt_ffi_store8((iter_base) + 0, (15)) + + let address285 = mbt_ffi_malloc((payload262).length() * 72); + for index286 = 0; index286 < (payload262).length(); index286 = index286 + 1 { + let iter_elem : @types.VariantCaseType = (payload262)[(index286)] + let iter_base = address285 + (index286 * 72); + + let ptr263 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr263) + + match ((iter_elem).payload) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload265) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload265) + + () + } + } + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload267) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr268 = mbt_ffi_str2ptr(payload267) + mbt_ffi_store32((iter_base) + 24, payload267.length()) + mbt_ffi_store32((iter_base) + 20, ptr268) + cleanup_list.push(ptr268) + + () + } + } + + let address270 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index271 = 0; index271 < (((iter_elem).metadata).aliases).length(); index271 = index271 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index271)] + let iter_base = address270 + (index271 * 8); + + let ptr269 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr269) + cleanup_list.push(ptr269) + + } + mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 28, address270) + + let address273 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index274 = 0; index274 < (((iter_elem).metadata).examples).length(); index274 = index274 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index274)] + let iter_base = address273 + (index274 * 8); + + let ptr272 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr272) + cleanup_list.push(ptr272) + + } + mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 36, address273) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 44, (0)) + + () + } + Some(payload276) => { + mbt_ffi_store8((iter_base) + 44, (1)) + + let ptr277 = mbt_ffi_str2ptr(payload276) + mbt_ffi_store32((iter_base) + 52, payload276.length()) + mbt_ffi_store32((iter_base) + 48, ptr277) + cleanup_list.push(ptr277) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 56, (0)) + + () + } + Some(payload279) => { + mbt_ffi_store8((iter_base) + 56, (1)) + + match payload279 { + Multimodal => { + mbt_ffi_store8((iter_base) + 60, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 60, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 60, (2)) + + () + } + Other(payload283) => { + mbt_ffi_store8((iter_base) + 60, (3)) + + let ptr284 = mbt_ffi_str2ptr(payload283) + mbt_ffi_store32((iter_base) + 68, payload283.length()) + mbt_ffi_store32((iter_base) + 64, ptr284) + cleanup_list.push(ptr284) + + () + } + } + + () + } + } + cleanup_list.push(ptr263) + cleanup_list.push(address270) + cleanup_list.push(address273) + + } + mbt_ffi_store32((iter_base) + 12, (payload262).length()) + mbt_ffi_store32((iter_base) + 8, address285) + cleanup_list.push(address285) + + () + } + EnumType(payload287) => { + mbt_ffi_store8((iter_base) + 0, (16)) + + let address289 = mbt_ffi_malloc((payload287).length() * 8); + for index290 = 0; index290 < (payload287).length(); index290 = index290 + 1 { + let iter_elem : String = (payload287)[(index290)] + let iter_base = address289 + (index290 * 8); + + let ptr288 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr288) + cleanup_list.push(ptr288) + + } + mbt_ffi_store32((iter_base) + 12, (payload287).length()) + mbt_ffi_store32((iter_base) + 8, address289) + cleanup_list.push(address289) + + () + } + FlagsType(payload291) => { + mbt_ffi_store8((iter_base) + 0, (17)) + + let address293 = mbt_ffi_malloc((payload291).length() * 8); + for index294 = 0; index294 < (payload291).length(); index294 = index294 + 1 { + let iter_elem : String = (payload291)[(index294)] + let iter_base = address293 + (index294 * 8); + + let ptr292 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr292) + cleanup_list.push(ptr292) + + } + mbt_ffi_store32((iter_base) + 12, (payload291).length()) + mbt_ffi_store32((iter_base) + 8, address293) + cleanup_list.push(address293) + + () + } + TupleType(payload295) => { + mbt_ffi_store8((iter_base) + 0, (18)) + + let address296 = mbt_ffi_malloc((payload295).length() * 4); + for index297 = 0; index297 < (payload295).length(); index297 = index297 + 1 { + let iter_elem : Int = (payload295)[(index297)] + let iter_base = address296 + (index297 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload295).length()) + mbt_ffi_store32((iter_base) + 8, address296) + cleanup_list.push(address296) + + () + } + ListType(payload298) => { + mbt_ffi_store8((iter_base) + 0, (19)) + mbt_ffi_store32((iter_base) + 8, payload298) + + () + } + FixedListType(payload299) => { + mbt_ffi_store8((iter_base) + 0, (20)) + mbt_ffi_store32((iter_base) + 8, (payload299).element) + mbt_ffi_store32((iter_base) + 12, ((payload299).length).reinterpret_as_int()) + + () + } + MapType(payload300) => { + mbt_ffi_store8((iter_base) + 0, (21)) + mbt_ffi_store32((iter_base) + 8, (payload300).key) + mbt_ffi_store32((iter_base) + 12, (payload300).value) + + () + } + OptionType(payload301) => { + mbt_ffi_store8((iter_base) + 0, (22)) + mbt_ffi_store32((iter_base) + 8, payload301) + + () + } + ResultType(payload302) => { + mbt_ffi_store8((iter_base) + 0, (23)) + + match ((payload302).ok) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload304) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload304) + + () + } + } + + match ((payload302).err) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload306) => { + mbt_ffi_store8((iter_base) + 16, (1)) + mbt_ffi_store32((iter_base) + 20, payload306) + + () + } + } + + () + } + TextType(payload307) => { + mbt_ffi_store8((iter_base) + 0, (24)) + + match ((payload307).languages) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload309) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address311 = mbt_ffi_malloc((payload309).length() * 8); + for index312 = 0; index312 < (payload309).length(); index312 = index312 + 1 { + let iter_elem : String = (payload309)[(index312)] + let iter_base = address311 + (index312 * 8); + + let ptr310 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr310) + cleanup_list.push(ptr310) + + } + mbt_ffi_store32((iter_base) + 16, (payload309).length()) + mbt_ffi_store32((iter_base) + 12, address311) + cleanup_list.push(address311) + + () + } + } + + match ((payload307).min_length) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload314) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload314).reinterpret_as_int()) + + () + } + } + + match ((payload307).max_length) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) + + () + } + Some(payload316) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload316).reinterpret_as_int()) + + () + } + } + + match ((payload307).regex) { + None => { + mbt_ffi_store8((iter_base) + 36, (0)) + + () + } + Some(payload318) => { + mbt_ffi_store8((iter_base) + 36, (1)) + + let ptr319 = mbt_ffi_str2ptr(payload318) + mbt_ffi_store32((iter_base) + 44, payload318.length()) + mbt_ffi_store32((iter_base) + 40, ptr319) + cleanup_list.push(ptr319) + + () + } + } + + () + } + BinaryType(payload320) => { + mbt_ffi_store8((iter_base) + 0, (25)) + + match ((payload320).mime_types) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload322) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address324 = mbt_ffi_malloc((payload322).length() * 8); + for index325 = 0; index325 < (payload322).length(); index325 = index325 + 1 { + let iter_elem : String = (payload322)[(index325)] + let iter_base = address324 + (index325 * 8); + + let ptr323 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr323) + cleanup_list.push(ptr323) + + } + mbt_ffi_store32((iter_base) + 16, (payload322).length()) + mbt_ffi_store32((iter_base) + 12, address324) + cleanup_list.push(address324) + + () + } + } + + match ((payload320).min_bytes) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload327) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload327).reinterpret_as_int()) + + () + } + } + + match ((payload320).max_bytes) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) + + () + } + Some(payload329) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload329).reinterpret_as_int()) + + () + } + } + + () + } + PathType(payload330) => { + mbt_ffi_store8((iter_base) + 0, (26)) + mbt_ffi_store8((iter_base) + 8, (payload330).direction.ordinal()) + mbt_ffi_store8((iter_base) + 9, (payload330).kind.ordinal()) + + match ((payload330).allowed_mime_types) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload332) => { + mbt_ffi_store8((iter_base) + 12, (1)) + + let address334 = mbt_ffi_malloc((payload332).length() * 8); + for index335 = 0; index335 < (payload332).length(); index335 = index335 + 1 { + let iter_elem : String = (payload332)[(index335)] + let iter_base = address334 + (index335 * 8); + + let ptr333 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr333) + cleanup_list.push(ptr333) + + } + mbt_ffi_store32((iter_base) + 20, (payload332).length()) + mbt_ffi_store32((iter_base) + 16, address334) + cleanup_list.push(address334) + + () + } + } + + match ((payload330).allowed_extensions) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload337) => { + mbt_ffi_store8((iter_base) + 24, (1)) + + let address339 = mbt_ffi_malloc((payload337).length() * 8); + for index340 = 0; index340 < (payload337).length(); index340 = index340 + 1 { + let iter_elem : String = (payload337)[(index340)] + let iter_base = address339 + (index340 * 8); + + let ptr338 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr338) + cleanup_list.push(ptr338) + + } + mbt_ffi_store32((iter_base) + 32, (payload337).length()) + mbt_ffi_store32((iter_base) + 28, address339) + cleanup_list.push(address339) + + () + } + } + + () + } + UrlType(payload341) => { + mbt_ffi_store8((iter_base) + 0, (27)) + + match ((payload341).allowed_schemes) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload343) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address345 = mbt_ffi_malloc((payload343).length() * 8); + for index346 = 0; index346 < (payload343).length(); index346 = index346 + 1 { + let iter_elem : String = (payload343)[(index346)] + let iter_base = address345 + (index346 * 8); + + let ptr344 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr344) + cleanup_list.push(ptr344) + + } + mbt_ffi_store32((iter_base) + 16, (payload343).length()) + mbt_ffi_store32((iter_base) + 12, address345) + cleanup_list.push(address345) + + () + } + } + + match ((payload341).allowed_hosts) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload348) => { + mbt_ffi_store8((iter_base) + 20, (1)) + + let address350 = mbt_ffi_malloc((payload348).length() * 8); + for index351 = 0; index351 < (payload348).length(); index351 = index351 + 1 { + let iter_elem : String = (payload348)[(index351)] + let iter_base = address350 + (index351 * 8); + + let ptr349 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr349) + cleanup_list.push(ptr349) + + } + mbt_ffi_store32((iter_base) + 28, (payload348).length()) + mbt_ffi_store32((iter_base) + 24, address350) + cleanup_list.push(address350) + + () + } + } + + () + } + DatetimeType => { + mbt_ffi_store8((iter_base) + 0, (28)) + + () + } + DurationType => { + mbt_ffi_store8((iter_base) + 0, (29)) + + () + } + QuantityType(payload354) => { + mbt_ffi_store8((iter_base) + 0, (30)) + + let ptr355 = mbt_ffi_str2ptr((payload354).base_unit) + mbt_ffi_store32((iter_base) + 12, (payload354).base_unit.length()) + mbt_ffi_store32((iter_base) + 8, ptr355) + + let address357 = mbt_ffi_malloc(((payload354).allowed_suffixes).length() * 8); + for index358 = 0; index358 < ((payload354).allowed_suffixes).length(); index358 = index358 + 1 { + let iter_elem : String = ((payload354).allowed_suffixes)[(index358)] + let iter_base = address357 + (index358 * 8); + + let ptr356 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr356) + cleanup_list.push(ptr356) + + } + mbt_ffi_store32((iter_base) + 20, ((payload354).allowed_suffixes).length()) + mbt_ffi_store32((iter_base) + 16, address357) + + match ((payload354).min) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload360) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload360).mantissa) + mbt_ffi_store32((iter_base) + 40, (payload360).scale) + + let ptr361 = mbt_ffi_str2ptr((payload360).unit) + mbt_ffi_store32((iter_base) + 48, (payload360).unit.length()) + mbt_ffi_store32((iter_base) + 44, ptr361) + cleanup_list.push(ptr361) + + () + } + } + + match ((payload354).max) { + None => { + mbt_ffi_store8((iter_base) + 56, (0)) + + () + } + Some(payload363) => { + mbt_ffi_store8((iter_base) + 56, (1)) + mbt_ffi_store64((iter_base) + 64, (payload363).mantissa) + mbt_ffi_store32((iter_base) + 72, (payload363).scale) + + let ptr364 = mbt_ffi_str2ptr((payload363).unit) + mbt_ffi_store32((iter_base) + 80, (payload363).unit.length()) + mbt_ffi_store32((iter_base) + 76, ptr364) + cleanup_list.push(ptr364) + + () + } + } + cleanup_list.push(ptr355) + cleanup_list.push(address357) + + () + } + UnionType(payload365) => { + mbt_ffi_store8((iter_base) + 0, (31)) + + let address401 = mbt_ffi_malloc(((payload365).branches).length() * 92); + for index402 = 0; index402 < ((payload365).branches).length(); index402 = index402 + 1 { + let iter_elem : @types.UnionBranch = ((payload365).branches)[(index402)] + let iter_base = address401 + (index402 * 92); + + let ptr366 = mbt_ffi_str2ptr((iter_elem).tag) + mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) + mbt_ffi_store32((iter_base) + 0, ptr366) + mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + + match (iter_elem).discriminator { + Prefix(payload367) => { + mbt_ffi_store8((iter_base) + 12, (0)) + + let ptr368 = mbt_ffi_str2ptr(payload367) + mbt_ffi_store32((iter_base) + 20, payload367.length()) + mbt_ffi_store32((iter_base) + 16, ptr368) + cleanup_list.push(ptr368) + + () + } + Suffix(payload369) => { + mbt_ffi_store8((iter_base) + 12, (1)) + + let ptr370 = mbt_ffi_str2ptr(payload369) + mbt_ffi_store32((iter_base) + 20, payload369.length()) + mbt_ffi_store32((iter_base) + 16, ptr370) + cleanup_list.push(ptr370) + + () + } + Contains(payload371) => { + mbt_ffi_store8((iter_base) + 12, (2)) + + let ptr372 = mbt_ffi_str2ptr(payload371) + mbt_ffi_store32((iter_base) + 20, payload371.length()) + mbt_ffi_store32((iter_base) + 16, ptr372) + cleanup_list.push(ptr372) + + () + } + Regex(payload373) => { + mbt_ffi_store8((iter_base) + 12, (3)) + + let ptr374 = mbt_ffi_str2ptr(payload373) + mbt_ffi_store32((iter_base) + 20, payload373.length()) + mbt_ffi_store32((iter_base) + 16, ptr374) + cleanup_list.push(ptr374) + + () + } + FieldEquals(payload375) => { + mbt_ffi_store8((iter_base) + 12, (4)) + + let ptr376 = mbt_ffi_str2ptr((payload375).field_name) + mbt_ffi_store32((iter_base) + 20, (payload375).field_name.length()) + mbt_ffi_store32((iter_base) + 16, ptr376) + + match ((payload375).literal) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload378) => { + mbt_ffi_store8((iter_base) + 24, (1)) + + let ptr379 = mbt_ffi_str2ptr(payload378) + mbt_ffi_store32((iter_base) + 32, payload378.length()) + mbt_ffi_store32((iter_base) + 28, ptr379) + cleanup_list.push(ptr379) + + () + } + } + cleanup_list.push(ptr376) + + () + } + FieldAbsent(payload380) => { + mbt_ffi_store8((iter_base) + 12, (5)) + + let ptr381 = mbt_ffi_str2ptr(payload380) + mbt_ffi_store32((iter_base) + 20, payload380.length()) + mbt_ffi_store32((iter_base) + 16, ptr381) + cleanup_list.push(ptr381) + + () + } + } + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 36, (0)) + + () + } + Some(payload383) => { + mbt_ffi_store8((iter_base) + 36, (1)) + + let ptr384 = mbt_ffi_str2ptr(payload383) + mbt_ffi_store32((iter_base) + 44, payload383.length()) + mbt_ffi_store32((iter_base) + 40, ptr384) + cleanup_list.push(ptr384) + + () + } + } + + let address386 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index387 = 0; index387 < (((iter_elem).metadata).aliases).length(); index387 = index387 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index387)] + let iter_base = address386 + (index387 * 8); + + let ptr385 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr385) + cleanup_list.push(ptr385) + + } + mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 48, address386) + + let address389 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index390 = 0; index390 < (((iter_elem).metadata).examples).length(); index390 = index390 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index390)] + let iter_base = address389 + (index390 * 8); + + let ptr388 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr388) + cleanup_list.push(ptr388) + + } + mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 56, address389) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload392) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr393 = mbt_ffi_str2ptr(payload392) + mbt_ffi_store32((iter_base) + 72, payload392.length()) + mbt_ffi_store32((iter_base) + 68, ptr393) + cleanup_list.push(ptr393) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 76, (0)) + + () + } + Some(payload395) => { + mbt_ffi_store8((iter_base) + 76, (1)) + + match payload395 { + Multimodal => { + mbt_ffi_store8((iter_base) + 80, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 80, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 80, (2)) + + () + } + Other(payload399) => { + mbt_ffi_store8((iter_base) + 80, (3)) + + let ptr400 = mbt_ffi_str2ptr(payload399) + mbt_ffi_store32((iter_base) + 88, payload399.length()) + mbt_ffi_store32((iter_base) + 84, ptr400) + cleanup_list.push(ptr400) + + () + } + } + + () + } + } + cleanup_list.push(ptr366) + cleanup_list.push(address386) + cleanup_list.push(address389) + + } + mbt_ffi_store32((iter_base) + 12, ((payload365).branches).length()) + mbt_ffi_store32((iter_base) + 8, address401) + cleanup_list.push(address401) + + () + } + SecretType(payload403) => { + mbt_ffi_store8((iter_base) + 0, (32)) + + match ((payload403).category) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload405) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr406 = mbt_ffi_str2ptr(payload405) + mbt_ffi_store32((iter_base) + 16, payload405.length()) + mbt_ffi_store32((iter_base) + 12, ptr406) + cleanup_list.push(ptr406) + + () + } + } + + () + } + QuotaTokenType(payload407) => { + mbt_ffi_store8((iter_base) + 0, (33)) + + match ((payload407).resource_name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload409) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr410 = mbt_ffi_str2ptr(payload409) + mbt_ffi_store32((iter_base) + 16, payload409.length()) + mbt_ffi_store32((iter_base) + 12, ptr410) + cleanup_list.push(ptr410) + + () + } + } + + () + } + FutureType(payload411) => { + mbt_ffi_store8((iter_base) + 0, (34)) + + match (payload411) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload413) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload413) + + () + } + } + + () + } + StreamType(payload414) => { + mbt_ffi_store8((iter_base) + 0, (35)) + + match (payload414) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload416) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload416) + + () + } + } + + () + } + } + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 88, (0)) + + () + } + Some(payload418) => { + mbt_ffi_store8((iter_base) + 88, (1)) + + let ptr419 = mbt_ffi_str2ptr(payload418) + mbt_ffi_store32((iter_base) + 96, payload418.length()) + mbt_ffi_store32((iter_base) + 92, ptr419) + cleanup_list.push(ptr419) + + () + } + } + + let address421 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index422 = 0; index422 < (((iter_elem).metadata).aliases).length(); index422 = index422 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index422)] + let iter_base = address421 + (index422 * 8); + + let ptr420 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr420) + cleanup_list.push(ptr420) + + } + mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 100, address421) + + let address424 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index425 = 0; index425 < (((iter_elem).metadata).examples).length(); index425 = index425 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index425)] + let iter_base = address424 + (index425 * 8); + + let ptr423 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr423) + cleanup_list.push(ptr423) + + } + mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 108, address424) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 116, (0)) + + () + } + Some(payload427) => { + mbt_ffi_store8((iter_base) + 116, (1)) + + let ptr428 = mbt_ffi_str2ptr(payload427) + mbt_ffi_store32((iter_base) + 124, payload427.length()) + mbt_ffi_store32((iter_base) + 120, ptr428) + cleanup_list.push(ptr428) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 128, (0)) + + () + } + Some(payload430) => { + mbt_ffi_store8((iter_base) + 128, (1)) + + match payload430 { + Multimodal => { + mbt_ffi_store8((iter_base) + 132, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 132, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 132, (2)) + + () + } + Other(payload434) => { + mbt_ffi_store8((iter_base) + 132, (3)) + + let ptr435 = mbt_ffi_str2ptr(payload434) + mbt_ffi_store32((iter_base) + 140, payload434.length()) + mbt_ffi_store32((iter_base) + 136, ptr435) + cleanup_list.push(ptr435) + + () + } + } + + () + } + } + cleanup_list.push(address421) + cleanup_list.push(address424) + + } + mbt_ffi_store32((iter_base) + 12, ((((iter_elem).value).graph).type_nodes).length()) + mbt_ffi_store32((iter_base) + 8, address436) + + let address442 = mbt_ffi_malloc(((((iter_elem).value).graph).defs).length() * 24); + for index443 = 0; index443 < ((((iter_elem).value).graph).defs).length(); index443 = index443 + 1 { + let iter_elem : @types.SchemaTypeDef = ((((iter_elem).value).graph).defs)[(index443)] + let iter_base = address442 + (index443 * 24); + + let ptr438 = mbt_ffi_str2ptr((iter_elem).id) + mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) + mbt_ffi_store32((iter_base) + 0, ptr438) + + match ((iter_elem).name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload440) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr441 = mbt_ffi_str2ptr(payload440) + mbt_ffi_store32((iter_base) + 16, payload440.length()) + mbt_ffi_store32((iter_base) + 12, ptr441) + cleanup_list.push(ptr441) + + () + } + } + mbt_ffi_store32((iter_base) + 20, (iter_elem).body) + cleanup_list.push(ptr438) + + } + mbt_ffi_store32((iter_base) + 20, ((((iter_elem).value).graph).defs).length()) + mbt_ffi_store32((iter_base) + 16, address442) + mbt_ffi_store32((iter_base) + 24, (((iter_elem).value).graph).root) + + let address514 = mbt_ffi_malloc(((((iter_elem).value).value).value_nodes).length() * 32); + for index515 = 0; index515 < ((((iter_elem).value).value).value_nodes).length(); index515 = index515 + 1 { + let iter_elem : @types.SchemaValueNode = ((((iter_elem).value).value).value_nodes)[(index515)] + let iter_base = address514 + (index515 * 32); + + match iter_elem { + BoolValue(payload444) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload444 { 1 } else { 0 })) + + () + } + S8Value(payload445) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload445)) + + () + } + S16Value(payload446) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload446)) + + () + } + S32Value(payload447) => { + mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload447) + + () + } + S64Value(payload448) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload448) + + () + } + U8Value(payload449) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload449).to_int()) + + () + } + U16Value(payload450) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload450).reinterpret_as_int()) + + () + } + U32Value(payload451) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload451).reinterpret_as_int()) + + () + } + U64Value(payload452) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload452).reinterpret_as_int64()) + + () + } + F32Value(payload453) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload453) + + () + } + F64Value(payload454) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload454) + + () + } + CharValue(payload455) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload455).to_int()) + + () + } + StringValue(payload456) => { + mbt_ffi_store8((iter_base) + 0, (12)) + + let ptr457 = mbt_ffi_str2ptr(payload456) + mbt_ffi_store32((iter_base) + 12, payload456.length()) + mbt_ffi_store32((iter_base) + 8, ptr457) + cleanup_list.push(ptr457) + + () + } + RecordValue(payload458) => { + mbt_ffi_store8((iter_base) + 0, (13)) + + let address459 = mbt_ffi_malloc((payload458).length() * 4); + for index460 = 0; index460 < (payload458).length(); index460 = index460 + 1 { + let iter_elem : Int = (payload458)[(index460)] + let iter_base = address459 + (index460 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload458).length()) + mbt_ffi_store32((iter_base) + 8, address459) + cleanup_list.push(address459) + + () + } + VariantValue(payload461) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload461).case).reinterpret_as_int()) + + match ((payload461).payload) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload463) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload463) + + () + } + } + + () + } + EnumValue(payload464) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload464).reinterpret_as_int()) + + () + } + FlagsValue(payload465) => { + mbt_ffi_store8((iter_base) + 0, (16)) + + let address466 = mbt_ffi_malloc((payload465).length() * 1); + for index467 = 0; index467 < (payload465).length(); index467 = index467 + 1 { + let iter_elem : Bool = (payload465)[(index467)] + let iter_base = address466 + (index467 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + + } + mbt_ffi_store32((iter_base) + 12, (payload465).length()) + mbt_ffi_store32((iter_base) + 8, address466) + cleanup_list.push(address466) + + () + } + TupleValue(payload468) => { + mbt_ffi_store8((iter_base) + 0, (17)) + + let address469 = mbt_ffi_malloc((payload468).length() * 4); + for index470 = 0; index470 < (payload468).length(); index470 = index470 + 1 { + let iter_elem : Int = (payload468)[(index470)] + let iter_base = address469 + (index470 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload468).length()) + mbt_ffi_store32((iter_base) + 8, address469) + cleanup_list.push(address469) + + () + } + ListValue(payload471) => { + mbt_ffi_store8((iter_base) + 0, (18)) + + let address472 = mbt_ffi_malloc((payload471).length() * 4); + for index473 = 0; index473 < (payload471).length(); index473 = index473 + 1 { + let iter_elem : Int = (payload471)[(index473)] + let iter_base = address472 + (index473 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload471).length()) + mbt_ffi_store32((iter_base) + 8, address472) + cleanup_list.push(address472) + + () + } + FixedListValue(payload474) => { + mbt_ffi_store8((iter_base) + 0, (19)) + + let address475 = mbt_ffi_malloc((payload474).length() * 4); + for index476 = 0; index476 < (payload474).length(); index476 = index476 + 1 { + let iter_elem : Int = (payload474)[(index476)] + let iter_base = address475 + (index476 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload474).length()) + mbt_ffi_store32((iter_base) + 8, address475) + cleanup_list.push(address475) + + () + } + MapValue(payload477) => { + mbt_ffi_store8((iter_base) + 0, (20)) + + let address478 = mbt_ffi_malloc((payload477).length() * 8); + for index479 = 0; index479 < (payload477).length(); index479 = index479 + 1 { + let iter_elem : @types.MapEntry = (payload477)[(index479)] + let iter_base = address478 + (index479 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + + } + mbt_ffi_store32((iter_base) + 12, (payload477).length()) + mbt_ffi_store32((iter_base) + 8, address478) + cleanup_list.push(address478) + + () + } + OptionValue(payload480) => { + mbt_ffi_store8((iter_base) + 0, (21)) + + match (payload480) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload482) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload482) + + () + } + } + + () + } + ResultValue(payload483) => { + mbt_ffi_store8((iter_base) + 0, (22)) + + match payload483 { + OkValue(payload484) => { + mbt_ffi_store8((iter_base) + 8, (0)) + + match (payload484) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload486) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload486) + + () + } + } + + () + } + ErrValue(payload487) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match (payload487) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload489) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload489) + + () + } + } + + () + } + } + + () + } + TextValue(payload490) => { + mbt_ffi_store8((iter_base) + 0, (23)) + + let ptr491 = mbt_ffi_str2ptr((payload490).text) + mbt_ffi_store32((iter_base) + 12, (payload490).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr491) + + match ((payload490).language) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload493) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr494 = mbt_ffi_str2ptr(payload493) + mbt_ffi_store32((iter_base) + 24, payload493.length()) + mbt_ffi_store32((iter_base) + 20, ptr494) + cleanup_list.push(ptr494) + + () + } + } + cleanup_list.push(ptr491) + + () + } + BinaryValue(payload495) => { + mbt_ffi_store8((iter_base) + 0, (24)) + + let ptr496 = mbt_ffi_bytes2ptr((payload495).bytes) + + mbt_ffi_store32((iter_base) + 12, (payload495).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr496) + + match ((payload495).mime_type) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload498) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr499 = mbt_ffi_str2ptr(payload498) + mbt_ffi_store32((iter_base) + 24, payload498.length()) + mbt_ffi_store32((iter_base) + 20, ptr499) + cleanup_list.push(ptr499) + + () + } + } + cleanup_list.push(ptr496) + + () + } + PathValue(payload500) => { + mbt_ffi_store8((iter_base) + 0, (25)) + + let ptr501 = mbt_ffi_str2ptr(payload500) + mbt_ffi_store32((iter_base) + 12, payload500.length()) + mbt_ffi_store32((iter_base) + 8, ptr501) + cleanup_list.push(ptr501) + + () + } + UrlValue(payload502) => { + mbt_ffi_store8((iter_base) + 0, (26)) + + let ptr503 = mbt_ffi_str2ptr(payload502) + mbt_ffi_store32((iter_base) + 12, payload502.length()) + mbt_ffi_store32((iter_base) + 8, ptr503) + cleanup_list.push(ptr503) + + () + } + DatetimeValue(payload504) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload504).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload504).nanoseconds).reinterpret_as_int()) + + () + } + DurationValue(payload505) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload505).nanoseconds) + + () + } + QuantityValueNode(payload506) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload506).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload506).scale) + + let ptr507 = mbt_ffi_str2ptr((payload506).unit) + mbt_ffi_store32((iter_base) + 24, (payload506).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr507) + cleanup_list.push(ptr507) + + () + } + UnionValue(payload508) => { + mbt_ffi_store8((iter_base) + 0, (30)) + + let ptr509 = mbt_ffi_str2ptr((payload508).tag) + mbt_ffi_store32((iter_base) + 12, (payload508).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr509) + mbt_ffi_store32((iter_base) + 16, (payload508).body) + cleanup_list.push(ptr509) + + () + } + SecretValue(payload510) => { + mbt_ffi_store8((iter_base) + 0, (31)) + + let ptr511 = mbt_ffi_str2ptr((payload510).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload510).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr511) + cleanup_list.push(ptr511) + + () + } + QuotaTokenHandle(payload512) => { + mbt_ffi_store8((iter_base) + 0, (32)) + + let @types.QuotaToken(handle513) = payload512 + mbt_ffi_store32((iter_base) + 8, handle513) + + () + } + } + + } mbt_ffi_store32((iter_base) + 32, ((((iter_elem).value).value).value_nodes).length()) - mbt_ffi_store32((iter_base) + 28, address364) + mbt_ffi_store32((iter_base) + 28, address514) mbt_ffi_store32((iter_base) + 36, (((iter_elem).value).value).root) cleanup_list.push(address73) - cleanup_list.push(address286) - cleanup_list.push(address292) - cleanup_list.push(address364) + cleanup_list.push(address436) + cleanup_list.push(address442) + cleanup_list.push(address514) + + } + let result : Int = wasmImportConstructorWasmRpc(ptr, agent_type_name.length(), address66, ((constructor_).value_nodes).length(), (constructor_).root, lowered, lowered70, lowered71, address516, (agent_config).length()); + let ret = WasmRpc::WasmRpc(result) + mbt_ffi_free(ptr) + mbt_ffi_free(address66) + mbt_ffi_free(address516) + + cleanup_list.each(mbt_ffi_free) + return ret + +} +///| +/// Invokes a remote method with the given parameters, and awaits the result. +/// +/// `input` encodes the method's parameter list; the result is `none` for +/// a `unit` output and `some(value)` for a `single` output. +pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @types.SchemaValueTree) -> Result[@types.SchemaValueTree?, RpcError] { + let cleanup_list : Array[Int] = [] + + let WasmRpc(handle) = self + + let ptr = mbt_ffi_str2ptr(method_name) + + let address67 = mbt_ffi_malloc(((input).value_nodes).length() * 32); + for index68 = 0; index68 < ((input).value_nodes).length(); index68 = index68 + 1 { + let iter_elem : @types.SchemaValueNode = ((input).value_nodes)[(index68)] + let iter_base = address67 + (index68 * 32); + + match iter_elem { + BoolValue(payload) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) + + () + } + S8Value(payload0) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) + + () + } + S16Value(payload1) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) + + () + } + S32Value(payload2) => { + mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload2) + + () + } + S64Value(payload3) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload3) + + () + } + U8Value(payload4) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) + + () + } + U16Value(payload5) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) + + () + } + U32Value(payload6) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) + + () + } + U64Value(payload7) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) + + () + } + F32Value(payload8) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload8) + + () + } + F64Value(payload9) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload9) + + () + } + CharValue(payload10) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) + + () + } + StringValue(payload11) => { + mbt_ffi_store8((iter_base) + 0, (12)) + + let ptr12 = mbt_ffi_str2ptr(payload11) + mbt_ffi_store32((iter_base) + 12, payload11.length()) + mbt_ffi_store32((iter_base) + 8, ptr12) + cleanup_list.push(ptr12) + + () + } + RecordValue(payload13) => { + mbt_ffi_store8((iter_base) + 0, (13)) + + let address = mbt_ffi_malloc((payload13).length() * 4); + for index = 0; index < (payload13).length(); index = index + 1 { + let iter_elem : Int = (payload13)[(index)] + let iter_base = address + (index * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload13).length()) + mbt_ffi_store32((iter_base) + 8, address) + cleanup_list.push(address) + + () + } + VariantValue(payload14) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) + + match ((payload14).payload) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload16) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload16) + + () + } + } + + () + } + EnumValue(payload17) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) + + () + } + FlagsValue(payload18) => { + mbt_ffi_store8((iter_base) + 0, (16)) + + let address19 = mbt_ffi_malloc((payload18).length() * 1); + for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { + let iter_elem : Bool = (payload18)[(index20)] + let iter_base = address19 + (index20 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + + } + mbt_ffi_store32((iter_base) + 12, (payload18).length()) + mbt_ffi_store32((iter_base) + 8, address19) + cleanup_list.push(address19) + + () + } + TupleValue(payload21) => { + mbt_ffi_store8((iter_base) + 0, (17)) + + let address22 = mbt_ffi_malloc((payload21).length() * 4); + for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { + let iter_elem : Int = (payload21)[(index23)] + let iter_base = address22 + (index23 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload21).length()) + mbt_ffi_store32((iter_base) + 8, address22) + cleanup_list.push(address22) + + () + } + ListValue(payload24) => { + mbt_ffi_store8((iter_base) + 0, (18)) + + let address25 = mbt_ffi_malloc((payload24).length() * 4); + for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { + let iter_elem : Int = (payload24)[(index26)] + let iter_base = address25 + (index26 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload24).length()) + mbt_ffi_store32((iter_base) + 8, address25) + cleanup_list.push(address25) + + () + } + FixedListValue(payload27) => { + mbt_ffi_store8((iter_base) + 0, (19)) + + let address28 = mbt_ffi_malloc((payload27).length() * 4); + for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { + let iter_elem : Int = (payload27)[(index29)] + let iter_base = address28 + (index29 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload27).length()) + mbt_ffi_store32((iter_base) + 8, address28) + cleanup_list.push(address28) + + () + } + MapValue(payload30) => { + mbt_ffi_store8((iter_base) + 0, (20)) + + let address31 = mbt_ffi_malloc((payload30).length() * 8); + for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { + let iter_elem : @types.MapEntry = (payload30)[(index32)] + let iter_base = address31 + (index32 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + + } + mbt_ffi_store32((iter_base) + 12, (payload30).length()) + mbt_ffi_store32((iter_base) + 8, address31) + cleanup_list.push(address31) + + () + } + OptionValue(payload33) => { + mbt_ffi_store8((iter_base) + 0, (21)) + + match (payload33) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload35) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload35) + + () + } + } + + () + } + ResultValue(payload36) => { + mbt_ffi_store8((iter_base) + 0, (22)) + + match payload36 { + OkValue(payload37) => { + mbt_ffi_store8((iter_base) + 8, (0)) + + match (payload37) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload39) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload39) + + () + } + } + + () + } + ErrValue(payload40) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match (payload40) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload42) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload42) + + () + } + } + + () + } + } + + () + } + TextValue(payload43) => { + mbt_ffi_store8((iter_base) + 0, (23)) + + let ptr44 = mbt_ffi_str2ptr((payload43).text) + mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr44) + + match ((payload43).language) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload46) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr47 = mbt_ffi_str2ptr(payload46) + mbt_ffi_store32((iter_base) + 24, payload46.length()) + mbt_ffi_store32((iter_base) + 20, ptr47) + cleanup_list.push(ptr47) + + () + } + } + cleanup_list.push(ptr44) + + () + } + BinaryValue(payload48) => { + mbt_ffi_store8((iter_base) + 0, (24)) + + let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) + + mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr49) + + match ((payload48).mime_type) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload51) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr52 = mbt_ffi_str2ptr(payload51) + mbt_ffi_store32((iter_base) + 24, payload51.length()) + mbt_ffi_store32((iter_base) + 20, ptr52) + cleanup_list.push(ptr52) + + () + } + } + cleanup_list.push(ptr49) + + () + } + PathValue(payload53) => { + mbt_ffi_store8((iter_base) + 0, (25)) + + let ptr54 = mbt_ffi_str2ptr(payload53) + mbt_ffi_store32((iter_base) + 12, payload53.length()) + mbt_ffi_store32((iter_base) + 8, ptr54) + cleanup_list.push(ptr54) + + () + } + UrlValue(payload55) => { + mbt_ffi_store8((iter_base) + 0, (26)) + + let ptr56 = mbt_ffi_str2ptr(payload55) + mbt_ffi_store32((iter_base) + 12, payload55.length()) + mbt_ffi_store32((iter_base) + 8, ptr56) + cleanup_list.push(ptr56) + + () + } + DatetimeValue(payload57) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload57).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) + + () + } + DurationValue(payload58) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) + + () + } + QuantityValueNode(payload59) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload59).scale) + + let ptr60 = mbt_ffi_str2ptr((payload59).unit) + mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr60) + cleanup_list.push(ptr60) + + () + } + UnionValue(payload61) => { + mbt_ffi_store8((iter_base) + 0, (30)) + + let ptr62 = mbt_ffi_str2ptr((payload61).tag) + mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr62) + mbt_ffi_store32((iter_base) + 16, (payload61).body) + cleanup_list.push(ptr62) + + () + } + SecretValue(payload63) => { + mbt_ffi_store8((iter_base) + 0, (31)) + + let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr64) + cleanup_list.push(ptr64) + + () + } + QuotaTokenHandle(payload65) => { + mbt_ffi_store8((iter_base) + 0, (32)) + + let @types.QuotaToken(handle66) = payload65 + mbt_ffi_store32((iter_base) + 8, handle66) + + () + } + } + + } + let return_area = mbt_ffi_malloc(44) + wasmImportMethodWasmRpcInvokeAndAwait(handle, ptr, method_name.length(), address67, ((input).value_nodes).length(), (input).root, return_area); + + let lifted344 = match (mbt_ffi_load8_u((return_area) + 0)) { + 0 => { + + let lifted98 : @types.SchemaValueTree? = match mbt_ffi_load8_u((return_area) + 4) { + 0 => Option::None + 1 => { + + let array96 : Array[@types.SchemaValueNode] = []; + for index97 = 0; index97 < (mbt_ffi_load32((return_area) + 12)); index97 = index97 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 8)) + (index97 * 32) + + let lifted95 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) + } + 1 => { + + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { + + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { + + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { + + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { + + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { + + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { + + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { + + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { + + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { + + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { + + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { + + let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::StringValue(result) + } + 13 => { + + let array : Array[Int] = []; + for index69 = 0; index69 < (mbt_ffi_load32((iter_base) + 12)); index69 = index69 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index69 * 4) + + array.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::RecordValue(array) + } + 14 => { + + let lifted : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted}) + } + 15 => { + + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { + + let array70 : Array[Bool] = []; + for index71 = 0; index71 < (mbt_ffi_load32((iter_base) + 12)); index71 = index71 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index71 * 1) + + array70.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FlagsValue(array70) + } + 17 => { + + let array72 : Array[Int] = []; + for index73 = 0; index73 < (mbt_ffi_load32((iter_base) + 12)); index73 = index73 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index73 * 4) + + array72.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::TupleValue(array72) + } + 18 => { + + let array74 : Array[Int] = []; + for index75 = 0; index75 < (mbt_ffi_load32((iter_base) + 12)); index75 = index75 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index75 * 4) + + array74.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::ListValue(array74) + } + 19 => { + + let array76 : Array[Int] = []; + for index77 = 0; index77 < (mbt_ffi_load32((iter_base) + 12)); index77 = index77 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index77 * 4) + + array76.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array76) + } + 20 => { + + let array78 : Array[@types.MapEntry] = []; + for index79 = 0; index79 < (mbt_ffi_load32((iter_base) + 12)); index79 = index79 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index79 * 8) + + array78.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::MapValue(array78) + } + 21 => { + + let lifted80 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaValueNode::OptionValue(lifted80) + } + 22 => { + + let lifted83 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { + + let lifted81 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::OkValue(lifted81) + } + 1 => { + + let lifted82 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::ErrValue(lifted82) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted83) + } + 23 => { + + let result84 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted86 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result85) + } + _ => panic() + } + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result84, language : lifted86}) + } + 24 => { + + let result87 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted89 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result88) + } + _ => panic() + } + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result87, mime_type : lifted89}) + } + 25 => { + + let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::PathValue(result90) + } + 26 => { + + let result91 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UrlValue(result91) + } + 27 => { + + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + } + 28 => { + + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + } + 29 => { + + let result92 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result92}) + } + 30 => { + + let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result93, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { + + let result94 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result94}) + } + 32 => { + + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) + } + _ => panic() + } + + array96.push(lifted95) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 8)) + + Option::Some(@types.SchemaValueTree::{value_nodes : array96, root : mbt_ffi_load32((return_area) + 16)}) + } + _ => panic() + } + + Result::Ok(lifted98) + } + 1 => { + + let lifted343 = match (mbt_ffi_load8_u((return_area) + 4)) { + 0 => { + + let result99 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + + RpcError::ProtocolError(result99) + } + 1 => { + + let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + + RpcError::Denied(result100) + } + 2 => { + + let result101 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + + RpcError::NotFound(result101) + } + 3 => { + + let result102 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + + RpcError::RemoteInternalError(result102) + } + 4 => { + + let lifted342 = match (mbt_ffi_load8_u((return_area) + 8)) { + 0 => { + + let result103 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidInput(result103) + } + 1 => { + + let result104 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidMethod(result104) + } + 2 => { + + let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidType(result105) + } + 3 => { + + let result106 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidAgentId(result106) + } + 4 => { + + let array303 : Array[@types.SchemaTypeNode] = []; + for index304 = 0; index304 < (mbt_ffi_load32((return_area) + 16)); index304 = index304 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index304 * 144) + + let lifted289 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { + + @types.SchemaTypeBody::BoolType + } + 2 => { + + let lifted113 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted108 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted107 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted107) + } + _ => panic() + } + + let lifted110 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted109 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted109) + } + _ => panic() + } + + let lifted112 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result111 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result111) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted108, max : lifted110, unit : lifted112}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted113) + } + 3 => { + + let lifted120 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted115 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted114 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted114) + } + _ => panic() + } + + let lifted117 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted116 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted116) + } + _ => panic() + } + + let lifted119 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result118) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted115, max : lifted117, unit : lifted119}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted120) + } + 4 => { + + let lifted127 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted122 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted121 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted121) + } + _ => panic() + } + + let lifted124 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted123 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted123) + } + _ => panic() + } + + let lifted126 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result125) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted122, max : lifted124, unit : lifted126}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted127) + } + 5 => { + + let lifted134 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted129 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted128 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted128) + } + _ => panic() + } + + let lifted131 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted130 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted130) + } + _ => panic() + } + + let lifted133 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result132) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted129, max : lifted131, unit : lifted133}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted134) + } + 6 => { + + let lifted141 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted136 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted135 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted135) + } + _ => panic() + } + + let lifted138 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted137 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted137) + } + _ => panic() + } + + let lifted140 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result139) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted136, max : lifted138, unit : lifted140}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted141) + } + 7 => { + + let lifted148 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted143 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted142 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted142) + } + _ => panic() + } + + let lifted145 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted144 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted144) + } + _ => panic() + } + + let lifted147 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result146) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted143, max : lifted145, unit : lifted147}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted148) + } + 8 => { + + let lifted155 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted150 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted149 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted149) + } + _ => panic() + } + + let lifted152 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted151 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted151) + } + _ => panic() + } + + let lifted154 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result153) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted150, max : lifted152, unit : lifted154}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted155) + } + 9 => { + + let lifted162 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted157 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted156 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted156) + } + _ => panic() + } + + let lifted159 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted158 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted158) + } + _ => panic() + } + + let lifted161 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result160) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted157, max : lifted159, unit : lifted161}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted162) + } + 10 => { + + let lifted169 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted164 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted163 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted163) + } + _ => panic() + } + + let lifted166 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted165 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted165) + } + _ => panic() + } + + let lifted168 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result167 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result167) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted164, max : lifted166, unit : lifted168}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted169) + } + 11 => { + + let lifted176 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted171 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted170 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted170) + } + _ => panic() + } + + let lifted173 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted172 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted172) + } + _ => panic() + } + + let lifted175 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result174 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result174) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted171, max : lifted173, unit : lifted175}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted176) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array191 : Array[@types.NamedFieldType] = []; + for index192 = 0; index192 < (mbt_ffi_load32((iter_base) + 12)); index192 = index192 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index192 * 68) + + let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted179 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result178 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result178) + } + _ => panic() + } + + let array181 : Array[String] = []; + for index182 = 0; index182 < (mbt_ffi_load32((iter_base) + 28)); index182 = index182 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index182 * 8) + + let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array181.push(result180) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array184 : Array[String] = []; + for index185 = 0; index185 < (mbt_ffi_load32((iter_base) + 36)); index185 = index185 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index185 * 8) + + let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array184.push(result183) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted187 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result186 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result186) + } + _ => panic() + } + + let lifted190 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted189 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result188) + } + _ => panic() + } + + Option::Some(lifted189) + } + _ => panic() + } + + array191.push(@types.NamedFieldType::{name : result177, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted179, aliases : array181, examples : array184, deprecated : lifted187, role : lifted190}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array191) + } + 15 => { + + let array208 : Array[@types.VariantCaseType] = []; + for index209 = 0; index209 < (mbt_ffi_load32((iter_base) + 12)); index209 = index209 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index209 * 72) + + let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted194 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + let lifted196 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result195) + } + _ => panic() + } + + let array198 : Array[String] = []; + for index199 = 0; index199 < (mbt_ffi_load32((iter_base) + 32)); index199 = index199 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index199 * 8) + + let result197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array198.push(result197) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + let array201 : Array[String] = []; + for index202 = 0; index202 < (mbt_ffi_load32((iter_base) + 40)); index202 = index202 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index202 * 8) + + let result200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array201.push(result200) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + + let lifted204 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { + + let result203 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + + Option::Some(result203) + } + _ => panic() + } + + let lifted207 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let lifted206 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + + @types.Role::Other(result205) + } + _ => panic() + } + + Option::Some(lifted206) + } + _ => panic() + } + + array208.push(@types.VariantCaseType::{name : result193, payload : lifted194, metadata : @types.MetadataEnvelope::{doc : lifted196, aliases : array198, examples : array201, deprecated : lifted204, role : lifted207}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::VariantType(array208) + } + 16 => { + + let array211 : Array[String] = []; + for index212 = 0; index212 < (mbt_ffi_load32((iter_base) + 12)); index212 = index212 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index212 * 8) + + let result210 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array211.push(result210) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::EnumType(array211) + } + 17 => { + + let array214 : Array[String] = []; + for index215 = 0; index215 < (mbt_ffi_load32((iter_base) + 12)); index215 = index215 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index215 * 8) + + let result213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array214.push(result213) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::FlagsType(array214) + } + 18 => { + + let array216 : Array[Int] = []; + for index217 = 0; index217 < (mbt_ffi_load32((iter_base) + 12)); index217 = index217 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index217 * 4) + + array216.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::TupleType(array216) + } + 19 => { + + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { + + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { + + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { + + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { + + let lifted218 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + let lifted219 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } + + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted218, err : lifted219}) + } + 24 => { + + let lifted223 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array221 : Array[String] = []; + for index222 = 0; index222 < (mbt_ffi_load32((iter_base) + 16)); index222 = index222 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index222 * 8) + + let result220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array221.push(result220) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array221) + } + _ => panic() + } + + let lifted224 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted225 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted227 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result226) + } + _ => panic() + } + + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted223, min_length : lifted224, max_length : lifted225, regex : lifted227}) + } + 25 => { + + let lifted231 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array229 : Array[String] = []; + for index230 = 0; index230 < (mbt_ffi_load32((iter_base) + 16)); index230 = index230 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index230 * 8) + + let result228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array229.push(result228) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array229) + } + _ => panic() + } + + let lifted232 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted233 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted231, min_bytes : lifted232, max_bytes : lifted233}) + } + 26 => { + + let lifted237 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let array235 : Array[String] = []; + for index236 = 0; index236 < (mbt_ffi_load32((iter_base) + 20)); index236 = index236 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index236 * 8) + + let result234 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array235.push(result234) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + Option::Some(array235) + } + _ => panic() + } + + let lifted241 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let array239 : Array[String] = []; + for index240 = 0; index240 < (mbt_ffi_load32((iter_base) + 32)); index240 = index240 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index240 * 8) + + let result238 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array239.push(result238) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + Option::Some(array239) + } + _ => panic() + } + + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted237, allowed_extensions : lifted241}) + } + 27 => { + + let lifted245 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array243 : Array[String] = []; + for index244 = 0; index244 < (mbt_ffi_load32((iter_base) + 16)); index244 = index244 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index244 * 8) + + let result242 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array243.push(result242) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array243) + } + _ => panic() + } + + let lifted249 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + let array247 : Array[String] = []; + for index248 = 0; index248 < (mbt_ffi_load32((iter_base) + 28)); index248 = index248 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index248 * 8) + + let result246 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array247.push(result246) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + Option::Some(array247) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted245, allowed_hosts : lifted249}) + } + 28 => { + + @types.SchemaTypeBody::DatetimeType + } + 29 => { + + @types.SchemaTypeBody::DurationType + } + 30 => { + + let result250 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let array252 : Array[String] = []; + for index253 = 0; index253 < (mbt_ffi_load32((iter_base) + 20)); index253 = index253 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index253 * 8) + + let result251 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array252.push(result251) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + let lifted255 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result254 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result254}) + } + _ => panic() + } + + let lifted257 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let result256 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result256}) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result250, allowed_suffixes : array252, min : lifted255, max : lifted257}) + } + 31 => { + + let array281 : Array[@types.UnionBranch] = []; + for index282 = 0; index282 < (mbt_ffi_load32((iter_base) + 12)); index282 = index282 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index282 * 92) + + let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted267 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { + + let result259 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Prefix(result259) + } + 1 => { + + let result260 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Suffix(result260) + } + 2 => { + + let result261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Contains(result261) + } + 3 => { + + let result262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Regex(result262) + } + 4 => { + + let result263 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + let lifted265 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result264 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + + Option::Some(result264) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result263, literal : lifted265}) + } + 5 => { + + let result266 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::FieldAbsent(result266) + } + _ => panic() + } + + let lifted269 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result268) + } + _ => panic() + } + + let array271 : Array[String] = []; + for index272 = 0; index272 < (mbt_ffi_load32((iter_base) + 52)); index272 = index272 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index272 * 8) + + let result270 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array271.push(result270) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + + let array274 : Array[String] = []; + for index275 = 0; index275 < (mbt_ffi_load32((iter_base) + 60)); index275 = index275 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index275 * 8) + + let result273 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array274.push(result273) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + + let lifted277 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result276 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result276) + } + _ => panic() + } + + let lifted280 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { + + let lifted279 = match (mbt_ffi_load8_u((iter_base) + 80)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result278 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + + @types.Role::Other(result278) + } + _ => panic() + } + + Option::Some(lifted279) + } + _ => panic() + } + + array281.push(@types.UnionBranch::{tag : result258, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted267, metadata : @types.MetadataEnvelope::{doc : lifted269, aliases : array271, examples : array274, deprecated : lifted277, role : lifted280}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array281}) + } + 32 => { + + let lifted284 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result283 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result283) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted284}) + } + 33 => { + + let lifted286 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result285 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result285) + } + _ => panic() + } + + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted286}) + } + 34 => { + + let lifted287 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::FutureType(lifted287) + } + 35 => { + + let lifted288 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::StreamType(lifted288) + } + _ => panic() + } + + let lifted291 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + 0 => Option::None + 1 => { + + let result290 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + + Option::Some(result290) + } + _ => panic() + } + + let array293 : Array[String] = []; + for index294 = 0; index294 < (mbt_ffi_load32((iter_base) + 104)); index294 = index294 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index294 * 8) + + let result292 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array293.push(result292) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + + let array296 : Array[String] = []; + for index297 = 0; index297 < (mbt_ffi_load32((iter_base) + 112)); index297 = index297 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index297 * 8) + + let result295 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array296.push(result295) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + + let lifted299 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { + + let result298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + + Option::Some(result298) + } + _ => panic() + } + + let lifted302 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { + + let lifted301 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + + @types.Role::Other(result300) + } + _ => panic() + } + + Option::Some(lifted301) + } + _ => panic() + } + + array303.push(@types.SchemaTypeNode::{body : lifted289, metadata : @types.MetadataEnvelope::{doc : lifted291, aliases : array293, examples : array296, deprecated : lifted299, role : lifted302}}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) + + let array308 : Array[@types.SchemaTypeDef] = []; + for index309 = 0; index309 < (mbt_ffi_load32((return_area) + 24)); index309 = index309 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index309 * 24) + + let result305 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted307 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result306 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result306) + } + _ => panic() + } + + array308.push(@types.SchemaTypeDef::{id : result305, name : lifted307, body : mbt_ffi_load32((iter_base) + 20)}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 20)) + + let array340 : Array[@types.SchemaValueNode] = []; + for index341 = 0; index341 < (mbt_ffi_load32((return_area) + 36)); index341 = index341 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index341 * 32) + + let lifted339 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) + } + 1 => { + + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { + + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { + + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { + + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { + + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { + + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { + + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { + + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { + + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { + + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { + + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { + + let result310 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::StringValue(result310) + } + 13 => { + + let array311 : Array[Int] = []; + for index312 = 0; index312 < (mbt_ffi_load32((iter_base) + 12)); index312 = index312 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index312 * 4) + + array311.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::RecordValue(array311) + } + 14 => { + + let lifted313 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted313}) + } + 15 => { + + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { + + let array314 : Array[Bool] = []; + for index315 = 0; index315 < (mbt_ffi_load32((iter_base) + 12)); index315 = index315 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index315 * 1) + + array314.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FlagsValue(array314) + } + 17 => { + + let array316 : Array[Int] = []; + for index317 = 0; index317 < (mbt_ffi_load32((iter_base) + 12)); index317 = index317 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index317 * 4) + + array316.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::TupleValue(array316) + } + 18 => { + + let array318 : Array[Int] = []; + for index319 = 0; index319 < (mbt_ffi_load32((iter_base) + 12)); index319 = index319 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index319 * 4) + + array318.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::ListValue(array318) + } + 19 => { + + let array320 : Array[Int] = []; + for index321 = 0; index321 < (mbt_ffi_load32((iter_base) + 12)); index321 = index321 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index321 * 4) + + array320.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array320) + } + 20 => { + + let array322 : Array[@types.MapEntry] = []; + for index323 = 0; index323 < (mbt_ffi_load32((iter_base) + 12)); index323 = index323 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index323 * 8) + + array322.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::MapValue(array322) + } + 21 => { + + let lifted324 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaValueNode::OptionValue(lifted324) + } + 22 => { + + let lifted327 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { + + let lifted325 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::OkValue(lifted325) + } + 1 => { + + let lifted326 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::ErrValue(lifted326) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted327) + } + 23 => { + + let result328 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted330 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result329 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result329) + } + _ => panic() + } + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result328, language : lifted330}) + } + 24 => { + + let result331 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted333 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result332 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result332) + } + _ => panic() + } + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result331, mime_type : lifted333}) + } + 25 => { + + let result334 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::PathValue(result334) + } + 26 => { + + let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UrlValue(result335) + } + 27 => { + + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + } + 28 => { + + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + } + 29 => { + + let result336 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result336}) + } + 30 => { + + let result337 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result337, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { + + let result338 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result338}) + } + 32 => { + + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) + } + _ => panic() + } + + array340.push(lifted339) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) + + @common.AgentError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array303, defs : array308, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array340, root : mbt_ffi_load32((return_area) + 40)}}) + } + _ => panic() + } + + RpcError::RemoteAgentError(lifted342) + } + _ => panic() + } + + Result::Err(lifted343) + } + _ => panic() + } + let ret = lifted344 + mbt_ffi_free(ptr) + mbt_ffi_free(address67) + mbt_ffi_free(return_area) + + cleanup_list.each(mbt_ffi_free) + return ret + +} +///| +/// Triggers the invocation of a remote method with the given parameters, and returns immediately. +pub fn WasmRpc::invoke(self : WasmRpc, method_name : String, input : @types.SchemaValueTree) -> Result[Unit, RpcError] { + let cleanup_list : Array[Int] = [] + + let WasmRpc(handle) = self + + let ptr = mbt_ffi_str2ptr(method_name) + + let address67 = mbt_ffi_malloc(((input).value_nodes).length() * 32); + for index68 = 0; index68 < ((input).value_nodes).length(); index68 = index68 + 1 { + let iter_elem : @types.SchemaValueNode = ((input).value_nodes)[(index68)] + let iter_base = address67 + (index68 * 32); + + match iter_elem { + BoolValue(payload) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) + + () + } + S8Value(payload0) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) + + () + } + S16Value(payload1) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) + + () + } + S32Value(payload2) => { + mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload2) + + () + } + S64Value(payload3) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload3) + + () + } + U8Value(payload4) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) + + () + } + U16Value(payload5) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) + + () + } + U32Value(payload6) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) + + () + } + U64Value(payload7) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) + + () + } + F32Value(payload8) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload8) - } - let result : Int = wasmImportConstructorWasmRpc(ptr, agent_type_name.length(), address66, ((constructor_).value_nodes).length(), (constructor_).root, lowered, lowered70, lowered71, address366, (agent_config).length()); - let ret = WasmRpc::WasmRpc(result) - mbt_ffi_free(ptr) - mbt_ffi_free(address66) - mbt_ffi_free(address366) + () + } + F64Value(payload9) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload9) - cleanup_list.each(mbt_ffi_free) - return ret + () + } + CharValue(payload10) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) -} -///| -/// Invokes a remote method with the given parameters, and awaits the result. -/// -/// `input` encodes the method's parameter list; the result is `none` for -/// a `unit` output and `some(value)` for a `single` output. -pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @types.SchemaValueTree) -> Result[@types.SchemaValueTree?, RpcError] { - let cleanup_list : Array[Int] = [] + () + } + StringValue(payload11) => { + mbt_ffi_store8((iter_base) + 0, (12)) + + let ptr12 = mbt_ffi_str2ptr(payload11) + mbt_ffi_store32((iter_base) + 12, payload11.length()) + mbt_ffi_store32((iter_base) + 8, ptr12) + cleanup_list.push(ptr12) + + () + } + RecordValue(payload13) => { + mbt_ffi_store8((iter_base) + 0, (13)) + + let address = mbt_ffi_malloc((payload13).length() * 4); + for index = 0; index < (payload13).length(); index = index + 1 { + let iter_elem : Int = (payload13)[(index)] + let iter_base = address + (index * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload13).length()) + mbt_ffi_store32((iter_base) + 8, address) + cleanup_list.push(address) + + () + } + VariantValue(payload14) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) + + match ((payload14).payload) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload16) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload16) + + () + } + } + + () + } + EnumValue(payload17) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) + + () + } + FlagsValue(payload18) => { + mbt_ffi_store8((iter_base) + 0, (16)) + + let address19 = mbt_ffi_malloc((payload18).length() * 1); + for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { + let iter_elem : Bool = (payload18)[(index20)] + let iter_base = address19 + (index20 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + + } + mbt_ffi_store32((iter_base) + 12, (payload18).length()) + mbt_ffi_store32((iter_base) + 8, address19) + cleanup_list.push(address19) + + () + } + TupleValue(payload21) => { + mbt_ffi_store8((iter_base) + 0, (17)) + + let address22 = mbt_ffi_malloc((payload21).length() * 4); + for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { + let iter_elem : Int = (payload21)[(index23)] + let iter_base = address22 + (index23 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload21).length()) + mbt_ffi_store32((iter_base) + 8, address22) + cleanup_list.push(address22) + + () + } + ListValue(payload24) => { + mbt_ffi_store8((iter_base) + 0, (18)) + + let address25 = mbt_ffi_malloc((payload24).length() * 4); + for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { + let iter_elem : Int = (payload24)[(index26)] + let iter_base = address25 + (index26 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload24).length()) + mbt_ffi_store32((iter_base) + 8, address25) + cleanup_list.push(address25) + + () + } + FixedListValue(payload27) => { + mbt_ffi_store8((iter_base) + 0, (19)) + + let address28 = mbt_ffi_malloc((payload27).length() * 4); + for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { + let iter_elem : Int = (payload27)[(index29)] + let iter_base = address28 + (index29 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload27).length()) + mbt_ffi_store32((iter_base) + 8, address28) + cleanup_list.push(address28) + + () + } + MapValue(payload30) => { + mbt_ffi_store8((iter_base) + 0, (20)) + + let address31 = mbt_ffi_malloc((payload30).length() * 8); + for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { + let iter_elem : @types.MapEntry = (payload30)[(index32)] + let iter_base = address31 + (index32 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + + } + mbt_ffi_store32((iter_base) + 12, (payload30).length()) + mbt_ffi_store32((iter_base) + 8, address31) + cleanup_list.push(address31) + + () + } + OptionValue(payload33) => { + mbt_ffi_store8((iter_base) + 0, (21)) + + match (payload33) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload35) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload35) + + () + } + } + + () + } + ResultValue(payload36) => { + mbt_ffi_store8((iter_base) + 0, (22)) + + match payload36 { + OkValue(payload37) => { + mbt_ffi_store8((iter_base) + 8, (0)) + + match (payload37) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload39) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload39) + + () + } + } + + () + } + ErrValue(payload40) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match (payload40) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload42) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload42) + + () + } + } + + () + } + } + + () + } + TextValue(payload43) => { + mbt_ffi_store8((iter_base) + 0, (23)) + + let ptr44 = mbt_ffi_str2ptr((payload43).text) + mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr44) + + match ((payload43).language) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload46) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr47 = mbt_ffi_str2ptr(payload46) + mbt_ffi_store32((iter_base) + 24, payload46.length()) + mbt_ffi_store32((iter_base) + 20, ptr47) + cleanup_list.push(ptr47) + + () + } + } + cleanup_list.push(ptr44) + + () + } + BinaryValue(payload48) => { + mbt_ffi_store8((iter_base) + 0, (24)) - let WasmRpc(handle) = self + let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) - let ptr = mbt_ffi_str2ptr(method_name) + mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr49) - let address67 = mbt_ffi_malloc(((input).value_nodes).length() * 32); - for index68 = 0; index68 < ((input).value_nodes).length(); index68 = index68 + 1 { - let iter_elem : @types.SchemaValueNode = ((input).value_nodes)[(index68)] - let iter_base = address67 + (index68 * 32); + match ((payload48).mime_type) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - match iter_elem { - BoolValue(payload) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) + () + } + Some(payload51) => { + mbt_ffi_store8((iter_base) + 16, (1)) - () - } - S8Value(payload0) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) + let ptr52 = mbt_ffi_str2ptr(payload51) + mbt_ffi_store32((iter_base) + 24, payload51.length()) + mbt_ffi_store32((iter_base) + 20, ptr52) + cleanup_list.push(ptr52) - () - } - S16Value(payload1) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) + () + } + } + cleanup_list.push(ptr49) () } - S32Value(payload2) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload2) + PathValue(payload53) => { + mbt_ffi_store8((iter_base) + 0, (25)) - () - } - S64Value(payload3) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload3) + let ptr54 = mbt_ffi_str2ptr(payload53) + mbt_ffi_store32((iter_base) + 12, payload53.length()) + mbt_ffi_store32((iter_base) + 8, ptr54) + cleanup_list.push(ptr54) () } - U8Value(payload4) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) + UrlValue(payload55) => { + mbt_ffi_store8((iter_base) + 0, (26)) - () - } - U16Value(payload5) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) + let ptr56 = mbt_ffi_str2ptr(payload55) + mbt_ffi_store32((iter_base) + 12, payload55.length()) + mbt_ffi_store32((iter_base) + 8, ptr56) + cleanup_list.push(ptr56) () } - U32Value(payload6) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) + DatetimeValue(payload57) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload57).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) () } - U64Value(payload7) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) + DurationValue(payload58) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) () } - F32Value(payload8) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload8) + QuantityValueNode(payload59) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload59).scale) + + let ptr60 = mbt_ffi_str2ptr((payload59).unit) + mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr60) + cleanup_list.push(ptr60) () } - F64Value(payload9) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload9) + UnionValue(payload61) => { + mbt_ffi_store8((iter_base) + 0, (30)) + + let ptr62 = mbt_ffi_str2ptr((payload61).tag) + mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr62) + mbt_ffi_store32((iter_base) + 16, (payload61).body) + cleanup_list.push(ptr62) () } - CharValue(payload10) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) + SecretValue(payload63) => { + mbt_ffi_store8((iter_base) + 0, (31)) + + let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr64) + cleanup_list.push(ptr64) () } - StringValue(payload11) => { - mbt_ffi_store8((iter_base) + 0, (12)) + QuotaTokenHandle(payload65) => { + mbt_ffi_store8((iter_base) + 0, (32)) - let ptr12 = mbt_ffi_str2ptr(payload11) - mbt_ffi_store32((iter_base) + 12, payload11.length()) - mbt_ffi_store32((iter_base) + 8, ptr12) - cleanup_list.push(ptr12) + let @types.QuotaToken(handle66) = payload65 + mbt_ffi_store32((iter_base) + 8, handle66) () } - RecordValue(payload13) => { - mbt_ffi_store8((iter_base) + 0, (13)) + } - let address = mbt_ffi_malloc((payload13).length() * 4); - for index = 0; index < (payload13).length(); index = index + 1 { - let iter_elem : Int = (payload13)[(index)] - let iter_base = address + (index * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + } + let return_area = mbt_ffi_malloc(44) + wasmImportMethodWasmRpcInvoke(handle, ptr, method_name.length(), address67, ((input).value_nodes).length(), (input).root, return_area); - } - mbt_ffi_store32((iter_base) + 12, (payload13).length()) - mbt_ffi_store32((iter_base) + 8, address) - cleanup_list.push(address) + let lifted311 = match (mbt_ffi_load8_u((return_area) + 0)) { + 0 => { - () - } - VariantValue(payload14) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) + Result::Ok(()) + } + 1 => { - match ((payload14).payload) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let lifted310 = match (mbt_ffi_load8_u((return_area) + 4)) { + 0 => { - () - } - Some(payload16) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload16) + let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - () - } + RpcError::ProtocolError(result) } + 1 => { - () - } - EnumValue(payload17) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) + let result69 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - () - } - FlagsValue(payload18) => { - mbt_ffi_store8((iter_base) + 0, (16)) + RpcError::Denied(result69) + } + 2 => { - let address19 = mbt_ffi_malloc((payload18).length() * 1); - for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { - let iter_elem : Bool = (payload18)[(index20)] - let iter_base = address19 + (index20 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + let result70 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + RpcError::NotFound(result70) } - mbt_ffi_store32((iter_base) + 12, (payload18).length()) - mbt_ffi_store32((iter_base) + 8, address19) - cleanup_list.push(address19) + 3 => { - () - } - TupleValue(payload21) => { - mbt_ffi_store8((iter_base) + 0, (17)) + let result71 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - let address22 = mbt_ffi_malloc((payload21).length() * 4); - for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { - let iter_elem : Int = (payload21)[(index23)] - let iter_base = address22 + (index23 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + RpcError::RemoteInternalError(result71) + } + 4 => { + + let lifted309 = match (mbt_ffi_load8_u((return_area) + 8)) { + 0 => { + + let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidInput(result72) + } + 1 => { + + let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidMethod(result73) + } + 2 => { + + let result74 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidType(result74) + } + 3 => { + + let result75 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.AgentError::InvalidAgentId(result75) + } + 4 => { + + let array270 : Array[@types.SchemaTypeNode] = []; + for index271 = 0; index271 < (mbt_ffi_load32((return_area) + 16)); index271 = index271 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index271 * 144) + + let lifted256 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { + + @types.SchemaTypeBody::BoolType + } + 2 => { + + let lifted81 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted76 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted) + } + _ => panic() + } + + let lifted78 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload21).length()) - mbt_ffi_store32((iter_base) + 8, address22) - cleanup_list.push(address22) + let lifted77 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - ListValue(payload24) => { - mbt_ffi_store8((iter_base) + 0, (18)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let address25 = mbt_ffi_malloc((payload24).length() * 4); - for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { - let iter_elem : Int = (payload24)[(index26)] - let iter_base = address25 + (index26 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - } - mbt_ffi_store32((iter_base) + 12, (payload24).length()) - mbt_ffi_store32((iter_base) + 8, address25) - cleanup_list.push(address25) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - FixedListValue(payload27) => { - mbt_ffi_store8((iter_base) + 0, (19)) + Option::Some(lifted77) + } + _ => panic() + } - let address28 = mbt_ffi_malloc((payload27).length() * 4); - for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { - let iter_elem : Int = (payload27)[(index29)] - let iter_base = address28 + (index29 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted80 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload27).length()) - mbt_ffi_store32((iter_base) + 8, address28) - cleanup_list.push(address28) + let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - MapValue(payload30) => { - mbt_ffi_store8((iter_base) + 0, (20)) + Option::Some(result79) + } + _ => panic() + } - let address31 = mbt_ffi_malloc((payload30).length() * 8); - for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { - let iter_elem : @types.MapEntry = (payload30)[(index32)] - let iter_base = address31 + (index32 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + Option::Some(@types.NumericRestrictions::{min : lifted76, max : lifted78, unit : lifted80}) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload30).length()) - mbt_ffi_store32((iter_base) + 8, address31) - cleanup_list.push(address31) + @types.SchemaTypeBody::S8Type(lifted81) + } + 3 => { - () - } - OptionValue(payload33) => { - mbt_ffi_store8((iter_base) + 0, (21)) + let lifted88 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - match (payload33) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted83 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - Some(payload35) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload35) + let lifted82 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - ResultValue(payload36) => { - mbt_ffi_store8((iter_base) + 0, (22)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - match payload36 { - OkValue(payload37) => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - match (payload37) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + Option::Some(lifted82) + } + _ => panic() + } - () - } - Some(payload39) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload39) + let lifted85 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - } + let lifted84 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - ErrValue(payload40) => { - mbt_ffi_store8((iter_base) + 8, (1)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - match (payload40) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - Some(payload42) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload42) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - } + Option::Some(lifted84) + } + _ => panic() + } - () - } - } + let lifted87 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - TextValue(payload43) => { - mbt_ffi_store8((iter_base) + 0, (23)) + let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let ptr44 = mbt_ffi_str2ptr((payload43).text) - mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr44) + Option::Some(result86) + } + _ => panic() + } - match ((payload43).language) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + Option::Some(@types.NumericRestrictions::{min : lifted83, max : lifted85, unit : lifted87}) + } + _ => panic() + } - () - } - Some(payload46) => { - mbt_ffi_store8((iter_base) + 16, (1)) + @types.SchemaTypeBody::S16Type(lifted88) + } + 4 => { - let ptr47 = mbt_ffi_str2ptr(payload46) - mbt_ffi_store32((iter_base) + 24, payload46.length()) - mbt_ffi_store32((iter_base) + 20, ptr47) - cleanup_list.push(ptr47) + let lifted95 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - } - cleanup_list.push(ptr44) + let lifted90 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - BinaryValue(payload48) => { - mbt_ffi_store8((iter_base) + 0, (24)) + let lifted89 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr49) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - match ((payload48).mime_type) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload51) => { - mbt_ffi_store8((iter_base) + 16, (1)) + Option::Some(lifted89) + } + _ => panic() + } - let ptr52 = mbt_ffi_str2ptr(payload51) - mbt_ffi_store32((iter_base) + 24, payload51.length()) - mbt_ffi_store32((iter_base) + 20, ptr52) - cleanup_list.push(ptr52) + let lifted92 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - } - cleanup_list.push(ptr49) + let lifted91 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - PathValue(payload53) => { - mbt_ffi_store8((iter_base) + 0, (25)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let ptr54 = mbt_ffi_str2ptr(payload53) - mbt_ffi_store32((iter_base) + 12, payload53.length()) - mbt_ffi_store32((iter_base) + 8, ptr54) - cleanup_list.push(ptr54) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - UrlValue(payload55) => { - mbt_ffi_store8((iter_base) + 0, (26)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let ptr56 = mbt_ffi_str2ptr(payload55) - mbt_ffi_store32((iter_base) + 12, payload55.length()) - mbt_ffi_store32((iter_base) + 8, ptr56) - cleanup_list.push(ptr56) + Option::Some(lifted91) + } + _ => panic() + } - () - } - DatetimeValue(payload57) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload57).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) + let lifted94 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - DurationValue(payload58) => { - mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) + let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - QuantityValueNode(payload59) => { - mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload59).scale) + Option::Some(result93) + } + _ => panic() + } - let ptr60 = mbt_ffi_str2ptr((payload59).unit) - mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr60) - cleanup_list.push(ptr60) + Option::Some(@types.NumericRestrictions::{min : lifted90, max : lifted92, unit : lifted94}) + } + _ => panic() + } - () - } - UnionValue(payload61) => { - mbt_ffi_store8((iter_base) + 0, (30)) + @types.SchemaTypeBody::S32Type(lifted95) + } + 5 => { - let ptr62 = mbt_ffi_str2ptr((payload61).tag) - mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr62) - mbt_ffi_store32((iter_base) + 16, (payload61).body) - cleanup_list.push(ptr62) + let lifted102 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - SecretValue(payload63) => { - mbt_ffi_store8((iter_base) + 0, (31)) + let lifted97 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr64) - cleanup_list.push(ptr64) + let lifted96 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - QuotaTokenHandle(payload65) => { - mbt_ffi_store8((iter_base) + 0, (32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let @types.QuotaToken(handle66) = payload65 - mbt_ffi_store32((iter_base) + 8, handle66) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - } - let return_area = mbt_ffi_malloc(44) - wasmImportMethodWasmRpcInvokeAndAwait(handle, ptr, method_name.length(), address67, ((input).value_nodes).length(), (input).root, return_area); + Option::Some(lifted96) + } + _ => panic() + } - let lifted274 = match (mbt_ffi_load8_u((return_area) + 0)) { - 0 => { + let lifted99 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted98 : @types.SchemaValueTree? = match mbt_ffi_load8_u((return_area) + 4) { - 0 => Option::None - 1 => { + let lifted98 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array96 : Array[@types.SchemaValueNode] = []; - for index97 = 0; index97 < (mbt_ffi_load32((return_area) + 12)); index97 = index97 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 8)) + (index97 * 32) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted95 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + Option::Some(lifted98) + } + _ => panic() + } - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + let lifted101 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + Option::Some(result100) + } + _ => panic() + } - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + Option::Some(@types.NumericRestrictions::{min : lifted97, max : lifted99, unit : lifted101}) + } + _ => panic() + } - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + @types.SchemaTypeBody::S64Type(lifted102) + } + 6 => { - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + let lifted109 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + let lifted104 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + let lifted103 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::StringValue(result) - } - 13 => { + Option::Some(lifted103) + } + _ => panic() + } - let array : Array[Int] = []; - for index69 = 0; index69 < (mbt_ffi_load32((iter_base) + 12)); index69 = index69 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index69 * 4) + let lifted106 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - array.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted105 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaValueNode::RecordValue(array) - } - 14 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted}) - } - 15 => { + Option::Some(lifted105) + } + _ => panic() + } - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + let lifted108 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let array70 : Array[Bool] = []; - for index71 = 0; index71 < (mbt_ffi_load32((iter_base) + 12)); index71 = index71 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index71 * 1) + let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array70.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + Option::Some(result107) + } + _ => panic() + } - @types.SchemaValueNode::FlagsValue(array70) - } - 17 => { + Option::Some(@types.NumericRestrictions::{min : lifted104, max : lifted106, unit : lifted108}) + } + _ => panic() + } - let array72 : Array[Int] = []; - for index73 = 0; index73 < (mbt_ffi_load32((iter_base) + 12)); index73 = index73 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index73 * 4) + @types.SchemaTypeBody::U8Type(lifted109) + } + 7 => { - array72.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted116 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::TupleValue(array72) - } - 18 => { + let lifted111 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let array74 : Array[Int] = []; - for index75 = 0; index75 < (mbt_ffi_load32((iter_base) + 12)); index75 = index75 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index75 * 4) + let lifted110 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array74.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaValueNode::ListValue(array74) - } - 19 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let array76 : Array[Int] = []; - for index77 = 0; index77 < (mbt_ffi_load32((iter_base) + 12)); index77 = index77 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index77 * 4) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - array76.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + Option::Some(lifted110) + } + _ => panic() + } - @types.SchemaValueNode::FixedListValue(array76) - } - 20 => { + let lifted113 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array78 : Array[@types.MapEntry] = []; - for index79 = 0; index79 < (mbt_ffi_load32((iter_base) + 12)); index79 = index79 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index79 * 8) + let lifted112 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - array78.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaValueNode::MapValue(array78) - } - 21 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted80 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + Option::Some(lifted112) + } + _ => panic() + } - @types.SchemaValueNode::OptionValue(lifted80) - } - 22 => { + let lifted115 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted83 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + let result114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted81 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + Option::Some(result114) + } + _ => panic() + } - Option::Some(mbt_ffi_load32((iter_base) + 16)) + Option::Some(@types.NumericRestrictions::{min : lifted111, max : lifted113, unit : lifted115}) } _ => panic() } - @types.ResultValuePayload::OkValue(lifted81) + @types.SchemaTypeBody::U16Type(lifted116) } - 1 => { + 8 => { - let lifted82 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted123 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + let lifted118 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.ResultValuePayload::ErrValue(lifted82) - } - _ => panic() - } + let lifted117 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaValueNode::ResultValue(lifted83) - } - 23 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result84 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted86 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + Option::Some(lifted117) + } + _ => panic() + } - Option::Some(result85) - } - _ => panic() - } + let lifted120 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result84, language : lifted86}) - } - 24 => { + let lifted119 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result87 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted89 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result88) - } - _ => panic() - } + Option::Some(lifted119) + } + _ => panic() + } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result87, mime_type : lifted89}) - } - 25 => { + let lifted122 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaValueNode::PathValue(result90) - } - 26 => { + Option::Some(result121) + } + _ => panic() + } - let result91 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(@types.NumericRestrictions::{min : lifted118, max : lifted120, unit : lifted122}) + } + _ => panic() + } - @types.SchemaValueNode::UrlValue(result91) - } - 27 => { + @types.SchemaTypeBody::U32Type(lifted123) + } + 9 => { - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) - } - 28 => { + let lifted130 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) - } - 29 => { + let lifted125 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result92 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let lifted124 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result92}) - } - 30 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result93, body : mbt_ffi_load32((iter_base) + 16)}) - } - 31 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let result94 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(lifted124) + } + _ => panic() + } - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result94}) - } - 32 => { + let lifted127 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) - } - _ => panic() - } + let lifted126 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - array96.push(lifted95) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 8)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - Option::Some(@types.SchemaValueTree::{value_nodes : array96, root : mbt_ffi_load32((return_area) + 16)}) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - Result::Ok(lifted98) - } - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted273 = match (mbt_ffi_load8_u((return_area) + 4)) { - 0 => { + Option::Some(lifted126) + } + _ => panic() + } - let result99 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + let lifted129 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - RpcError::ProtocolError(result99) - } - 1 => { + let result128 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + Option::Some(result128) + } + _ => panic() + } - RpcError::Denied(result100) - } - 2 => { + Option::Some(@types.NumericRestrictions::{min : lifted125, max : lifted127, unit : lifted129}) + } + _ => panic() + } - let result101 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + @types.SchemaTypeBody::U64Type(lifted130) + } + 10 => { - RpcError::NotFound(result101) - } - 3 => { + let lifted137 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result102 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + let lifted132 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - RpcError::RemoteInternalError(result102) - } - 4 => { + let lifted131 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted272 = match (mbt_ffi_load8_u((return_area) + 8)) { - 0 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result103 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @common.AgentError::InvalidInput(result103) - } - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let result104 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + Option::Some(lifted131) + } + _ => panic() + } - @common.AgentError::InvalidMethod(result104) - } - 2 => { + let lifted134 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + let lifted133 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @common.AgentError::InvalidType(result105) - } - 3 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result106 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @common.AgentError::InvalidAgentId(result106) - } - 4 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let array233 : Array[@types.SchemaTypeNode] = []; - for index234 = 0; index234 < (mbt_ffi_load32((return_area) + 16)); index234 = index234 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index234 * 144) + Option::Some(lifted133) + } + _ => panic() + } - let lifted219 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let lifted136 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { + let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaTypeBody::BoolType - } - 2 => { + Option::Some(result135) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted132, max : lifted134, unit : lifted136}) + } + _ => panic() + } - @types.SchemaTypeBody::S8Type + @types.SchemaTypeBody::F32Type(lifted137) } - 3 => { + 11 => { + + let lifted144 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted139 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted138 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted138) + } + _ => panic() + } + + let lifted141 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted140 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::S16Type - } - 4 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U8Type - } - 7 => { + Option::Some(lifted140) + } + _ => panic() + } - @types.SchemaTypeBody::U16Type - } - 8 => { + let lifted143 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + let result142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(result142) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + Option::Some(@types.NumericRestrictions::{min : lifted139, max : lifted141, unit : lifted143}) + } + _ => panic() + } - @types.SchemaTypeBody::F64Type + @types.SchemaTypeBody::F64Type(lifted144) } 12 => { @@ -12350,59 +21264,59 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ } 14 => { - let array121 : Array[@types.NamedFieldType] = []; - for index122 = 0; index122 < (mbt_ffi_load32((iter_base) + 12)); index122 = index122 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index122 * 68) + let array158 : Array[@types.NamedFieldType] = []; + for index159 = 0; index159 < (mbt_ffi_load32((iter_base) + 12)); index159 = index159 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index159 * 68) - let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result145 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted109 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted147 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result108 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result108) + Option::Some(result146) } _ => panic() } - let array111 : Array[String] = []; - for index112 = 0; index112 < (mbt_ffi_load32((iter_base) + 28)); index112 = index112 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index112 * 8) + let array : Array[String] = []; + for index149 = 0; index149 < (mbt_ffi_load32((iter_base) + 28)); index149 = index149 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index149 * 8) - let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array111.push(result110) + array.push(result148) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array114 : Array[String] = []; - for index115 = 0; index115 < (mbt_ffi_load32((iter_base) + 36)); index115 = index115 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index115 * 8) + let array151 : Array[String] = []; + for index152 = 0; index152 < (mbt_ffi_load32((iter_base) + 36)); index152 = index152 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index152 * 8) - let result113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array114.push(result113) + array151.push(result150) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted117 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted154 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result116 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result116) + Option::Some(result153) } _ => panic() } - let lifted120 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted157 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted119 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted156 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -12417,33 +21331,33 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ } 3 => { - let result118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result118) + @types.Role::Other(result155) } _ => panic() } - Option::Some(lifted119) + Option::Some(lifted156) } _ => panic() } - array121.push(@types.NamedFieldType::{name : result107, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted109, aliases : array111, examples : array114, deprecated : lifted117, role : lifted120}}) + array158.push(@types.NamedFieldType::{name : result145, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted147, aliases : array, examples : array151, deprecated : lifted154, role : lifted157}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array121) + @types.SchemaTypeBody::RecordType(array158) } 15 => { - let array138 : Array[@types.VariantCaseType] = []; - for index139 = 0; index139 < (mbt_ffi_load32((iter_base) + 12)); index139 = index139 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index139 * 72) + let array175 : Array[@types.VariantCaseType] = []; + for index176 = 0; index176 < (mbt_ffi_load32((iter_base) + 12)); index176 = index176 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index176 * 72) - let result123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted124 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted161 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -12452,53 +21366,53 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - let lifted126 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted163 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result162 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result125) + Option::Some(result162) } _ => panic() } - let array128 : Array[String] = []; - for index129 = 0; index129 < (mbt_ffi_load32((iter_base) + 32)); index129 = index129 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index129 * 8) + let array165 : Array[String] = []; + for index166 = 0; index166 < (mbt_ffi_load32((iter_base) + 32)); index166 = index166 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index166 * 8) - let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result164 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array128.push(result127) + array165.push(result164) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array131 : Array[String] = []; - for index132 = 0; index132 < (mbt_ffi_load32((iter_base) + 40)); index132 = index132 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index132 * 8) + let array168 : Array[String] = []; + for index169 = 0; index169 < (mbt_ffi_load32((iter_base) + 40)); index169 = index169 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index169 * 8) - let result130 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result167 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array131.push(result130) + array168.push(result167) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted134 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted171 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result133 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result133) + Option::Some(result170) } _ => panic() } - let lifted137 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted174 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted136 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted173 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -12513,63 +21427,63 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ } 3 => { - let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result172 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result135) + @types.Role::Other(result172) } _ => panic() } - Option::Some(lifted136) + Option::Some(lifted173) } _ => panic() } - array138.push(@types.VariantCaseType::{name : result123, payload : lifted124, metadata : @types.MetadataEnvelope::{doc : lifted126, aliases : array128, examples : array131, deprecated : lifted134, role : lifted137}}) + array175.push(@types.VariantCaseType::{name : result160, payload : lifted161, metadata : @types.MetadataEnvelope::{doc : lifted163, aliases : array165, examples : array168, deprecated : lifted171, role : lifted174}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array138) + @types.SchemaTypeBody::VariantType(array175) } 16 => { - let array141 : Array[String] = []; - for index142 = 0; index142 < (mbt_ffi_load32((iter_base) + 12)); index142 = index142 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index142 * 8) + let array178 : Array[String] = []; + for index179 = 0; index179 < (mbt_ffi_load32((iter_base) + 12)); index179 = index179 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index179 * 8) - let result140 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array141.push(result140) + array178.push(result177) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array141) + @types.SchemaTypeBody::EnumType(array178) } 17 => { - let array144 : Array[String] = []; - for index145 = 0; index145 < (mbt_ffi_load32((iter_base) + 12)); index145 = index145 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index145 * 8) + let array181 : Array[String] = []; + for index182 = 0; index182 < (mbt_ffi_load32((iter_base) + 12)); index182 = index182 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index182 * 8) - let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array144.push(result143) + array181.push(result180) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array144) + @types.SchemaTypeBody::FlagsType(array181) } 18 => { - let array146 : Array[Int] = []; - for index147 = 0; index147 < (mbt_ffi_load32((iter_base) + 12)); index147 = index147 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index147 * 4) + let array183 : Array[Int] = []; + for index184 = 0; index184 < (mbt_ffi_load32((iter_base) + 12)); index184 = index184 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index184 * 4) - array146.push(mbt_ffi_load32((iter_base) + 0)) + array183.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array146) + @types.SchemaTypeBody::TupleType(array183) } 19 => { @@ -12589,7 +21503,7 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ } 23 => { - let lifted148 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted185 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -12598,7 +21512,7 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - let lifted149 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted186 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -12607,30 +21521,30 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted148, err : lifted149}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted185, err : lifted186}) } 24 => { - let lifted153 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted190 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array151 : Array[String] = []; - for index152 = 0; index152 < (mbt_ffi_load32((iter_base) + 16)); index152 = index152 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index152 * 8) + let array188 : Array[String] = []; + for index189 = 0; index189 < (mbt_ffi_load32((iter_base) + 16)); index189 = index189 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index189 * 8) - let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array151.push(result150) + array188.push(result187) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array151) + Option::Some(array188) } _ => panic() } - let lifted154 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted191 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -12639,7 +21553,7 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - let lifted155 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted192 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -12648,41 +21562,41 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - let lifted157 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted194 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result156) + Option::Some(result193) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted153, min_length : lifted154, max_length : lifted155, regex : lifted157}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted190, min_length : lifted191, max_length : lifted192, regex : lifted194}) } 25 => { - let lifted161 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted198 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array159 : Array[String] = []; - for index160 = 0; index160 < (mbt_ffi_load32((iter_base) + 16)); index160 = index160 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index160 * 8) + let array196 : Array[String] = []; + for index197 = 0; index197 < (mbt_ffi_load32((iter_base) + 16)); index197 = index197 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index197 * 8) - let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array159.push(result158) + array196.push(result195) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array159) + Option::Some(array196) } _ => panic() } - let lifted162 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted199 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -12691,7 +21605,7 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - let lifted163 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted200 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -12700,91 +21614,91 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted161, min_bytes : lifted162, max_bytes : lifted163}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted198, min_bytes : lifted199, max_bytes : lifted200}) } 26 => { - let lifted167 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted204 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array165 : Array[String] = []; - for index166 = 0; index166 < (mbt_ffi_load32((iter_base) + 20)); index166 = index166 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index166 * 8) + let array202 : Array[String] = []; + for index203 = 0; index203 < (mbt_ffi_load32((iter_base) + 20)); index203 = index203 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index203 * 8) - let result164 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result201 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array165.push(result164) + array202.push(result201) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array165) + Option::Some(array202) } _ => panic() } - let lifted171 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted208 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array169 : Array[String] = []; - for index170 = 0; index170 < (mbt_ffi_load32((iter_base) + 32)); index170 = index170 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index170 * 8) + let array206 : Array[String] = []; + for index207 = 0; index207 < (mbt_ffi_load32((iter_base) + 32)); index207 = index207 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index207 * 8) - let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array169.push(result168) + array206.push(result205) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array169) + Option::Some(array206) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted167, allowed_extensions : lifted171}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted204, allowed_extensions : lifted208}) } 27 => { - let lifted175 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted212 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array173 : Array[String] = []; - for index174 = 0; index174 < (mbt_ffi_load32((iter_base) + 16)); index174 = index174 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index174 * 8) + let array210 : Array[String] = []; + for index211 = 0; index211 < (mbt_ffi_load32((iter_base) + 16)); index211 = index211 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index211 * 8) - let result172 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result209 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array173.push(result172) + array210.push(result209) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array173) + Option::Some(array210) } _ => panic() } - let lifted179 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted216 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array177 : Array[String] = []; - for index178 = 0; index178 < (mbt_ffi_load32((iter_base) + 28)); index178 = index178 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index178 * 8) + let array214 : Array[String] = []; + for index215 = 0; index215 < (mbt_ffi_load32((iter_base) + 28)); index215 = index215 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index215 * 8) - let result176 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array177.push(result176) + array214.push(result213) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array177) + Option::Some(array214) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted175, allowed_hosts : lifted179}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted212, allowed_hosts : lifted216}) } 28 => { @@ -12796,148 +21710,148 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ } 30 => { - let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array182 : Array[String] = []; - for index183 = 0; index183 < (mbt_ffi_load32((iter_base) + 20)); index183 = index183 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index183 * 8) + let array219 : Array[String] = []; + for index220 = 0; index220 < (mbt_ffi_load32((iter_base) + 20)); index220 = index220 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index220 * 8) - let result181 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result218 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array182.push(result181) + array219.push(result218) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted185 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted222 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result184 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result221 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result184}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result221}) } _ => panic() } - let lifted187 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted224 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result186 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result223 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result186}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result223}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result180, allowed_suffixes : array182, min : lifted185, max : lifted187}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result217, allowed_suffixes : array219, min : lifted222, max : lifted224}) } 31 => { - let array211 : Array[@types.UnionBranch] = []; - for index212 = 0; index212 < (mbt_ffi_load32((iter_base) + 12)); index212 = index212 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index212 * 92) + let array248 : Array[@types.UnionBranch] = []; + for index249 = 0; index249 < (mbt_ffi_load32((iter_base) + 12)); index249 = index249 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index249 * 92) - let result188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted197 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted234 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result189) + @types.DiscriminatorRule::Prefix(result226) } 1 => { - let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result190) + @types.DiscriminatorRule::Suffix(result227) } 2 => { - let result191 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result191) + @types.DiscriminatorRule::Contains(result228) } 3 => { - let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result229 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result192) + @types.DiscriminatorRule::Regex(result229) } 4 => { - let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted195 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted232 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result194) + Option::Some(result231) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result193, literal : lifted195}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result230, literal : lifted232}) } 5 => { - let result196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result196) + @types.DiscriminatorRule::FieldAbsent(result233) } _ => panic() } - let lifted199 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted236 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result198 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result198) + Option::Some(result235) } _ => panic() } - let array201 : Array[String] = []; - for index202 = 0; index202 < (mbt_ffi_load32((iter_base) + 52)); index202 = index202 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index202 * 8) + let array238 : Array[String] = []; + for index239 = 0; index239 < (mbt_ffi_load32((iter_base) + 52)); index239 = index239 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index239 * 8) - let result200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result237 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array201.push(result200) + array238.push(result237) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array204 : Array[String] = []; - for index205 = 0; index205 < (mbt_ffi_load32((iter_base) + 60)); index205 = index205 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index205 * 8) + let array241 : Array[String] = []; + for index242 = 0; index242 < (mbt_ffi_load32((iter_base) + 60)); index242 = index242 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index242 * 8) - let result203 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array204.push(result203) + array241.push(result240) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted207 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted244 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result206 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result206) + Option::Some(result243) } _ => panic() } - let lifted210 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted247 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted209 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted246 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -12952,57 +21866,57 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ } 3 => { - let result208 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result245 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result208) + @types.Role::Other(result245) } _ => panic() } - Option::Some(lifted209) + Option::Some(lifted246) } _ => panic() } - array211.push(@types.UnionBranch::{tag : result188, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted197, metadata : @types.MetadataEnvelope::{doc : lifted199, aliases : array201, examples : array204, deprecated : lifted207, role : lifted210}}) + array248.push(@types.UnionBranch::{tag : result225, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted234, metadata : @types.MetadataEnvelope::{doc : lifted236, aliases : array238, examples : array241, deprecated : lifted244, role : lifted247}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array211}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array248}) } 32 => { - let lifted214 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted251 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result250 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result213) + Option::Some(result250) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted214}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted251}) } 33 => { - let lifted216 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted253 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result215 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result252 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result215) + Option::Some(result252) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted216}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted253}) } 34 => { - let lifted217 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted254 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -13011,11 +21925,11 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - @types.SchemaTypeBody::FutureType(lifted217) + @types.SchemaTypeBody::FutureType(lifted254) } 35 => { - let lifted218 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted255 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -13024,58 +21938,58 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - @types.SchemaTypeBody::StreamType(lifted218) + @types.SchemaTypeBody::StreamType(lifted255) } _ => panic() } - let lifted221 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted258 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result257 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result220) + Option::Some(result257) } _ => panic() } - let array223 : Array[String] = []; - for index224 = 0; index224 < (mbt_ffi_load32((iter_base) + 104)); index224 = index224 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index224 * 8) + let array260 : Array[String] = []; + for index261 = 0; index261 < (mbt_ffi_load32((iter_base) + 104)); index261 = index261 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index261 * 8) - let result222 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result259 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array223.push(result222) + array260.push(result259) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array226 : Array[String] = []; - for index227 = 0; index227 < (mbt_ffi_load32((iter_base) + 112)); index227 = index227 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index227 * 8) + let array263 : Array[String] = []; + for index264 = 0; index264 < (mbt_ffi_load32((iter_base) + 112)); index264 = index264 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index264 * 8) - let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array226.push(result225) + array263.push(result262) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted229 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted266 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result228) + Option::Some(result265) } _ => panic() } - let lifted232 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted269 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted231 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted268 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -13090,48 +22004,48 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ } 3 => { - let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result230) + @types.Role::Other(result267) } _ => panic() } - Option::Some(lifted231) + Option::Some(lifted268) } _ => panic() } - array233.push(@types.SchemaTypeNode::{body : lifted219, metadata : @types.MetadataEnvelope::{doc : lifted221, aliases : array223, examples : array226, deprecated : lifted229, role : lifted232}}) + array270.push(@types.SchemaTypeNode::{body : lifted256, metadata : @types.MetadataEnvelope::{doc : lifted258, aliases : array260, examples : array263, deprecated : lifted266, role : lifted269}}) } mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) - let array238 : Array[@types.SchemaTypeDef] = []; - for index239 = 0; index239 < (mbt_ffi_load32((return_area) + 24)); index239 = index239 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index239 * 24) + let array275 : Array[@types.SchemaTypeDef] = []; + for index276 = 0; index276 < (mbt_ffi_load32((return_area) + 24)); index276 = index276 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index276 * 24) - let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result272 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted237 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted274 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result273 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result236) + Option::Some(result273) } _ => panic() } - array238.push(@types.SchemaTypeDef::{id : result235, name : lifted237, body : mbt_ffi_load32((iter_base) + 20)}) + array275.push(@types.SchemaTypeDef::{id : result272, name : lifted274, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((return_area) + 20)) - let array270 : Array[@types.SchemaValueNode] = []; - for index271 = 0; index271 < (mbt_ffi_load32((return_area) + 36)); index271 = index271 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index271 * 32) + let array307 : Array[@types.SchemaValueNode] = []; + for index308 = 0; index308 < (mbt_ffi_load32((return_area) + 36)); index308 = index308 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index308 * 32) - let lifted269 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted306 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -13182,25 +22096,25 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ } 12 => { - let result240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result277 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result240) + @types.SchemaValueNode::StringValue(result277) } 13 => { - let array241 : Array[Int] = []; - for index242 = 0; index242 < (mbt_ffi_load32((iter_base) + 12)); index242 = index242 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index242 * 4) + let array278 : Array[Int] = []; + for index279 = 0; index279 < (mbt_ffi_load32((iter_base) + 12)); index279 = index279 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index279 * 4) - array241.push(mbt_ffi_load32((iter_base) + 0)) + array278.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array241) + @types.SchemaValueNode::RecordValue(array278) } 14 => { - let lifted243 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted280 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -13209,7 +22123,7 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted243}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted280}) } 15 => { @@ -13217,67 +22131,67 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ } 16 => { - let array244 : Array[Bool] = []; - for index245 = 0; index245 < (mbt_ffi_load32((iter_base) + 12)); index245 = index245 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index245 * 1) + let array281 : Array[Bool] = []; + for index282 = 0; index282 < (mbt_ffi_load32((iter_base) + 12)); index282 = index282 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index282 * 1) - array244.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array281.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array244) + @types.SchemaValueNode::FlagsValue(array281) } 17 => { - let array246 : Array[Int] = []; - for index247 = 0; index247 < (mbt_ffi_load32((iter_base) + 12)); index247 = index247 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index247 * 4) + let array283 : Array[Int] = []; + for index284 = 0; index284 < (mbt_ffi_load32((iter_base) + 12)); index284 = index284 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index284 * 4) - array246.push(mbt_ffi_load32((iter_base) + 0)) + array283.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array246) + @types.SchemaValueNode::TupleValue(array283) } 18 => { - let array248 : Array[Int] = []; - for index249 = 0; index249 < (mbt_ffi_load32((iter_base) + 12)); index249 = index249 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index249 * 4) + let array285 : Array[Int] = []; + for index286 = 0; index286 < (mbt_ffi_load32((iter_base) + 12)); index286 = index286 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index286 * 4) - array248.push(mbt_ffi_load32((iter_base) + 0)) + array285.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array248) + @types.SchemaValueNode::ListValue(array285) } 19 => { - let array250 : Array[Int] = []; - for index251 = 0; index251 < (mbt_ffi_load32((iter_base) + 12)); index251 = index251 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index251 * 4) + let array287 : Array[Int] = []; + for index288 = 0; index288 < (mbt_ffi_load32((iter_base) + 12)); index288 = index288 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index288 * 4) - array250.push(mbt_ffi_load32((iter_base) + 0)) + array287.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array250) + @types.SchemaValueNode::FixedListValue(array287) } 20 => { - let array252 : Array[@types.MapEntry] = []; - for index253 = 0; index253 < (mbt_ffi_load32((iter_base) + 12)); index253 = index253 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index253 * 8) + let array289 : Array[@types.MapEntry] = []; + for index290 = 0; index290 < (mbt_ffi_load32((iter_base) + 12)); index290 = index290 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index290 * 8) - array252.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array289.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array252) + @types.SchemaValueNode::MapValue(array289) } 21 => { - let lifted254 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted291 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -13286,14 +22200,14 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - @types.SchemaValueNode::OptionValue(lifted254) + @types.SchemaValueNode::OptionValue(lifted291) } 22 => { - let lifted257 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted294 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted255 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted292 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -13302,11 +22216,11 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - @types.ResultValuePayload::OkValue(lifted255) + @types.ResultValuePayload::OkValue(lifted292) } 1 => { - let lifted256 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted293 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -13315,58 +22229,58 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - @types.ResultValuePayload::ErrValue(lifted256) + @types.ResultValuePayload::ErrValue(lifted293) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted257) + @types.SchemaValueNode::ResultValue(lifted294) } 23 => { - let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result295 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted260 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted297 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result259 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result296 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result259) + Option::Some(result296) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result258, language : lifted260}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result295, language : lifted297}) } 24 => { - let result261 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result298 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted263 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted300 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result299 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result262) + Option::Some(result299) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result261, mime_type : lifted263}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result298, mime_type : lifted300}) } 25 => { - let result264 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result301 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result264) + @types.SchemaValueNode::PathValue(result301) } 26 => { - let result265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result265) + @types.SchemaValueNode::UrlValue(result302) } 27 => { @@ -13378,21 +22292,21 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ } 29 => { - let result266 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result303 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result266}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result303}) } 30 => { - let result267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result267, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result304, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result305 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result268}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result305}) } 32 => { @@ -13401,25 +22315,25 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ _ => panic() } - array270.push(lifted269) + array307.push(lifted306) } mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) - @common.AgentError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array233, defs : array238, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array270, root : mbt_ffi_load32((return_area) + 40)}}) + @common.AgentError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array270, defs : array275, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array307, root : mbt_ffi_load32((return_area) + 40)}}) } _ => panic() } - RpcError::RemoteAgentError(lifted272) + RpcError::RemoteAgentError(lifted309) } _ => panic() } - Result::Err(lifted273) + Result::Err(lifted310) } _ => panic() } - let ret = lifted274 + let ret = lifted311 mbt_ffi_free(ptr) mbt_ffi_free(address67) mbt_ffi_free(return_area) @@ -13429,8 +22343,11 @@ pub fn WasmRpc::invoke_and_await(self : WasmRpc, method_name : String, input : @ } ///| -/// Triggers the invocation of a remote method with the given parameters, and returns immediately. -pub fn WasmRpc::invoke(self : WasmRpc, method_name : String, input : @types.SchemaValueTree) -> Result[Unit, RpcError] { +/// Invokes a remote method with the given parameters, and returns a `future-invoke-result` value which can +/// be polled for the result. +/// +/// With this function it is possible to call multiple (different) agents simultaneously. +pub fn WasmRpc::async_invoke_and_await(self : WasmRpc, method_name : String, input : @types.SchemaValueTree) -> FutureInvokeResult { let cleanup_list : Array[Int] = [] let WasmRpc(handle) = self @@ -13837,925 +22754,913 @@ pub fn WasmRpc::invoke(self : WasmRpc, method_name : String, input : @types.Sche () } QuotaTokenHandle(payload65) => { - mbt_ffi_store8((iter_base) + 0, (32)) - - let @types.QuotaToken(handle66) = payload65 - mbt_ffi_store32((iter_base) + 8, handle66) - - () - } - } - - } - let return_area = mbt_ffi_malloc(44) - wasmImportMethodWasmRpcInvoke(handle, ptr, method_name.length(), address67, ((input).value_nodes).length(), (input).root, return_area); - - let lifted241 = match (mbt_ffi_load8_u((return_area) + 0)) { - 0 => { - - Result::Ok(()) - } - 1 => { - - let lifted240 = match (mbt_ffi_load8_u((return_area) + 4)) { - 0 => { - - let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - - RpcError::ProtocolError(result) - } - 1 => { - - let result69 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - - RpcError::Denied(result69) - } - 2 => { - - let result70 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - - RpcError::NotFound(result70) - } - 3 => { - - let result71 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - - RpcError::RemoteInternalError(result71) - } - 4 => { - - let lifted239 = match (mbt_ffi_load8_u((return_area) + 8)) { - 0 => { - - let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - - @common.AgentError::InvalidInput(result72) - } - 1 => { - - let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - - @common.AgentError::InvalidMethod(result73) - } - 2 => { - - let result74 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - - @common.AgentError::InvalidType(result74) - } - 3 => { - - let result75 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - - @common.AgentError::InvalidAgentId(result75) - } - 4 => { - - let array200 : Array[@types.SchemaTypeNode] = []; - for index201 = 0; index201 < (mbt_ffi_load32((return_area) + 16)); index201 = index201 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index201 * 144) - - let lifted186 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { - - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { - - @types.SchemaTypeBody::BoolType - } - 2 => { - - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { - - @types.SchemaTypeBody::S32Type - } - 5 => { - - @types.SchemaTypeBody::S64Type - } - 6 => { - - @types.SchemaTypeBody::U8Type - } - 7 => { - - @types.SchemaTypeBody::U16Type - } - 8 => { - - @types.SchemaTypeBody::U32Type - } - 9 => { - - @types.SchemaTypeBody::U64Type - } - 10 => { - - @types.SchemaTypeBody::F32Type - } - 11 => { - - @types.SchemaTypeBody::F64Type - } - 12 => { - - @types.SchemaTypeBody::CharType - } - 13 => { - - @types.SchemaTypeBody::StringType - } - 14 => { - - let array88 : Array[@types.NamedFieldType] = []; - for index89 = 0; index89 < (mbt_ffi_load32((iter_base) + 12)); index89 = index89 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index89 * 68) - - let result76 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - let lifted : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { - - let result77 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - Option::Some(result77) - } - _ => panic() - } - - let array : Array[String] = []; - for index79 = 0; index79 < (mbt_ffi_load32((iter_base) + 28)); index79 = index79 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index79 * 8) - - let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array.push(result78) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - - let array81 : Array[String] = []; - for index82 = 0; index82 < (mbt_ffi_load32((iter_base) + 36)); index82 = index82 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index82 * 8) - - let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array81.push(result80) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - - let lifted84 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { - - let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - - Option::Some(result83) - } - _ => panic() - } - - let lifted87 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { - - let lifted86 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { - - @types.Role::Multimodal - } - 1 => { - - @types.Role::UnstructuredText - } - 2 => { - - @types.Role::UnstructuredBinary - } - 3 => { - - let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result85) - } - _ => panic() - } - - Option::Some(lifted86) - } - _ => panic() - } - - array88.push(@types.NamedFieldType::{name : result76, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted, aliases : array, examples : array81, deprecated : lifted84, role : lifted87}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::RecordType(array88) - } - 15 => { - - let array105 : Array[@types.VariantCaseType] = []; - for index106 = 0; index106 < (mbt_ffi_load32((iter_base) + 12)); index106 = index106 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index106 * 72) - - let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - let lifted91 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { - - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } - - let lifted93 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + mbt_ffi_store8((iter_base) + 0, (32)) - let result92 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let @types.QuotaToken(handle66) = payload65 + mbt_ffi_store32((iter_base) + 8, handle66) - Option::Some(result92) - } - _ => panic() - } + () + } + } - let array95 : Array[String] = []; - for index96 = 0; index96 < (mbt_ffi_load32((iter_base) + 32)); index96 = index96 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index96 * 8) + } + let result : Int = wasmImportMethodWasmRpcAsyncInvokeAndAwait(handle, ptr, method_name.length(), address67, ((input).value_nodes).length(), (input).root); + let ret = FutureInvokeResult::FutureInvokeResult(result) + mbt_ffi_free(ptr) + mbt_ffi_free(address67) - let result94 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + cleanup_list.each(mbt_ffi_free) + return ret - array95.push(result94) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) +} +///| +/// Schedule invocation for later +pub fn WasmRpc::schedule_invocation(self : WasmRpc, scheduled_time : @wallClock.Datetime, method_name : String, input : @types.SchemaValueTree) -> Unit { + let cleanup_list : Array[Int] = [] - let array98 : Array[String] = []; - for index99 = 0; index99 < (mbt_ffi_load32((iter_base) + 40)); index99 = index99 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index99 * 8) + let WasmRpc(handle) = self - let result97 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let ptr = mbt_ffi_str2ptr(method_name) - array98.push(result97) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + let address67 = mbt_ffi_malloc(((input).value_nodes).length() * 32); + for index68 = 0; index68 < ((input).value_nodes).length(); index68 = index68 + 1 { + let iter_elem : @types.SchemaValueNode = ((input).value_nodes)[(index68)] + let iter_base = address67 + (index68 * 32); - let lifted101 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + match iter_elem { + BoolValue(payload) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) - let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + () + } + S8Value(payload0) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) - Option::Some(result100) - } - _ => panic() - } + () + } + S16Value(payload1) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) - let lifted104 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + () + } + S32Value(payload2) => { + mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload2) - let lifted103 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + () + } + S64Value(payload3) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload3) - @types.Role::Multimodal - } - 1 => { + () + } + U8Value(payload4) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) - @types.Role::UnstructuredText - } - 2 => { + () + } + U16Value(payload5) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) - @types.Role::UnstructuredBinary - } - 3 => { + () + } + U32Value(payload6) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) - let result102 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + () + } + U64Value(payload7) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) - @types.Role::Other(result102) - } - _ => panic() - } + () + } + F32Value(payload8) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload8) - Option::Some(lifted103) - } - _ => panic() - } + () + } + F64Value(payload9) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload9) - array105.push(@types.VariantCaseType::{name : result90, payload : lifted91, metadata : @types.MetadataEnvelope::{doc : lifted93, aliases : array95, examples : array98, deprecated : lifted101, role : lifted104}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + CharValue(payload10) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) - @types.SchemaTypeBody::VariantType(array105) - } - 16 => { + () + } + StringValue(payload11) => { + mbt_ffi_store8((iter_base) + 0, (12)) - let array108 : Array[String] = []; - for index109 = 0; index109 < (mbt_ffi_load32((iter_base) + 12)); index109 = index109 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index109 * 8) + let ptr12 = mbt_ffi_str2ptr(payload11) + mbt_ffi_store32((iter_base) + 12, payload11.length()) + mbt_ffi_store32((iter_base) + 8, ptr12) + cleanup_list.push(ptr12) - let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + RecordValue(payload13) => { + mbt_ffi_store8((iter_base) + 0, (13)) - array108.push(result107) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let address = mbt_ffi_malloc((payload13).length() * 4); + for index = 0; index < (payload13).length(); index = index + 1 { + let iter_elem : Int = (payload13)[(index)] + let iter_base = address + (index * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - @types.SchemaTypeBody::EnumType(array108) - } - 17 => { + } + mbt_ffi_store32((iter_base) + 12, (payload13).length()) + mbt_ffi_store32((iter_base) + 8, address) + cleanup_list.push(address) - let array111 : Array[String] = []; - for index112 = 0; index112 < (mbt_ffi_load32((iter_base) + 12)); index112 = index112 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index112 * 8) + () + } + VariantValue(payload14) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) - let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + match ((payload14).payload) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - array111.push(result110) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + Some(payload16) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload16) - @types.SchemaTypeBody::FlagsType(array111) - } - 18 => { + () + } + } - let array113 : Array[Int] = []; - for index114 = 0; index114 < (mbt_ffi_load32((iter_base) + 12)); index114 = index114 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index114 * 4) + () + } + EnumValue(payload17) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) - array113.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + FlagsValue(payload18) => { + mbt_ffi_store8((iter_base) + 0, (16)) - @types.SchemaTypeBody::TupleType(array113) - } - 19 => { + let address19 = mbt_ffi_malloc((payload18).length() * 1); + for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { + let iter_elem : Bool = (payload18)[(index20)] + let iter_base = address19 + (index20 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + } + mbt_ffi_store32((iter_base) + 12, (payload18).length()) + mbt_ffi_store32((iter_base) + 8, address19) + cleanup_list.push(address19) - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + () + } + TupleValue(payload21) => { + mbt_ffi_store8((iter_base) + 0, (17)) - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + let address22 = mbt_ffi_malloc((payload21).length() * 4); + for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { + let iter_elem : Int = (payload21)[(index23)] + let iter_base = address22 + (index23 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) - } - 23 => { + } + mbt_ffi_store32((iter_base) + 12, (payload21).length()) + mbt_ffi_store32((iter_base) + 8, address22) + cleanup_list.push(address22) - let lifted115 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + ListValue(payload24) => { + mbt_ffi_store8((iter_base) + 0, (18)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let address25 = mbt_ffi_malloc((payload24).length() * 4); + for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { + let iter_elem : Int = (payload24)[(index26)] + let iter_base = address25 + (index26 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - let lifted116 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + } + mbt_ffi_store32((iter_base) + 12, (payload24).length()) + mbt_ffi_store32((iter_base) + 8, address25) + cleanup_list.push(address25) - Option::Some(mbt_ffi_load32((iter_base) + 20)) - } - _ => panic() - } + () + } + FixedListValue(payload27) => { + mbt_ffi_store8((iter_base) + 0, (19)) - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted115, err : lifted116}) - } - 24 => { + let address28 = mbt_ffi_malloc((payload27).length() * 4); + for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { + let iter_elem : Int = (payload27)[(index29)] + let iter_base = address28 + (index29 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - let lifted120 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + } + mbt_ffi_store32((iter_base) + 12, (payload27).length()) + mbt_ffi_store32((iter_base) + 8, address28) + cleanup_list.push(address28) - let array118 : Array[String] = []; - for index119 = 0; index119 < (mbt_ffi_load32((iter_base) + 16)); index119 = index119 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index119 * 8) + () + } + MapValue(payload30) => { + mbt_ffi_store8((iter_base) + 0, (20)) - let result117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let address31 = mbt_ffi_malloc((payload30).length() * 8); + for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { + let iter_elem : @types.MapEntry = (payload30)[(index32)] + let iter_base = address31 + (index32 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) - array118.push(result117) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + } + mbt_ffi_store32((iter_base) + 12, (payload30).length()) + mbt_ffi_store32((iter_base) + 8, address31) + cleanup_list.push(address31) - Option::Some(array118) - } - _ => panic() - } + () + } + OptionValue(payload33) => { + mbt_ffi_store8((iter_base) + 0, (21)) - let lifted121 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + match (payload33) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + () + } + Some(payload35) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload35) - let lifted122 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + () + } + } - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + () + } + ResultValue(payload36) => { + mbt_ffi_store8((iter_base) + 0, (22)) - let lifted124 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + match payload36 { + OkValue(payload37) => { + mbt_ffi_store8((iter_base) + 8, (0)) - let result123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + match (payload37) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - Option::Some(result123) - } - _ => panic() - } + () + } + Some(payload39) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload39) - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted120, min_length : lifted121, max_length : lifted122, regex : lifted124}) - } - 25 => { + () + } + } - let lifted128 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + ErrValue(payload40) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let array126 : Array[String] = []; - for index127 = 0; index127 < (mbt_ffi_load32((iter_base) + 16)); index127 = index127 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index127 * 8) + match (payload40) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + Some(payload42) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload42) - array126.push(result125) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + () + } + } - Option::Some(array126) - } - _ => panic() - } + () + } + } - let lifted129 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + () + } + TextValue(payload43) => { + mbt_ffi_store8((iter_base) + 0, (23)) - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let ptr44 = mbt_ffi_str2ptr((payload43).text) + mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr44) - let lifted130 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + match ((payload43).language) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + () + } + Some(payload46) => { + mbt_ffi_store8((iter_base) + 16, (1)) - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted128, min_bytes : lifted129, max_bytes : lifted130}) - } - 26 => { + let ptr47 = mbt_ffi_str2ptr(payload46) + mbt_ffi_store32((iter_base) + 24, payload46.length()) + mbt_ffi_store32((iter_base) + 20, ptr47) + cleanup_list.push(ptr47) - let lifted134 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + () + } + } + cleanup_list.push(ptr44) - let array132 : Array[String] = []; - for index133 = 0; index133 < (mbt_ffi_load32((iter_base) + 20)); index133 = index133 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index133 * 8) + () + } + BinaryValue(payload48) => { + mbt_ffi_store8((iter_base) + 0, (24)) - let result131 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) - array132.push(result131) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr49) - Option::Some(array132) - } - _ => panic() - } + match ((payload48).mime_type) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let lifted138 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + () + } + Some(payload51) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let array136 : Array[String] = []; - for index137 = 0; index137 < (mbt_ffi_load32((iter_base) + 32)); index137 = index137 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index137 * 8) + let ptr52 = mbt_ffi_str2ptr(payload51) + mbt_ffi_store32((iter_base) + 24, payload51.length()) + mbt_ffi_store32((iter_base) + 20, ptr52) + cleanup_list.push(ptr52) - let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + } + cleanup_list.push(ptr49) - array136.push(result135) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + () + } + PathValue(payload53) => { + mbt_ffi_store8((iter_base) + 0, (25)) - Option::Some(array136) - } - _ => panic() - } + let ptr54 = mbt_ffi_str2ptr(payload53) + mbt_ffi_store32((iter_base) + 12, payload53.length()) + mbt_ffi_store32((iter_base) + 8, ptr54) + cleanup_list.push(ptr54) - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted134, allowed_extensions : lifted138}) - } - 27 => { + () + } + UrlValue(payload55) => { + mbt_ffi_store8((iter_base) + 0, (26)) - let lifted142 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let ptr56 = mbt_ffi_str2ptr(payload55) + mbt_ffi_store32((iter_base) + 12, payload55.length()) + mbt_ffi_store32((iter_base) + 8, ptr56) + cleanup_list.push(ptr56) - let array140 : Array[String] = []; - for index141 = 0; index141 < (mbt_ffi_load32((iter_base) + 16)); index141 = index141 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index141 * 8) + () + } + DatetimeValue(payload57) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload57).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) - let result139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + DurationValue(payload58) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) - array140.push(result139) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + () + } + QuantityValueNode(payload59) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload59).scale) - Option::Some(array140) - } - _ => panic() - } + let ptr60 = mbt_ffi_str2ptr((payload59).unit) + mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr60) + cleanup_list.push(ptr60) - let lifted146 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + () + } + UnionValue(payload61) => { + mbt_ffi_store8((iter_base) + 0, (30)) - let array144 : Array[String] = []; - for index145 = 0; index145 < (mbt_ffi_load32((iter_base) + 28)); index145 = index145 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index145 * 8) + let ptr62 = mbt_ffi_str2ptr((payload61).tag) + mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr62) + mbt_ffi_store32((iter_base) + 16, (payload61).body) + cleanup_list.push(ptr62) - let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + SecretValue(payload63) => { + mbt_ffi_store8((iter_base) + 0, (31)) - array144.push(result143) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr64) + cleanup_list.push(ptr64) - Option::Some(array144) - } - _ => panic() - } + () + } + QuotaTokenHandle(payload65) => { + mbt_ffi_store8((iter_base) + 0, (32)) - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted142, allowed_hosts : lifted146}) - } - 28 => { + let @types.QuotaToken(handle66) = payload65 + mbt_ffi_store32((iter_base) + 8, handle66) - @types.SchemaTypeBody::DatetimeType - } - 29 => { + () + } + } - @types.SchemaTypeBody::DurationType - } - 30 => { + } + wasmImportMethodWasmRpcScheduleInvocation(handle, ((scheduled_time).seconds).reinterpret_as_int64(), ((scheduled_time).nanoseconds).reinterpret_as_int(), ptr, method_name.length(), address67, ((input).value_nodes).length(), (input).root); + mbt_ffi_free(ptr) + mbt_ffi_free(address67) - let result147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + cleanup_list.each(mbt_ffi_free) - let array149 : Array[String] = []; - for index150 = 0; index150 < (mbt_ffi_load32((iter_base) + 20)); index150 = index150 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index150 * 8) +} +///| +/// Schedule invocation for later. Call cancel on the returned resource to cancel the invocation before the scheduled time. +pub fn WasmRpc::schedule_cancelable_invocation(self : WasmRpc, scheduled_time : @wallClock.Datetime, method_name : String, input : @types.SchemaValueTree) -> CancellationToken { + let cleanup_list : Array[Int] = [] - let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let WasmRpc(handle) = self - array149.push(result148) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + let ptr = mbt_ffi_str2ptr(method_name) - let lifted152 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + let address67 = mbt_ffi_malloc(((input).value_nodes).length() * 32); + for index68 = 0; index68 < ((input).value_nodes).length(); index68 = index68 + 1 { + let iter_elem : @types.SchemaValueNode = ((input).value_nodes)[(index68)] + let iter_base = address67 + (index68 * 32); - let result151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + match iter_elem { + BoolValue(payload) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result151}) - } - _ => panic() - } + () + } + S8Value(payload0) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) - let lifted154 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + () + } + S16Value(payload1) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) - let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + () + } + S32Value(payload2) => { + mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload2) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result153}) - } - _ => panic() - } + () + } + S64Value(payload3) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload3) - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result147, allowed_suffixes : array149, min : lifted152, max : lifted154}) - } - 31 => { + () + } + U8Value(payload4) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) - let array178 : Array[@types.UnionBranch] = []; - for index179 = 0; index179 < (mbt_ffi_load32((iter_base) + 12)); index179 = index179 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index179 * 92) + () + } + U16Value(payload5) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) + + () + } + U32Value(payload6) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) - let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + U64Value(payload7) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) - let lifted164 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + () + } + F32Value(payload8) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload8) - let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + () + } + F64Value(payload9) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload9) - @types.DiscriminatorRule::Prefix(result156) - } - 1 => { + () + } + CharValue(payload10) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) - let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + () + } + StringValue(payload11) => { + mbt_ffi_store8((iter_base) + 0, (12)) - @types.DiscriminatorRule::Suffix(result157) - } - 2 => { + let ptr12 = mbt_ffi_str2ptr(payload11) + mbt_ffi_store32((iter_base) + 12, payload11.length()) + mbt_ffi_store32((iter_base) + 8, ptr12) + cleanup_list.push(ptr12) - let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + () + } + RecordValue(payload13) => { + mbt_ffi_store8((iter_base) + 0, (13)) - @types.DiscriminatorRule::Contains(result158) - } - 3 => { + let address = mbt_ffi_malloc((payload13).length() * 4); + for index = 0; index < (payload13).length(); index = index + 1 { + let iter_elem : Int = (payload13)[(index)] + let iter_base = address + (index * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - let result159 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + } + mbt_ffi_store32((iter_base) + 12, (payload13).length()) + mbt_ffi_store32((iter_base) + 8, address) + cleanup_list.push(address) - @types.DiscriminatorRule::Regex(result159) - } - 4 => { + () + } + VariantValue(payload14) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) - let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + match ((payload14).payload) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - let lifted162 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + () + } + Some(payload16) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload16) - let result161 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + () + } + } - Option::Some(result161) - } - _ => panic() - } + () + } + EnumValue(payload17) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result160, literal : lifted162}) - } - 5 => { + () + } + FlagsValue(payload18) => { + mbt_ffi_store8((iter_base) + 0, (16)) - let result163 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let address19 = mbt_ffi_malloc((payload18).length() * 1); + for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { + let iter_elem : Bool = (payload18)[(index20)] + let iter_base = address19 + (index20 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) - @types.DiscriminatorRule::FieldAbsent(result163) - } - _ => panic() - } + } + mbt_ffi_store32((iter_base) + 12, (payload18).length()) + mbt_ffi_store32((iter_base) + 8, address19) + cleanup_list.push(address19) - let lifted166 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + () + } + TupleValue(payload21) => { + mbt_ffi_store8((iter_base) + 0, (17)) - let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let address22 = mbt_ffi_malloc((payload21).length() * 4); + for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { + let iter_elem : Int = (payload21)[(index23)] + let iter_base = address22 + (index23 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - Option::Some(result165) - } - _ => panic() - } + } + mbt_ffi_store32((iter_base) + 12, (payload21).length()) + mbt_ffi_store32((iter_base) + 8, address22) + cleanup_list.push(address22) - let array168 : Array[String] = []; - for index169 = 0; index169 < (mbt_ffi_load32((iter_base) + 52)); index169 = index169 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index169 * 8) + () + } + ListValue(payload24) => { + mbt_ffi_store8((iter_base) + 0, (18)) - let result167 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let address25 = mbt_ffi_malloc((payload24).length() * 4); + for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { + let iter_elem : Int = (payload24)[(index26)] + let iter_base = address25 + (index26 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - array168.push(result167) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + } + mbt_ffi_store32((iter_base) + 12, (payload24).length()) + mbt_ffi_store32((iter_base) + 8, address25) + cleanup_list.push(address25) - let array171 : Array[String] = []; - for index172 = 0; index172 < (mbt_ffi_load32((iter_base) + 60)); index172 = index172 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index172 * 8) + () + } + FixedListValue(payload27) => { + mbt_ffi_store8((iter_base) + 0, (19)) - let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let address28 = mbt_ffi_malloc((payload27).length() * 4); + for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { + let iter_elem : Int = (payload27)[(index29)] + let iter_base = address28 + (index29 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - array171.push(result170) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + } + mbt_ffi_store32((iter_base) + 12, (payload27).length()) + mbt_ffi_store32((iter_base) + 8, address28) + cleanup_list.push(address28) - let lifted174 : String? = match mbt_ffi_load8_u((iter_base) + 64) { - 0 => Option::None - 1 => { + () + } + MapValue(payload30) => { + mbt_ffi_store8((iter_base) + 0, (20)) - let result173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let address31 = mbt_ffi_malloc((payload30).length() * 8); + for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { + let iter_elem : @types.MapEntry = (payload30)[(index32)] + let iter_base = address31 + (index32 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) - Option::Some(result173) - } - _ => panic() - } + } + mbt_ffi_store32((iter_base) + 12, (payload30).length()) + mbt_ffi_store32((iter_base) + 8, address31) + cleanup_list.push(address31) - let lifted177 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { - 0 => Option::None - 1 => { + () + } + OptionValue(payload33) => { + mbt_ffi_store8((iter_base) + 0, (21)) - let lifted176 = match (mbt_ffi_load8_u((iter_base) + 80)) { - 0 => { + match (payload33) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - @types.Role::Multimodal - } - 1 => { + () + } + Some(payload35) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload35) - @types.Role::UnstructuredText - } - 2 => { + () + } + } - @types.Role::UnstructuredBinary - } - 3 => { + () + } + ResultValue(payload36) => { + mbt_ffi_store8((iter_base) + 0, (22)) - let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + match payload36 { + OkValue(payload37) => { + mbt_ffi_store8((iter_base) + 8, (0)) - @types.Role::Other(result175) - } - _ => panic() - } + match (payload37) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - Option::Some(lifted176) - } - _ => panic() - } + () + } + Some(payload39) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload39) - array178.push(@types.UnionBranch::{tag : result155, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted164, metadata : @types.MetadataEnvelope::{doc : lifted166, aliases : array168, examples : array171, deprecated : lifted174, role : lifted177}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + } - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array178}) - } - 32 => { + () + } + ErrValue(payload40) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let lifted181 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + match (payload40) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + () + } + Some(payload42) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload42) - Option::Some(result180) - } - _ => panic() - } + () + } + } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted181}) - } - 33 => { + () + } + } - let lifted183 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + TextValue(payload43) => { + mbt_ffi_store8((iter_base) + 0, (23)) - let result182 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let ptr44 = mbt_ffi_str2ptr((payload43).text) + mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr44) - Option::Some(result182) - } - _ => panic() - } + match ((payload43).language) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted183}) - } - 34 => { + () + } + Some(payload46) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let lifted184 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let ptr47 = mbt_ffi_str2ptr(payload46) + mbt_ffi_store32((iter_base) + 24, payload46.length()) + mbt_ffi_store32((iter_base) + 20, ptr47) + cleanup_list.push(ptr47) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + () + } + } + cleanup_list.push(ptr44) - @types.SchemaTypeBody::FutureType(lifted184) - } - 35 => { + () + } + BinaryValue(payload48) => { + mbt_ffi_store8((iter_base) + 0, (24)) - let lifted185 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr49) - @types.SchemaTypeBody::StreamType(lifted185) - } - _ => panic() - } + match ((payload48).mime_type) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let lifted188 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { + () + } + Some(payload51) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let ptr52 = mbt_ffi_str2ptr(payload51) + mbt_ffi_store32((iter_base) + 24, payload51.length()) + mbt_ffi_store32((iter_base) + 20, ptr52) + cleanup_list.push(ptr52) - Option::Some(result187) - } - _ => panic() - } + () + } + } + cleanup_list.push(ptr49) - let array190 : Array[String] = []; - for index191 = 0; index191 < (mbt_ffi_load32((iter_base) + 104)); index191 = index191 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index191 * 8) + () + } + PathValue(payload53) => { + mbt_ffi_store8((iter_base) + 0, (25)) - let result189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let ptr54 = mbt_ffi_str2ptr(payload53) + mbt_ffi_store32((iter_base) + 12, payload53.length()) + mbt_ffi_store32((iter_base) + 8, ptr54) + cleanup_list.push(ptr54) - array190.push(result189) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + () + } + UrlValue(payload55) => { + mbt_ffi_store8((iter_base) + 0, (26)) - let array193 : Array[String] = []; - for index194 = 0; index194 < (mbt_ffi_load32((iter_base) + 112)); index194 = index194 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index194 * 8) + let ptr56 = mbt_ffi_str2ptr(payload55) + mbt_ffi_store32((iter_base) + 12, payload55.length()) + mbt_ffi_store32((iter_base) + 8, ptr56) + cleanup_list.push(ptr56) - let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + DatetimeValue(payload57) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload57).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) - array193.push(result192) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + () + } + DurationValue(payload58) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) - let lifted196 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + () + } + QuantityValueNode(payload59) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload59).scale) - let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let ptr60 = mbt_ffi_str2ptr((payload59).unit) + mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr60) + cleanup_list.push(ptr60) - Option::Some(result195) - } - _ => panic() - } + () + } + UnionValue(payload61) => { + mbt_ffi_store8((iter_base) + 0, (30)) - let lifted199 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + let ptr62 = mbt_ffi_str2ptr((payload61).tag) + mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr62) + mbt_ffi_store32((iter_base) + 16, (payload61).body) + cleanup_list.push(ptr62) - let lifted198 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + () + } + SecretValue(payload63) => { + mbt_ffi_store8((iter_base) + 0, (31)) - @types.Role::Multimodal - } - 1 => { + let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr64) + cleanup_list.push(ptr64) - @types.Role::UnstructuredText - } - 2 => { + () + } + QuotaTokenHandle(payload65) => { + mbt_ffi_store8((iter_base) + 0, (32)) - @types.Role::UnstructuredBinary - } - 3 => { + let @types.QuotaToken(handle66) = payload65 + mbt_ffi_store32((iter_base) + 8, handle66) - let result197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + () + } + } - @types.Role::Other(result197) - } - _ => panic() - } + } + let result : Int = wasmImportMethodWasmRpcScheduleCancelableInvocation(handle, ((scheduled_time).seconds).reinterpret_as_int64(), ((scheduled_time).nanoseconds).reinterpret_as_int(), ptr, method_name.length(), address67, ((input).value_nodes).length(), (input).root); + let ret = CancellationToken::CancellationToken(result) + mbt_ffi_free(ptr) + mbt_ffi_free(address67) - Option::Some(lifted198) - } - _ => panic() - } + cleanup_list.each(mbt_ffi_free) + return ret - array200.push(@types.SchemaTypeNode::{body : lifted186, metadata : @types.MetadataEnvelope::{doc : lifted188, aliases : array190, examples : array193, deprecated : lifted196, role : lifted199}}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) +} +///| +/// Subscribes to the result of the invocation +pub fn FutureInvokeResult::subscribe(self : FutureInvokeResult) -> @poll.Pollable { - let array205 : Array[@types.SchemaTypeDef] = []; - for index206 = 0; index206 < (mbt_ffi_load32((return_area) + 24)); index206 = index206 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index206 * 24) + let FutureInvokeResult(handle) = self + let result : Int = wasmImportMethodFutureInvokeResultSubscribe(handle); + let ret = @poll.Pollable::Pollable(result) + return ret - let result202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) +} +///| +/// Poll for the invocation. If the invocation has not completed yet, returns `none`. +pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@types.SchemaValueTree?, RpcError]? { - let lifted204 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let FutureInvokeResult(handle) = self + let return_area = mbt_ffi_malloc(48) + wasmImportMethodFutureInvokeResultGet(handle, return_area); - let result203 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let lifted275 : Result[@types.SchemaValueTree?, RpcError]? = match mbt_ffi_load8_u((return_area) + 0) { + 0 => Option::None + 1 => { - Option::Some(result203) - } - _ => panic() - } + let lifted274 = match (mbt_ffi_load8_u((return_area) + 4)) { + 0 => { - array205.push(@types.SchemaTypeDef::{id : result202, name : lifted204, body : mbt_ffi_load32((iter_base) + 20)}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 20)) + let lifted28 : @types.SchemaValueTree? = match mbt_ffi_load8_u((return_area) + 8) { + 0 => Option::None + 1 => { - let array237 : Array[@types.SchemaValueNode] = []; - for index238 = 0; index238 < (mbt_ffi_load32((return_area) + 36)); index238 = index238 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index238 * 32) + let array26 : Array[@types.SchemaValueNode] = []; + for index27 = 0; index27 < (mbt_ffi_load32((return_area) + 16)); index27 = index27 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index27 * 32) - let lifted236 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted25 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -14806,25 +23711,25 @@ pub fn WasmRpc::invoke(self : WasmRpc, method_name : String, input : @types.Sche } 12 => { - let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result207) + @types.SchemaValueNode::StringValue(result) } 13 => { - let array208 : Array[Int] = []; - for index209 = 0; index209 < (mbt_ffi_load32((iter_base) + 12)); index209 = index209 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index209 * 4) + let array : Array[Int] = []; + for index = 0; index < (mbt_ffi_load32((iter_base) + 12)); index = index + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index * 4) - array208.push(mbt_ffi_load32((iter_base) + 0)) + array.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array208) + @types.SchemaValueNode::RecordValue(array) } 14 => { - let lifted210 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -14833,7 +23738,7 @@ pub fn WasmRpc::invoke(self : WasmRpc, method_name : String, input : @types.Sche _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted210}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted}) } 15 => { @@ -14841,67 +23746,67 @@ pub fn WasmRpc::invoke(self : WasmRpc, method_name : String, input : @types.Sche } 16 => { - let array211 : Array[Bool] = []; - for index212 = 0; index212 < (mbt_ffi_load32((iter_base) + 12)); index212 = index212 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index212 * 1) + let array0 : Array[Bool] = []; + for index1 = 0; index1 < (mbt_ffi_load32((iter_base) + 12)); index1 = index1 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1 * 1) - array211.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array0.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array211) + @types.SchemaValueNode::FlagsValue(array0) } 17 => { - let array213 : Array[Int] = []; - for index214 = 0; index214 < (mbt_ffi_load32((iter_base) + 12)); index214 = index214 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index214 * 4) + let array2 : Array[Int] = []; + for index3 = 0; index3 < (mbt_ffi_load32((iter_base) + 12)); index3 = index3 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index3 * 4) - array213.push(mbt_ffi_load32((iter_base) + 0)) + array2.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array213) + @types.SchemaValueNode::TupleValue(array2) } 18 => { - let array215 : Array[Int] = []; - for index216 = 0; index216 < (mbt_ffi_load32((iter_base) + 12)); index216 = index216 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index216 * 4) + let array4 : Array[Int] = []; + for index5 = 0; index5 < (mbt_ffi_load32((iter_base) + 12)); index5 = index5 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index5 * 4) - array215.push(mbt_ffi_load32((iter_base) + 0)) + array4.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array215) + @types.SchemaValueNode::ListValue(array4) } 19 => { - let array217 : Array[Int] = []; - for index218 = 0; index218 < (mbt_ffi_load32((iter_base) + 12)); index218 = index218 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index218 * 4) + let array6 : Array[Int] = []; + for index7 = 0; index7 < (mbt_ffi_load32((iter_base) + 12)); index7 = index7 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index7 * 4) - array217.push(mbt_ffi_load32((iter_base) + 0)) + array6.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array217) + @types.SchemaValueNode::FixedListValue(array6) } 20 => { - let array219 : Array[@types.MapEntry] = []; - for index220 = 0; index220 < (mbt_ffi_load32((iter_base) + 12)); index220 = index220 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index220 * 8) + let array8 : Array[@types.MapEntry] = []; + for index9 = 0; index9 < (mbt_ffi_load32((iter_base) + 12)); index9 = index9 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index9 * 8) - array219.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array8.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array219) + @types.SchemaValueNode::MapValue(array8) } 21 => { - let lifted221 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted10 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -14910,14 +23815,14 @@ pub fn WasmRpc::invoke(self : WasmRpc, method_name : String, input : @types.Sche _ => panic() } - @types.SchemaValueNode::OptionValue(lifted221) + @types.SchemaValueNode::OptionValue(lifted10) } 22 => { - let lifted224 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted13 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted222 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted11 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -14926,11 +23831,11 @@ pub fn WasmRpc::invoke(self : WasmRpc, method_name : String, input : @types.Sche _ => panic() } - @types.ResultValuePayload::OkValue(lifted222) + @types.ResultValuePayload::OkValue(lifted11) } 1 => { - let lifted223 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted12 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -14939,58 +23844,58 @@ pub fn WasmRpc::invoke(self : WasmRpc, method_name : String, input : @types.Sche _ => panic() } - @types.ResultValuePayload::ErrValue(lifted223) + @types.ResultValuePayload::ErrValue(lifted12) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted224) + @types.SchemaValueNode::ResultValue(lifted13) } 23 => { - let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result14 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted227 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted16 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result15 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result226) + Option::Some(result15) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result225, language : lifted227}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result14, language : lifted16}) } 24 => { - let result228 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result17 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted230 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted19 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result229 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result18 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result229) + Option::Some(result18) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result228, mime_type : lifted230}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result17, mime_type : lifted19}) } 25 => { - let result231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result20 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result231) + @types.SchemaValueNode::PathValue(result20) } 26 => { - let result232 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result21 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result232) + @types.SchemaValueNode::UrlValue(result21) } 27 => { @@ -15002,21 +23907,21 @@ pub fn WasmRpc::invoke(self : WasmRpc, method_name : String, input : @types.Sche } 29 => { - let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result22 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result233}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result22}) } 30 => { - let result234 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result23 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result234, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result23, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result24 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result235}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result24}) } 32 => { @@ -15025,1991 +23930,1764 @@ pub fn WasmRpc::invoke(self : WasmRpc, method_name : String, input : @types.Sche _ => panic() } - array237.push(lifted236) + array26.push(lifted25) } - mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) + mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) - @common.AgentError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array200, defs : array205, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array237, root : mbt_ffi_load32((return_area) + 40)}}) + Option::Some(@types.SchemaValueTree::{value_nodes : array26, root : mbt_ffi_load32((return_area) + 20)}) } _ => panic() } - RpcError::RemoteAgentError(lifted239) + Result::Ok(lifted28) } - _ => panic() - } + 1 => { - Result::Err(lifted240) - } - _ => panic() - } - let ret = lifted241 - mbt_ffi_free(ptr) - mbt_ffi_free(address67) - mbt_ffi_free(return_area) + let lifted273 = match (mbt_ffi_load8_u((return_area) + 8)) { + 0 => { - cleanup_list.each(mbt_ffi_free) - return ret + let result29 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) -} -///| -/// Invokes a remote method with the given parameters, and returns a `future-invoke-result` value which can -/// be polled for the result. -/// -/// With this function it is possible to call multiple (different) agents simultaneously. -pub fn WasmRpc::async_invoke_and_await(self : WasmRpc, method_name : String, input : @types.SchemaValueTree) -> FutureInvokeResult { - let cleanup_list : Array[Int] = [] + RpcError::ProtocolError(result29) + } + 1 => { + + let result30 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + RpcError::Denied(result30) + } + 2 => { + + let result31 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + RpcError::NotFound(result31) + } + 3 => { + + let result32 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + RpcError::RemoteInternalError(result32) + } + 4 => { + + let lifted272 = match (mbt_ffi_load8_u((return_area) + 12)) { + 0 => { + + let result33 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + + @common.AgentError::InvalidInput(result33) + } + 1 => { + + let result34 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + + @common.AgentError::InvalidMethod(result34) + } + 2 => { + + let result35 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + + @common.AgentError::InvalidType(result35) + } + 3 => { + + let result36 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + + @common.AgentError::InvalidAgentId(result36) + } + 4 => { + + let array233 : Array[@types.SchemaTypeNode] = []; + for index234 = 0; index234 < (mbt_ffi_load32((return_area) + 20)); index234 = index234 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index234 * 144) + + let lifted219 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { + + @types.SchemaTypeBody::BoolType + } + 2 => { + + let lifted43 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted38 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted37 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted37) + } + _ => panic() + } + + let lifted40 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted39 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted39) + } + _ => panic() + } + + let lifted42 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result41 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result41) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted38, max : lifted40, unit : lifted42}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted43) + } + 3 => { + + let lifted50 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted45 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted44 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted44) + } + _ => panic() + } + + let lifted47 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted46 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted46) + } + _ => panic() + } + + let lifted49 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result48 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result48) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted45, max : lifted47, unit : lifted49}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted50) + } + 4 => { + + let lifted57 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted52 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted51 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted51) + } + _ => panic() + } + + let lifted54 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let WasmRpc(handle) = self + let lifted53 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let ptr = mbt_ffi_str2ptr(method_name) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let address67 = mbt_ffi_malloc(((input).value_nodes).length() * 32); - for index68 = 0; index68 < ((input).value_nodes).length(); index68 = index68 + 1 { - let iter_elem : @types.SchemaValueNode = ((input).value_nodes)[(index68)] - let iter_base = address67 + (index68 * 32); + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - match iter_elem { - BoolValue(payload) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - S8Value(payload0) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) + Option::Some(lifted53) + } + _ => panic() + } - () - } - S16Value(payload1) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) + let lifted56 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - S32Value(payload2) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload2) + let result55 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - S64Value(payload3) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload3) + Option::Some(result55) + } + _ => panic() + } - () - } - U8Value(payload4) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) + Option::Some(@types.NumericRestrictions::{min : lifted52, max : lifted54, unit : lifted56}) + } + _ => panic() + } - () - } - U16Value(payload5) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) + @types.SchemaTypeBody::S32Type(lifted57) + } + 5 => { - () - } - U32Value(payload6) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) + let lifted64 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - U64Value(payload7) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) + let lifted59 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - F32Value(payload8) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload8) + let lifted58 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - F64Value(payload9) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload9) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - CharValue(payload10) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - StringValue(payload11) => { - mbt_ffi_store8((iter_base) + 0, (12)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let ptr12 = mbt_ffi_str2ptr(payload11) - mbt_ffi_store32((iter_base) + 12, payload11.length()) - mbt_ffi_store32((iter_base) + 8, ptr12) - cleanup_list.push(ptr12) + Option::Some(lifted58) + } + _ => panic() + } - () - } - RecordValue(payload13) => { - mbt_ffi_store8((iter_base) + 0, (13)) + let lifted61 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let address = mbt_ffi_malloc((payload13).length() * 4); - for index = 0; index < (payload13).length(); index = index + 1 { - let iter_elem : Int = (payload13)[(index)] - let iter_base = address + (index * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted60 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - } - mbt_ffi_store32((iter_base) + 12, (payload13).length()) - mbt_ffi_store32((iter_base) + 8, address) - cleanup_list.push(address) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - VariantValue(payload14) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - match ((payload14).payload) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload16) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload16) + Option::Some(lifted60) + } + _ => panic() + } - () - } - } + let lifted63 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - EnumValue(payload17) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) + let result62 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - FlagsValue(payload18) => { - mbt_ffi_store8((iter_base) + 0, (16)) + Option::Some(result62) + } + _ => panic() + } - let address19 = mbt_ffi_malloc((payload18).length() * 1); - for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { - let iter_elem : Bool = (payload18)[(index20)] - let iter_base = address19 + (index20 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + Option::Some(@types.NumericRestrictions::{min : lifted59, max : lifted61, unit : lifted63}) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload18).length()) - mbt_ffi_store32((iter_base) + 8, address19) - cleanup_list.push(address19) + @types.SchemaTypeBody::S64Type(lifted64) + } + 6 => { - () - } - TupleValue(payload21) => { - mbt_ffi_store8((iter_base) + 0, (17)) + let lifted71 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let address22 = mbt_ffi_malloc((payload21).length() * 4); - for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { - let iter_elem : Int = (payload21)[(index23)] - let iter_base = address22 + (index23 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted66 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload21).length()) - mbt_ffi_store32((iter_base) + 8, address22) - cleanup_list.push(address22) + let lifted65 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - ListValue(payload24) => { - mbt_ffi_store8((iter_base) + 0, (18)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let address25 = mbt_ffi_malloc((payload24).length() * 4); - for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { - let iter_elem : Int = (payload24)[(index26)] - let iter_base = address25 + (index26 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - } - mbt_ffi_store32((iter_base) + 12, (payload24).length()) - mbt_ffi_store32((iter_base) + 8, address25) - cleanup_list.push(address25) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - FixedListValue(payload27) => { - mbt_ffi_store8((iter_base) + 0, (19)) + Option::Some(lifted65) + } + _ => panic() + } - let address28 = mbt_ffi_malloc((payload27).length() * 4); - for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { - let iter_elem : Int = (payload27)[(index29)] - let iter_base = address28 + (index29 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted68 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload27).length()) - mbt_ffi_store32((iter_base) + 8, address28) - cleanup_list.push(address28) + let lifted67 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - MapValue(payload30) => { - mbt_ffi_store8((iter_base) + 0, (20)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let address31 = mbt_ffi_malloc((payload30).length() * 8); - for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { - let iter_elem : @types.MapEntry = (payload30)[(index32)] - let iter_base = address31 + (index32 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - } - mbt_ffi_store32((iter_base) + 12, (payload30).length()) - mbt_ffi_store32((iter_base) + 8, address31) - cleanup_list.push(address31) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - OptionValue(payload33) => { - mbt_ffi_store8((iter_base) + 0, (21)) + Option::Some(lifted67) + } + _ => panic() + } - match (payload33) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted70 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - Some(payload35) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload35) + let result69 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - } + Option::Some(result69) + } + _ => panic() + } - () - } - ResultValue(payload36) => { - mbt_ffi_store8((iter_base) + 0, (22)) + Option::Some(@types.NumericRestrictions::{min : lifted66, max : lifted68, unit : lifted70}) + } + _ => panic() + } - match payload36 { - OkValue(payload37) => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.SchemaTypeBody::U8Type(lifted71) + } + 7 => { - match (payload37) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let lifted78 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - Some(payload39) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload39) + let lifted73 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - } + let lifted72 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - ErrValue(payload40) => { - mbt_ffi_store8((iter_base) + 8, (1)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - match (payload40) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - Some(payload42) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload42) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - } + Option::Some(lifted72) + } + _ => panic() + } - () - } - } + let lifted75 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - TextValue(payload43) => { - mbt_ffi_store8((iter_base) + 0, (23)) + let lifted74 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let ptr44 = mbt_ffi_str2ptr((payload43).text) - mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr44) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - match ((payload43).language) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - Some(payload46) => { - mbt_ffi_store8((iter_base) + 16, (1)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let ptr47 = mbt_ffi_str2ptr(payload46) - mbt_ffi_store32((iter_base) + 24, payload46.length()) - mbt_ffi_store32((iter_base) + 20, ptr47) - cleanup_list.push(ptr47) + Option::Some(lifted74) + } + _ => panic() + } - () - } - } - cleanup_list.push(ptr44) + let lifted77 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - BinaryValue(payload48) => { - mbt_ffi_store8((iter_base) + 0, (24)) + let result76 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) + Option::Some(result76) + } + _ => panic() + } - mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr49) + Option::Some(@types.NumericRestrictions::{min : lifted73, max : lifted75, unit : lifted77}) + } + _ => panic() + } - match ((payload48).mime_type) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + @types.SchemaTypeBody::U16Type(lifted78) + } + 8 => { - () - } - Some(payload51) => { - mbt_ffi_store8((iter_base) + 16, (1)) + let lifted85 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr52 = mbt_ffi_str2ptr(payload51) - mbt_ffi_store32((iter_base) + 24, payload51.length()) - mbt_ffi_store32((iter_base) + 20, ptr52) - cleanup_list.push(ptr52) + let lifted80 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - } - cleanup_list.push(ptr49) + let lifted79 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - PathValue(payload53) => { - mbt_ffi_store8((iter_base) + 0, (25)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let ptr54 = mbt_ffi_str2ptr(payload53) - mbt_ffi_store32((iter_base) + 12, payload53.length()) - mbt_ffi_store32((iter_base) + 8, ptr54) - cleanup_list.push(ptr54) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - UrlValue(payload55) => { - mbt_ffi_store8((iter_base) + 0, (26)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let ptr56 = mbt_ffi_str2ptr(payload55) - mbt_ffi_store32((iter_base) + 12, payload55.length()) - mbt_ffi_store32((iter_base) + 8, ptr56) - cleanup_list.push(ptr56) + Option::Some(lifted79) + } + _ => panic() + } - () - } - DatetimeValue(payload57) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload57).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) + let lifted82 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - DurationValue(payload58) => { - mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) + let lifted81 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - QuantityValueNode(payload59) => { - mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload59).scale) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let ptr60 = mbt_ffi_str2ptr((payload59).unit) - mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr60) - cleanup_list.push(ptr60) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - UnionValue(payload61) => { - mbt_ffi_store8((iter_base) + 0, (30)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let ptr62 = mbt_ffi_str2ptr((payload61).tag) - mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr62) - mbt_ffi_store32((iter_base) + 16, (payload61).body) - cleanup_list.push(ptr62) + Option::Some(lifted81) + } + _ => panic() + } - () - } - SecretValue(payload63) => { - mbt_ffi_store8((iter_base) + 0, (31)) + let lifted84 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr64) - cleanup_list.push(ptr64) + let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - QuotaTokenHandle(payload65) => { - mbt_ffi_store8((iter_base) + 0, (32)) + Option::Some(result83) + } + _ => panic() + } - let @types.QuotaToken(handle66) = payload65 - mbt_ffi_store32((iter_base) + 8, handle66) + Option::Some(@types.NumericRestrictions::{min : lifted80, max : lifted82, unit : lifted84}) + } + _ => panic() + } - () - } - } + @types.SchemaTypeBody::U32Type(lifted85) + } + 9 => { - } - let result : Int = wasmImportMethodWasmRpcAsyncInvokeAndAwait(handle, ptr, method_name.length(), address67, ((input).value_nodes).length(), (input).root); - let ret = FutureInvokeResult::FutureInvokeResult(result) - mbt_ffi_free(ptr) - mbt_ffi_free(address67) + let lifted92 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - cleanup_list.each(mbt_ffi_free) - return ret + let lifted87 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { -} -///| -/// Schedule invocation for later -pub fn WasmRpc::schedule_invocation(self : WasmRpc, scheduled_time : @wallClock.Datetime, method_name : String, input : @types.SchemaValueTree) -> Unit { - let cleanup_list : Array[Int] = [] + let lifted86 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let WasmRpc(handle) = self + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let ptr = mbt_ffi_str2ptr(method_name) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let address67 = mbt_ffi_malloc(((input).value_nodes).length() * 32); - for index68 = 0; index68 < ((input).value_nodes).length(); index68 = index68 + 1 { - let iter_elem : @types.SchemaValueNode = ((input).value_nodes)[(index68)] - let iter_base = address67 + (index68 * 32); + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - match iter_elem { - BoolValue(payload) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) + Option::Some(lifted86) + } + _ => panic() + } - () - } - S8Value(payload0) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) + let lifted89 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - S16Value(payload1) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) + let lifted88 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - S32Value(payload2) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload2) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - S64Value(payload3) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload3) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - U8Value(payload4) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - U16Value(payload5) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) + Option::Some(lifted88) + } + _ => panic() + } - () - } - U32Value(payload6) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) + let lifted91 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - U64Value(payload7) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) + let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - F32Value(payload8) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload8) + Option::Some(result90) + } + _ => panic() + } - () - } - F64Value(payload9) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload9) + Option::Some(@types.NumericRestrictions::{min : lifted87, max : lifted89, unit : lifted91}) + } + _ => panic() + } - () - } - CharValue(payload10) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) + @types.SchemaTypeBody::U64Type(lifted92) + } + 10 => { - () - } - StringValue(payload11) => { - mbt_ffi_store8((iter_base) + 0, (12)) + let lifted99 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr12 = mbt_ffi_str2ptr(payload11) - mbt_ffi_store32((iter_base) + 12, payload11.length()) - mbt_ffi_store32((iter_base) + 8, ptr12) - cleanup_list.push(ptr12) + let lifted94 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - RecordValue(payload13) => { - mbt_ffi_store8((iter_base) + 0, (13)) + let lifted93 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let address = mbt_ffi_malloc((payload13).length() * 4); - for index = 0; index < (payload13).length(); index = index + 1 { - let iter_elem : Int = (payload13)[(index)] - let iter_base = address + (index * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload13).length()) - mbt_ffi_store32((iter_base) + 8, address) - cleanup_list.push(address) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - VariantValue(payload14) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - match ((payload14).payload) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + Option::Some(lifted93) + } + _ => panic() + } - () - } - Some(payload16) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload16) + let lifted96 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - } + let lifted95 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - EnumValue(payload17) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - FlagsValue(payload18) => { - mbt_ffi_store8((iter_base) + 0, (16)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let address19 = mbt_ffi_malloc((payload18).length() * 1); - for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { - let iter_elem : Bool = (payload18)[(index20)] - let iter_base = address19 + (index20 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload18).length()) - mbt_ffi_store32((iter_base) + 8, address19) - cleanup_list.push(address19) + Option::Some(lifted95) + } + _ => panic() + } - () - } - TupleValue(payload21) => { - mbt_ffi_store8((iter_base) + 0, (17)) + let lifted98 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let address22 = mbt_ffi_malloc((payload21).length() * 4); - for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { - let iter_elem : Int = (payload21)[(index23)] - let iter_base = address22 + (index23 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let result97 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - } - mbt_ffi_store32((iter_base) + 12, (payload21).length()) - mbt_ffi_store32((iter_base) + 8, address22) - cleanup_list.push(address22) + Option::Some(result97) + } + _ => panic() + } - () - } - ListValue(payload24) => { - mbt_ffi_store8((iter_base) + 0, (18)) + Option::Some(@types.NumericRestrictions::{min : lifted94, max : lifted96, unit : lifted98}) + } + _ => panic() + } - let address25 = mbt_ffi_malloc((payload24).length() * 4); - for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { - let iter_elem : Int = (payload24)[(index26)] - let iter_base = address25 + (index26 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + @types.SchemaTypeBody::F32Type(lifted99) + } + 11 => { - } - mbt_ffi_store32((iter_base) + 12, (payload24).length()) - mbt_ffi_store32((iter_base) + 8, address25) - cleanup_list.push(address25) + let lifted106 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - FixedListValue(payload27) => { - mbt_ffi_store8((iter_base) + 0, (19)) + let lifted101 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let address28 = mbt_ffi_malloc((payload27).length() * 4); - for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { - let iter_elem : Int = (payload27)[(index29)] - let iter_base = address28 + (index29 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted100 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - } - mbt_ffi_store32((iter_base) + 12, (payload27).length()) - mbt_ffi_store32((iter_base) + 8, address28) - cleanup_list.push(address28) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - MapValue(payload30) => { - mbt_ffi_store8((iter_base) + 0, (20)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let address31 = mbt_ffi_malloc((payload30).length() * 8); - for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { - let iter_elem : @types.MapEntry = (payload30)[(index32)] - let iter_base = address31 + (index32 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload30).length()) - mbt_ffi_store32((iter_base) + 8, address31) - cleanup_list.push(address31) + Option::Some(lifted100) + } + _ => panic() + } - () - } - OptionValue(payload33) => { - mbt_ffi_store8((iter_base) + 0, (21)) + let lifted103 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - match (payload33) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted102 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - Some(payload35) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload35) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - ResultValue(payload36) => { - mbt_ffi_store8((iter_base) + 0, (22)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - match payload36 { - OkValue(payload37) => { - mbt_ffi_store8((iter_base) + 8, (0)) + Option::Some(lifted102) + } + _ => panic() + } - match (payload37) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let lifted105 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - Some(payload39) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload39) + let result104 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - } + Option::Some(result104) + } + _ => panic() + } - () - } - ErrValue(payload40) => { - mbt_ffi_store8((iter_base) + 8, (1)) + Option::Some(@types.NumericRestrictions::{min : lifted101, max : lifted103, unit : lifted105}) + } + _ => panic() + } - match (payload40) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.SchemaTypeBody::F64Type(lifted106) + } + 12 => { - () - } - Some(payload42) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload42) + @types.SchemaTypeBody::CharType + } + 13 => { - () - } - } + @types.SchemaTypeBody::StringType + } + 14 => { - () - } - } + let array121 : Array[@types.NamedFieldType] = []; + for index122 = 0; index122 < (mbt_ffi_load32((iter_base) + 12)); index122 = index122 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index122 * 68) - () - } - TextValue(payload43) => { - mbt_ffi_store8((iter_base) + 0, (23)) + let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let ptr44 = mbt_ffi_str2ptr((payload43).text) - mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr44) + let lifted109 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result108 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result108) + } + _ => panic() + } - match ((payload43).language) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + let array111 : Array[String] = []; + for index112 = 0; index112 < (mbt_ffi_load32((iter_base) + 28)); index112 = index112 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index112 * 8) - () - } - Some(payload46) => { - mbt_ffi_store8((iter_base) + 16, (1)) + let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let ptr47 = mbt_ffi_str2ptr(payload46) - mbt_ffi_store32((iter_base) + 24, payload46.length()) - mbt_ffi_store32((iter_base) + 20, ptr47) - cleanup_list.push(ptr47) + array111.push(result110) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - () - } - } - cleanup_list.push(ptr44) + let array114 : Array[String] = []; + for index115 = 0; index115 < (mbt_ffi_load32((iter_base) + 36)); index115 = index115 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index115 * 8) - () - } - BinaryValue(payload48) => { - mbt_ffi_store8((iter_base) + 0, (24)) + let result113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) + array114.push(result113) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr49) + let lifted117 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - match ((payload48).mime_type) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + let result116 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - () - } - Some(payload51) => { - mbt_ffi_store8((iter_base) + 16, (1)) + Option::Some(result116) + } + _ => panic() + } - let ptr52 = mbt_ffi_str2ptr(payload51) - mbt_ffi_store32((iter_base) + 24, payload51.length()) - mbt_ffi_store32((iter_base) + 20, ptr52) - cleanup_list.push(ptr52) + let lifted120 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { - () - } - } - cleanup_list.push(ptr49) + let lifted119 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { - () - } - PathValue(payload53) => { - mbt_ffi_store8((iter_base) + 0, (25)) + @types.Role::Multimodal + } + 1 => { - let ptr54 = mbt_ffi_str2ptr(payload53) - mbt_ffi_store32((iter_base) + 12, payload53.length()) - mbt_ffi_store32((iter_base) + 8, ptr54) - cleanup_list.push(ptr54) + @types.Role::UnstructuredText + } + 2 => { - () - } - UrlValue(payload55) => { - mbt_ffi_store8((iter_base) + 0, (26)) + @types.Role::UnstructuredBinary + } + 3 => { - let ptr56 = mbt_ffi_str2ptr(payload55) - mbt_ffi_store32((iter_base) + 12, payload55.length()) - mbt_ffi_store32((iter_base) + 8, ptr56) - cleanup_list.push(ptr56) + let result118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - () - } - DatetimeValue(payload57) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload57).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) + @types.Role::Other(result118) + } + _ => panic() + } - () - } - DurationValue(payload58) => { - mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) + Option::Some(lifted119) + } + _ => panic() + } - () - } - QuantityValueNode(payload59) => { - mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload59).scale) + array121.push(@types.NamedFieldType::{name : result107, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted109, aliases : array111, examples : array114, deprecated : lifted117, role : lifted120}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let ptr60 = mbt_ffi_str2ptr((payload59).unit) - mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr60) - cleanup_list.push(ptr60) + @types.SchemaTypeBody::RecordType(array121) + } + 15 => { - () - } - UnionValue(payload61) => { - mbt_ffi_store8((iter_base) + 0, (30)) + let array138 : Array[@types.VariantCaseType] = []; + for index139 = 0; index139 < (mbt_ffi_load32((iter_base) + 12)); index139 = index139 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index139 * 72) - let ptr62 = mbt_ffi_str2ptr((payload61).tag) - mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr62) - mbt_ffi_store32((iter_base) + 16, (payload61).body) - cleanup_list.push(ptr62) + let result123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - SecretValue(payload63) => { - mbt_ffi_store8((iter_base) + 0, (31)) + let lifted124 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr64) - cleanup_list.push(ptr64) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - () - } - QuotaTokenHandle(payload65) => { - mbt_ffi_store8((iter_base) + 0, (32)) + let lifted126 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let @types.QuotaToken(handle66) = payload65 - mbt_ffi_store32((iter_base) + 8, handle66) + let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - () - } - } + Option::Some(result125) + } + _ => panic() + } - } - wasmImportMethodWasmRpcScheduleInvocation(handle, ((scheduled_time).seconds).reinterpret_as_int64(), ((scheduled_time).nanoseconds).reinterpret_as_int(), ptr, method_name.length(), address67, ((input).value_nodes).length(), (input).root); - mbt_ffi_free(ptr) - mbt_ffi_free(address67) + let array128 : Array[String] = []; + for index129 = 0; index129 < (mbt_ffi_load32((iter_base) + 32)); index129 = index129 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index129 * 8) - cleanup_list.each(mbt_ffi_free) + let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) -} -///| -/// Schedule invocation for later. Call cancel on the returned resource to cancel the invocation before the scheduled time. -pub fn WasmRpc::schedule_cancelable_invocation(self : WasmRpc, scheduled_time : @wallClock.Datetime, method_name : String, input : @types.SchemaValueTree) -> CancellationToken { - let cleanup_list : Array[Int] = [] + array128.push(result127) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let WasmRpc(handle) = self + let array131 : Array[String] = []; + for index132 = 0; index132 < (mbt_ffi_load32((iter_base) + 40)); index132 = index132 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index132 * 8) - let ptr = mbt_ffi_str2ptr(method_name) + let result130 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let address67 = mbt_ffi_malloc(((input).value_nodes).length() * 32); - for index68 = 0; index68 < ((input).value_nodes).length(); index68 = index68 + 1 { - let iter_elem : @types.SchemaValueNode = ((input).value_nodes)[(index68)] - let iter_base = address67 + (index68 * 32); + array131.push(result130) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - match iter_elem { - BoolValue(payload) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload { 1 } else { 0 })) + let lifted134 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - () - } - S8Value(payload0) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload0)) + let result133 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - () - } - S16Value(payload1) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload1)) + Option::Some(result133) + } + _ => panic() + } - () - } - S32Value(payload2) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload2) + let lifted137 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - () - } - S64Value(payload3) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload3) + let lifted136 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - () - } - U8Value(payload4) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload4).to_int()) + @types.Role::Multimodal + } + 1 => { - () - } - U16Value(payload5) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload5).reinterpret_as_int()) + @types.Role::UnstructuredText + } + 2 => { - () - } - U32Value(payload6) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload6).reinterpret_as_int()) + @types.Role::UnstructuredBinary + } + 3 => { - () - } - U64Value(payload7) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload7).reinterpret_as_int64()) + let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - () - } - F32Value(payload8) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload8) + @types.Role::Other(result135) + } + _ => panic() + } - () - } - F64Value(payload9) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload9) + Option::Some(lifted136) + } + _ => panic() + } - () - } - CharValue(payload10) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload10).to_int()) + array138.push(@types.VariantCaseType::{name : result123, payload : lifted124, metadata : @types.MetadataEnvelope::{doc : lifted126, aliases : array128, examples : array131, deprecated : lifted134, role : lifted137}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - StringValue(payload11) => { - mbt_ffi_store8((iter_base) + 0, (12)) + @types.SchemaTypeBody::VariantType(array138) + } + 16 => { - let ptr12 = mbt_ffi_str2ptr(payload11) - mbt_ffi_store32((iter_base) + 12, payload11.length()) - mbt_ffi_store32((iter_base) + 8, ptr12) - cleanup_list.push(ptr12) + let array141 : Array[String] = []; + for index142 = 0; index142 < (mbt_ffi_load32((iter_base) + 12)); index142 = index142 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index142 * 8) - () - } - RecordValue(payload13) => { - mbt_ffi_store8((iter_base) + 0, (13)) + let result140 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let address = mbt_ffi_malloc((payload13).length() * 4); - for index = 0; index < (payload13).length(); index = index + 1 { - let iter_elem : Int = (payload13)[(index)] - let iter_base = address + (index * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + array141.push(result140) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - } - mbt_ffi_store32((iter_base) + 12, (payload13).length()) - mbt_ffi_store32((iter_base) + 8, address) - cleanup_list.push(address) + @types.SchemaTypeBody::EnumType(array141) + } + 17 => { - () - } - VariantValue(payload14) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload14).case).reinterpret_as_int()) + let array144 : Array[String] = []; + for index145 = 0; index145 < (mbt_ffi_load32((iter_base) + 12)); index145 = index145 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index145 * 8) - match ((payload14).payload) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - Some(payload16) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload16) + array144.push(result143) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - } + @types.SchemaTypeBody::FlagsType(array144) + } + 18 => { - () - } - EnumValue(payload17) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload17).reinterpret_as_int()) + let array146 : Array[Int] = []; + for index147 = 0; index147 < (mbt_ffi_load32((iter_base) + 12)); index147 = index147 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index147 * 4) - () - } - FlagsValue(payload18) => { - mbt_ffi_store8((iter_base) + 0, (16)) + array146.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let address19 = mbt_ffi_malloc((payload18).length() * 1); - for index20 = 0; index20 < (payload18).length(); index20 = index20 + 1 { - let iter_elem : Bool = (payload18)[(index20)] - let iter_base = address19 + (index20 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + @types.SchemaTypeBody::TupleType(array146) + } + 19 => { - } - mbt_ffi_store32((iter_base) + 12, (payload18).length()) - mbt_ffi_store32((iter_base) + 8, address19) - cleanup_list.push(address19) + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { - () - } - TupleValue(payload21) => { - mbt_ffi_store8((iter_base) + 0, (17)) + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { - let address22 = mbt_ffi_malloc((payload21).length() * 4); - for index23 = 0; index23 < (payload21).length(); index23 = index23 + 1 { - let iter_elem : Int = (payload21)[(index23)] - let iter_base = address22 + (index23 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { - } - mbt_ffi_store32((iter_base) + 12, (payload21).length()) - mbt_ffi_store32((iter_base) + 8, address22) - cleanup_list.push(address22) + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { - () - } - ListValue(payload24) => { - mbt_ffi_store8((iter_base) + 0, (18)) + let lifted148 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let address25 = mbt_ffi_malloc((payload24).length() * 4); - for index26 = 0; index26 < (payload24).length(); index26 = index26 + 1 { - let iter_elem : Int = (payload24)[(index26)] - let iter_base = address25 + (index26 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload24).length()) - mbt_ffi_store32((iter_base) + 8, address25) - cleanup_list.push(address25) + let lifted149 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - FixedListValue(payload27) => { - mbt_ffi_store8((iter_base) + 0, (19)) + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } - let address28 = mbt_ffi_malloc((payload27).length() * 4); - for index29 = 0; index29 < (payload27).length(); index29 = index29 + 1 { - let iter_elem : Int = (payload27)[(index29)] - let iter_base = address28 + (index29 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted148, err : lifted149}) + } + 24 => { - } - mbt_ffi_store32((iter_base) + 12, (payload27).length()) - mbt_ffi_store32((iter_base) + 8, address28) - cleanup_list.push(address28) + let lifted153 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - MapValue(payload30) => { - mbt_ffi_store8((iter_base) + 0, (20)) + let array151 : Array[String] = []; + for index152 = 0; index152 < (mbt_ffi_load32((iter_base) + 16)); index152 = index152 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index152 * 8) - let address31 = mbt_ffi_malloc((payload30).length() * 8); - for index32 = 0; index32 < (payload30).length(); index32 = index32 + 1 { - let iter_elem : @types.MapEntry = (payload30)[(index32)] - let iter_base = address31 + (index32 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - } - mbt_ffi_store32((iter_base) + 12, (payload30).length()) - mbt_ffi_store32((iter_base) + 8, address31) - cleanup_list.push(address31) + array151.push(result150) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - () - } - OptionValue(payload33) => { - mbt_ffi_store8((iter_base) + 0, (21)) + Option::Some(array151) + } + _ => panic() + } - match (payload33) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted154 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - () - } - Some(payload35) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload35) + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } - () - } - } + let lifted155 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - () - } - ResultValue(payload36) => { - mbt_ffi_store8((iter_base) + 0, (22)) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } - match payload36 { - OkValue(payload37) => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted157 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - match (payload37) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - () - } - Some(payload39) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload39) + Option::Some(result156) + } + _ => panic() + } - () - } - } + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted153, min_length : lifted154, max_length : lifted155, regex : lifted157}) + } + 25 => { - () - } - ErrValue(payload40) => { - mbt_ffi_store8((iter_base) + 8, (1)) + let lifted161 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - match (payload40) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let array159 : Array[String] = []; + for index160 = 0; index160 < (mbt_ffi_load32((iter_base) + 16)); index160 = index160 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index160 * 8) - () - } - Some(payload42) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload42) + let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - } + array159.push(result158) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - () - } - } + Option::Some(array159) + } + _ => panic() + } - () - } - TextValue(payload43) => { - mbt_ffi_store8((iter_base) + 0, (23)) + let lifted162 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - let ptr44 = mbt_ffi_str2ptr((payload43).text) - mbt_ffi_store32((iter_base) + 12, (payload43).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr44) + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } - match ((payload43).language) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + let lifted163 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - () - } - Some(payload46) => { - mbt_ffi_store8((iter_base) + 16, (1)) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } - let ptr47 = mbt_ffi_str2ptr(payload46) - mbt_ffi_store32((iter_base) + 24, payload46.length()) - mbt_ffi_store32((iter_base) + 20, ptr47) - cleanup_list.push(ptr47) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted161, min_bytes : lifted162, max_bytes : lifted163}) + } + 26 => { - () - } - } - cleanup_list.push(ptr44) + let lifted167 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - () - } - BinaryValue(payload48) => { - mbt_ffi_store8((iter_base) + 0, (24)) + let array165 : Array[String] = []; + for index166 = 0; index166 < (mbt_ffi_load32((iter_base) + 20)); index166 = index166 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index166 * 8) - let ptr49 = mbt_ffi_bytes2ptr((payload48).bytes) + let result164 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - mbt_ffi_store32((iter_base) + 12, (payload48).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr49) + array165.push(result164) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - match ((payload48).mime_type) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + Option::Some(array165) + } + _ => panic() + } - () - } - Some(payload51) => { - mbt_ffi_store8((iter_base) + 16, (1)) + let lifted171 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - let ptr52 = mbt_ffi_str2ptr(payload51) - mbt_ffi_store32((iter_base) + 24, payload51.length()) - mbt_ffi_store32((iter_base) + 20, ptr52) - cleanup_list.push(ptr52) + let array169 : Array[String] = []; + for index170 = 0; index170 < (mbt_ffi_load32((iter_base) + 32)); index170 = index170 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index170 * 8) - () - } - } - cleanup_list.push(ptr49) + let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - PathValue(payload53) => { - mbt_ffi_store8((iter_base) + 0, (25)) + array169.push(result168) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let ptr54 = mbt_ffi_str2ptr(payload53) - mbt_ffi_store32((iter_base) + 12, payload53.length()) - mbt_ffi_store32((iter_base) + 8, ptr54) - cleanup_list.push(ptr54) + Option::Some(array169) + } + _ => panic() + } - () - } - UrlValue(payload55) => { - mbt_ffi_store8((iter_base) + 0, (26)) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted167, allowed_extensions : lifted171}) + } + 27 => { - let ptr56 = mbt_ffi_str2ptr(payload55) - mbt_ffi_store32((iter_base) + 12, payload55.length()) - mbt_ffi_store32((iter_base) + 8, ptr56) - cleanup_list.push(ptr56) + let lifted175 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - DatetimeValue(payload57) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload57).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload57).nanoseconds).reinterpret_as_int()) + let array173 : Array[String] = []; + for index174 = 0; index174 < (mbt_ffi_load32((iter_base) + 16)); index174 = index174 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index174 * 8) - () - } - DurationValue(payload58) => { - mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload58).nanoseconds) + let result172 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - QuantityValueNode(payload59) => { - mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload59).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload59).scale) + array173.push(result172) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - let ptr60 = mbt_ffi_str2ptr((payload59).unit) - mbt_ffi_store32((iter_base) + 24, (payload59).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr60) - cleanup_list.push(ptr60) + Option::Some(array173) + } + _ => panic() + } - () - } - UnionValue(payload61) => { - mbt_ffi_store8((iter_base) + 0, (30)) + let lifted179 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - let ptr62 = mbt_ffi_str2ptr((payload61).tag) - mbt_ffi_store32((iter_base) + 12, (payload61).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr62) - mbt_ffi_store32((iter_base) + 16, (payload61).body) - cleanup_list.push(ptr62) + let array177 : Array[String] = []; + for index178 = 0; index178 < (mbt_ffi_load32((iter_base) + 28)); index178 = index178 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index178 * 8) - () - } - SecretValue(payload63) => { - mbt_ffi_store8((iter_base) + 0, (31)) + let result176 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let ptr64 = mbt_ffi_str2ptr((payload63).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload63).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr64) - cleanup_list.push(ptr64) + array177.push(result176) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - () - } - QuotaTokenHandle(payload65) => { - mbt_ffi_store8((iter_base) + 0, (32)) + Option::Some(array177) + } + _ => panic() + } - let @types.QuotaToken(handle66) = payload65 - mbt_ffi_store32((iter_base) + 8, handle66) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted175, allowed_hosts : lifted179}) + } + 28 => { - () - } - } + @types.SchemaTypeBody::DatetimeType + } + 29 => { - } - let result : Int = wasmImportMethodWasmRpcScheduleCancelableInvocation(handle, ((scheduled_time).seconds).reinterpret_as_int64(), ((scheduled_time).nanoseconds).reinterpret_as_int(), ptr, method_name.length(), address67, ((input).value_nodes).length(), (input).root); - let ret = CancellationToken::CancellationToken(result) - mbt_ffi_free(ptr) - mbt_ffi_free(address67) + @types.SchemaTypeBody::DurationType + } + 30 => { - cleanup_list.each(mbt_ffi_free) - return ret + let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) -} -///| -/// Subscribes to the result of the invocation -pub fn FutureInvokeResult::subscribe(self : FutureInvokeResult) -> @poll.Pollable { + let array182 : Array[String] = []; + for index183 = 0; index183 < (mbt_ffi_load32((iter_base) + 20)); index183 = index183 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index183 * 8) - let FutureInvokeResult(handle) = self - let result : Int = wasmImportMethodFutureInvokeResultSubscribe(handle); - let ret = @poll.Pollable::Pollable(result) - return ret + let result181 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) -} -///| -/// Poll for the invocation. If the invocation has not completed yet, returns `none`. -pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@types.SchemaValueTree?, RpcError]? { + array182.push(result181) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let FutureInvokeResult(handle) = self - let return_area = mbt_ffi_malloc(48) - wasmImportMethodFutureInvokeResultGet(handle, return_area); + let lifted185 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - let lifted205 : Result[@types.SchemaValueTree?, RpcError]? = match mbt_ffi_load8_u((return_area) + 0) { - 0 => Option::None - 1 => { + let result184 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - let lifted204 = match (mbt_ffi_load8_u((return_area) + 4)) { - 0 => { + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result184}) + } + _ => panic() + } - let lifted28 : @types.SchemaValueTree? = match mbt_ffi_load8_u((return_area) + 8) { - 0 => Option::None - 1 => { + let lifted187 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let array26 : Array[@types.SchemaValueNode] = []; - for index27 = 0; index27 < (mbt_ffi_load32((return_area) + 16)); index27 = index27 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index27 * 32) + let result186 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - let lifted25 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result186}) + } + _ => panic() + } - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result180, allowed_suffixes : array182, min : lifted185, max : lifted187}) + } + 31 => { - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + let array211 : Array[@types.UnionBranch] = []; + for index212 = 0; index212 < (mbt_ffi_load32((iter_base) + 12)); index212 = index212 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index212 * 92) - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + let result188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + let lifted197 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + let result189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + @types.DiscriminatorRule::Prefix(result189) + } + 1 => { - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + @types.DiscriminatorRule::Suffix(result190) + } + 2 => { - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + let result191 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + @types.DiscriminatorRule::Contains(result191) + } + 3 => { - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + @types.DiscriminatorRule::Regex(result192) + } + 4 => { - let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.SchemaValueNode::StringValue(result) - } - 13 => { + let lifted195 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - let array : Array[Int] = []; - for index = 0; index < (mbt_ffi_load32((iter_base) + 12)); index = index + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index * 4) + let result194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - array.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + Option::Some(result194) + } + _ => panic() + } - @types.SchemaValueNode::RecordValue(array) - } - 14 => { + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result193, literal : lifted195}) + } + 5 => { - let lifted : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let result196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + @types.DiscriminatorRule::FieldAbsent(result196) + } + _ => panic() + } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted}) - } - 15 => { + let lifted199 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + let result198 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let array0 : Array[Bool] = []; - for index1 = 0; index1 < (mbt_ffi_load32((iter_base) + 12)); index1 = index1 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1 * 1) + Option::Some(result198) + } + _ => panic() + } - array0.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let array201 : Array[String] = []; + for index202 = 0; index202 < (mbt_ffi_load32((iter_base) + 52)); index202 = index202 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index202 * 8) - @types.SchemaValueNode::FlagsValue(array0) - } - 17 => { + let result200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array2 : Array[Int] = []; - for index3 = 0; index3 < (mbt_ffi_load32((iter_base) + 12)); index3 = index3 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index3 * 4) + array201.push(result200) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - array2.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let array204 : Array[String] = []; + for index205 = 0; index205 < (mbt_ffi_load32((iter_base) + 60)); index205 = index205 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index205 * 8) - @types.SchemaValueNode::TupleValue(array2) - } - 18 => { + let result203 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array4 : Array[Int] = []; - for index5 = 0; index5 < (mbt_ffi_load32((iter_base) + 12)); index5 = index5 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index5 * 4) + array204.push(result203) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - array4.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted207 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::ListValue(array4) - } - 19 => { + let result206 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let array6 : Array[Int] = []; - for index7 = 0; index7 < (mbt_ffi_load32((iter_base) + 12)); index7 = index7 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index7 * 4) + Option::Some(result206) + } + _ => panic() + } - array6.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted210 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::FixedListValue(array6) - } - 20 => { + let lifted209 = match (mbt_ffi_load8_u((iter_base) + 80)) { + 0 => { - let array8 : Array[@types.MapEntry] = []; - for index9 = 0; index9 < (mbt_ffi_load32((iter_base) + 12)); index9 = index9 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index9 * 8) + @types.Role::Multimodal + } + 1 => { - array8.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.Role::UnstructuredText + } + 2 => { - @types.SchemaValueNode::MapValue(array8) - } - 21 => { + @types.Role::UnstructuredBinary + } + 3 => { - let lifted10 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result208 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.Role::Other(result208) + } + _ => panic() + } - @types.SchemaValueNode::OptionValue(lifted10) - } - 22 => { + Option::Some(lifted209) + } + _ => panic() + } - let lifted13 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + array211.push(@types.UnionBranch::{tag : result188, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted197, metadata : @types.MetadataEnvelope::{doc : lifted199, aliases : array201, examples : array204, deprecated : lifted207, role : lifted210}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let lifted11 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array211}) + } + 32 => { + + let lifted214 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) + let result213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result213) } _ => panic() } - @types.ResultValuePayload::OkValue(lifted11) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted214}) } - 1 => { + 33 => { - let lifted12 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted216 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) + let result215 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result215) } _ => panic() } - @types.ResultValuePayload::ErrValue(lifted12) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted216}) } - _ => panic() - } + 34 => { - @types.SchemaValueNode::ResultValue(lifted13) - } - 23 => { + let lifted217 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result14 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - let lifted16 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::FutureType(lifted217) + } + 35 => { - let result15 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let lifted218 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - Option::Some(result15) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::StreamType(lifted218) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result14, language : lifted16}) - } - 24 => { - - let result17 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - - let lifted19 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted221 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result18 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result18) + Option::Some(result220) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result17, mime_type : lifted19}) - } - 25 => { - - let result20 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - - @types.SchemaValueNode::PathValue(result20) - } - 26 => { - - let result21 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - - @types.SchemaValueNode::UrlValue(result21) - } - 27 => { - - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) - } - 28 => { - - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) - } - 29 => { - - let result22 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result22}) - } - 30 => { - - let result23 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result23, body : mbt_ffi_load32((iter_base) + 16)}) - } - 31 => { - - let result24 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let array223 : Array[String] = []; + for index224 = 0; index224 < (mbt_ffi_load32((iter_base) + 104)); index224 = index224 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index224 * 8) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result24}) - } - 32 => { + let result222 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) - } - _ => panic() - } + array223.push(result222) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - array26.push(lifted25) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) + let array226 : Array[String] = []; + for index227 = 0; index227 < (mbt_ffi_load32((iter_base) + 112)); index227 = index227 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index227 * 8) - Option::Some(@types.SchemaValueTree::{value_nodes : array26, root : mbt_ffi_load32((return_area) + 20)}) - } - _ => panic() - } + let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Result::Ok(lifted28) - } - 1 => { + array226.push(result225) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted203 = match (mbt_ffi_load8_u((return_area) + 8)) { - 0 => { + let lifted229 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { - let result29 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + let result228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - RpcError::ProtocolError(result29) - } - 1 => { + Option::Some(result228) + } + _ => panic() + } - let result30 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + let lifted232 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { - RpcError::Denied(result30) - } - 2 => { + let lifted231 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { - let result31 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + @types.Role::Multimodal + } + 1 => { - RpcError::NotFound(result31) - } - 3 => { + @types.Role::UnstructuredText + } + 2 => { - let result32 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + @types.Role::UnstructuredBinary + } + 3 => { - RpcError::RemoteInternalError(result32) - } - 4 => { + let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - let lifted202 = match (mbt_ffi_load8_u((return_area) + 12)) { - 0 => { + @types.Role::Other(result230) + } + _ => panic() + } - let result33 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + Option::Some(lifted231) + } + _ => panic() + } - @common.AgentError::InvalidInput(result33) - } - 1 => { + array233.push(@types.SchemaTypeNode::{body : lifted219, metadata : @types.MetadataEnvelope::{doc : lifted221, aliases : array223, examples : array226, deprecated : lifted229, role : lifted232}}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) - let result34 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + let array238 : Array[@types.SchemaTypeDef] = []; + for index239 = 0; index239 < (mbt_ffi_load32((return_area) + 28)); index239 = index239 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 24)) + (index239 * 24) - @common.AgentError::InvalidMethod(result34) - } - 2 => { + let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result35 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + let lifted237 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @common.AgentError::InvalidType(result35) - } - 3 => { + let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - let result36 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + Option::Some(result236) + } + _ => panic() + } - @common.AgentError::InvalidAgentId(result36) - } - 4 => { + array238.push(@types.SchemaTypeDef::{id : result235, name : lifted237, body : mbt_ffi_load32((iter_base) + 20)}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 24)) - let array163 : Array[@types.SchemaTypeNode] = []; - for index164 = 0; index164 < (mbt_ffi_load32((return_area) + 20)); index164 = index164 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index164 * 144) + let array270 : Array[@types.SchemaValueNode] = []; + for index271 = 0; index271 < (mbt_ffi_load32((return_area) + 40)); index271 = index271 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 36)) + (index271 * 32) - let lifted149 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted269 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) } 1 => { - @types.SchemaTypeBody::BoolType + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) } 2 => { - @types.SchemaTypeBody::S8Type + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) } 3 => { - @types.SchemaTypeBody::S16Type + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) } 4 => { - @types.SchemaTypeBody::S32Type + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) } 5 => { - @types.SchemaTypeBody::S64Type + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) } 6 => { - @types.SchemaTypeBody::U8Type + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) } 7 => { - @types.SchemaTypeBody::U16Type + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) } 8 => { - @types.SchemaTypeBody::U32Type + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) } 9 => { - @types.SchemaTypeBody::U64Type + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) } 10 => { - @types.SchemaTypeBody::F32Type + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) } 11 => { - @types.SchemaTypeBody::F64Type + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) } 12 => { - @types.SchemaTypeBody::CharType - } - 13 => { + let result240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaTypeBody::StringType + @types.SchemaValueNode::StringValue(result240) } - 14 => { - - let array51 : Array[@types.NamedFieldType] = []; - for index52 = 0; index52 < (mbt_ffi_load32((iter_base) + 12)); index52 = index52 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index52 * 68) - - let result37 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - let lifted39 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { - - let result38 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - Option::Some(result38) - } - _ => panic() - } - - let array41 : Array[String] = []; - for index42 = 0; index42 < (mbt_ffi_load32((iter_base) + 28)); index42 = index42 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index42 * 8) - - let result40 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array41.push(result40) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - - let array44 : Array[String] = []; - for index45 = 0; index45 < (mbt_ffi_load32((iter_base) + 36)); index45 = index45 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index45 * 8) - - let result43 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array44.push(result43) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - - let lifted47 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { - - let result46 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - - Option::Some(result46) - } - _ => panic() - } - - let lifted50 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { - - let lifted49 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { - - @types.Role::Multimodal - } - 1 => { - - @types.Role::UnstructuredText - } - 2 => { - - @types.Role::UnstructuredBinary - } - 3 => { - - let result48 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result48) - } - _ => panic() - } + 13 => { - Option::Some(lifted49) - } - _ => panic() - } + let array241 : Array[Int] = []; + for index242 = 0; index242 < (mbt_ffi_load32((iter_base) + 12)); index242 = index242 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index242 * 4) - array51.push(@types.NamedFieldType::{name : result37, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted39, aliases : array41, examples : array44, deprecated : lifted47, role : lifted50}}) + array241.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array51) + @types.SchemaValueNode::RecordValue(array241) } - 15 => { - - let array68 : Array[@types.VariantCaseType] = []; - for index69 = 0; index69 < (mbt_ffi_load32((iter_base) + 12)); index69 = index69 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index69 * 72) - - let result53 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - let lifted54 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { - - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } - - let lifted56 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { - - let result55 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - - Option::Some(result55) - } - _ => panic() - } - - let array58 : Array[String] = []; - for index59 = 0; index59 < (mbt_ffi_load32((iter_base) + 32)); index59 = index59 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index59 * 8) - - let result57 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array58.push(result57) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - - let array61 : Array[String] = []; - for index62 = 0; index62 < (mbt_ffi_load32((iter_base) + 40)); index62 = index62 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index62 * 8) - - let result60 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array61.push(result60) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - - let lifted64 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { - - let result63 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - - Option::Some(result63) - } - _ => panic() - } - - let lifted67 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { - - let lifted66 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { - - @types.Role::Multimodal - } - 1 => { - - @types.Role::UnstructuredText - } - 2 => { - - @types.Role::UnstructuredBinary - } - 3 => { - - let result65 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + 14 => { - @types.Role::Other(result65) - } - _ => panic() - } + let lifted243 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - Option::Some(lifted66) - } - _ => panic() + Option::Some(mbt_ffi_load32((iter_base) + 16)) } - - array68.push(@types.VariantCaseType::{name : result53, payload : lifted54, metadata : @types.MetadataEnvelope::{doc : lifted56, aliases : array58, examples : array61, deprecated : lifted64, role : lifted67}}) + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array68) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted243}) } - 16 => { + 15 => { - let array71 : Array[String] = []; - for index72 = 0; index72 < (mbt_ffi_load32((iter_base) + 12)); index72 = index72 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index72 * 8) + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { - let result70 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array244 : Array[Bool] = []; + for index245 = 0; index245 < (mbt_ffi_load32((iter_base) + 12)); index245 = index245 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index245 * 1) - array71.push(result70) + array244.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array71) + @types.SchemaValueNode::FlagsValue(array244) } 17 => { - let array74 : Array[String] = []; - for index75 = 0; index75 < (mbt_ffi_load32((iter_base) + 12)); index75 = index75 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index75 * 8) - - let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array246 : Array[Int] = []; + for index247 = 0; index247 < (mbt_ffi_load32((iter_base) + 12)); index247 = index247 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index247 * 4) - array74.push(result73) + array246.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array74) + @types.SchemaValueNode::TupleValue(array246) } 18 => { - let array76 : Array[Int] = []; - for index77 = 0; index77 < (mbt_ffi_load32((iter_base) + 12)); index77 = index77 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index77 * 4) + let array248 : Array[Int] = []; + for index249 = 0; index249 < (mbt_ffi_load32((iter_base) + 12)); index249 = index249 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index249 * 4) - array76.push(mbt_ffi_load32((iter_base) + 0)) + array248.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array76) + @types.SchemaValueNode::ListValue(array248) } 19 => { - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + let array250 : Array[Int] = []; + for index251 = 0; index251 < (mbt_ffi_load32((iter_base) + 12)); index251 = index251 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index251 * 4) + + array250.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array250) } 20 => { - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + let array252 : Array[@types.MapEntry] = []; + for index253 = 0; index253 < (mbt_ffi_load32((iter_base) + 12)); index253 = index253 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index253 * 8) - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + array252.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaValueNode::MapValue(array252) } - 23 => { + 21 => { - let lifted78 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted254 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -17018,947 +25696,1249 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@types.Schem _ => panic() } - let lifted79 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::OptionValue(lifted254) + } + 22 => { - Option::Some(mbt_ffi_load32((iter_base) + 20)) - } - _ => panic() - } + let lifted257 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted78, err : lifted79}) - } - 24 => { + let lifted255 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - let lifted83 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - let array81 : Array[String] = []; - for index82 = 0; index82 < (mbt_ffi_load32((iter_base) + 16)); index82 = index82 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index82 * 8) + @types.ResultValuePayload::OkValue(lifted255) + } + 1 => { - let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted256 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - array81.push(result80) + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array81) + @types.ResultValuePayload::ErrValue(lifted256) } _ => panic() } - let lifted84 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + @types.SchemaValueNode::ResultValue(lifted257) + } + 23 => { + + let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted260 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + let result259 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result259) } _ => panic() } - let lifted85 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result258, language : lifted260}) + } + 24 => { + + let result261 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted263 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + let result262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result262) } _ => panic() } - let lifted87 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result261, mime_type : lifted263}) + } + 25 => { + + let result264 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::PathValue(result264) + } + 26 => { + + let result265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UrlValue(result265) + } + 27 => { + + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + } + 28 => { + + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + } + 29 => { + + let result266 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result266}) + } + 30 => { + + let result267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result267, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { + + let result268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result268}) + } + 32 => { + + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) + } + _ => panic() + } + + array270.push(lifted269) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 36)) + + @common.AgentError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array233, defs : array238, root : mbt_ffi_load32((return_area) + 32)}, value : @types.SchemaValueTree::{value_nodes : array270, root : mbt_ffi_load32((return_area) + 44)}}) + } + _ => panic() + } + + RpcError::RemoteAgentError(lifted272) + } + _ => panic() + } - let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + Result::Err(lifted273) + } + _ => panic() + } - Option::Some(result86) - } - _ => panic() - } + Option::Some(lifted274) + } + _ => panic() + } + let ret = lifted275 + mbt_ffi_free(return_area) + return ret - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted83, min_length : lifted84, max_length : lifted85, regex : lifted87}) - } - 25 => { +} +///| +/// Best-effort attempt to cancel the remote invocation by idempotency key. +/// If the invocation has already started or completed, this is a no-op. +pub fn FutureInvokeResult::cancel(self : FutureInvokeResult) -> Unit { - let lifted91 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let FutureInvokeResult(handle) = self + wasmImportMethodFutureInvokeResultCancel(handle); - let array89 : Array[String] = []; - for index90 = 0; index90 < (mbt_ffi_load32((iter_base) + 16)); index90 = index90 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index90 * 8) +} +///| +/// Cancel the scheduled invocation +pub fn CancellationToken::cancel(self : CancellationToken) -> Unit { - let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let CancellationToken(handle) = self + wasmImportMethodCancellationTokenCancel(handle); - array89.push(result88) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) +} +///| +/// Get the current value of the config key. +/// +/// The expected schema is a hint to the host what type of value is expected by the guest and can be used +/// by the host to automatically migrate config values to fit the expected schema. +/// +/// Only keys that are declared by the agent-type are allowed to be accessed. Trying +/// to access an undeclared key will trap, unless the expected type is an option. In that case +/// none is returned. +/// +/// Getting a local key will get values defined as part of the current +/// component revision + overrides declared during agent creation. +/// +/// Getting a shared key will get the current value of the key in the environment. +pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @types.SchemaValueTree { + let cleanup_list : Array[Int] = [] - Option::Some(array89) - } - _ => panic() - } + let address = mbt_ffi_malloc((key).length() * 8); + for index = 0; index < (key).length(); index = index + 1 { + let iter_elem : String = (key)[(index)] + let iter_base = address + (index * 8); - let lifted92 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let ptr = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr) + cleanup_list.push(ptr) - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + } - let lifted93 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let address360 = mbt_ffi_malloc(((expected).type_nodes).length() * 144); + for index361 = 0; index361 < ((expected).type_nodes).length(); index361 = index361 + 1 { + let iter_elem : @types.SchemaTypeNode = ((expected).type_nodes)[(index361)] + let iter_base = address360 + (index361 * 144); - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + match (iter_elem).body { + RefType(payload) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store32((iter_base) + 8, payload) - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted91, min_bytes : lifted92, max_bytes : lifted93}) - } - 26 => { + () + } + BoolType => { + mbt_ffi_store8((iter_base) + 0, (1)) - let lifted97 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + () + } + S8Type(payload1) => { + mbt_ffi_store8((iter_base) + 0, (2)) - let array95 : Array[String] = []; - for index96 = 0; index96 < (mbt_ffi_load32((iter_base) + 20)); index96 = index96 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index96 * 8) + match (payload1) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let result94 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + Some(payload3) => { + mbt_ffi_store8((iter_base) + 8, (1)) - array95.push(result94) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + match ((payload3).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - Option::Some(array95) - } - _ => panic() - } + () + } + Some(payload5) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let lifted101 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + match payload5 { + Signed(payload6) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload6) - let array99 : Array[String] = []; - for index100 = 0; index100 < (mbt_ffi_load32((iter_base) + 32)); index100 = index100 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index100 * 8) + () + } + Unsigned(payload7) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload7).reinterpret_as_int64()) - let result98 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + FloatBits(payload8) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload8).reinterpret_as_int64()) - array99.push(result98) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + () + } + } - Option::Some(array99) - } - _ => panic() - } + () + } + } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted97, allowed_extensions : lifted101}) - } - 27 => { + match ((payload3).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - let lifted105 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + Some(payload10) => { + mbt_ffi_store8((iter_base) + 40, (1)) - let array103 : Array[String] = []; - for index104 = 0; index104 < (mbt_ffi_load32((iter_base) + 16)); index104 = index104 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index104 * 8) + match payload10 { + Signed(payload11) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload11) - let result102 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + Unsigned(payload12) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload12).reinterpret_as_int64()) - array103.push(result102) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + () + } + FloatBits(payload13) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload13).reinterpret_as_int64()) - Option::Some(array103) - } - _ => panic() - } + () + } + } - let lifted109 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + () + } + } - let array107 : Array[String] = []; - for index108 = 0; index108 < (mbt_ffi_load32((iter_base) + 28)); index108 = index108 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index108 * 8) + match ((payload3).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - let result106 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + Some(payload15) => { + mbt_ffi_store8((iter_base) + 64, (1)) - array107.push(result106) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let ptr16 = mbt_ffi_str2ptr(payload15) + mbt_ffi_store32((iter_base) + 72, payload15.length()) + mbt_ffi_store32((iter_base) + 68, ptr16) + cleanup_list.push(ptr16) - Option::Some(array107) - } - _ => panic() - } + () + } + } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted105, allowed_hosts : lifted109}) - } - 28 => { + () + } + } - @types.SchemaTypeBody::DatetimeType - } - 29 => { + () + } + S16Type(payload17) => { + mbt_ffi_store8((iter_base) + 0, (3)) - @types.SchemaTypeBody::DurationType - } - 30 => { + match (payload17) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + () + } + Some(payload19) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let array112 : Array[String] = []; - for index113 = 0; index113 < (mbt_ffi_load32((iter_base) + 20)); index113 = index113 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index113 * 8) + match ((payload19).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let result111 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + Some(payload21) => { + mbt_ffi_store8((iter_base) + 16, (1)) - array112.push(result111) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + match payload21 { + Signed(payload22) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload22) - let lifted115 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + () + } + Unsigned(payload23) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload23).reinterpret_as_int64()) - let result114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + () + } + FloatBits(payload24) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload24).reinterpret_as_int64()) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result114}) - } - _ => panic() - } + () + } + } - let lifted117 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + () + } + } - let result116 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + match ((payload19).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result116}) - } - _ => panic() - } + () + } + Some(payload26) => { + mbt_ffi_store8((iter_base) + 40, (1)) - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result110, allowed_suffixes : array112, min : lifted115, max : lifted117}) - } - 31 => { + match payload26 { + Signed(payload27) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload27) - let array141 : Array[@types.UnionBranch] = []; - for index142 = 0; index142 < (mbt_ffi_load32((iter_base) + 12)); index142 = index142 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index142 * 92) + () + } + Unsigned(payload28) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload28).reinterpret_as_int64()) - let result118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + FloatBits(payload29) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload29).reinterpret_as_int64()) - let lifted127 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + () + } + } + + () + } + } - let result119 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + match ((payload19).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - @types.DiscriminatorRule::Prefix(result119) - } - 1 => { + () + } + Some(payload31) => { + mbt_ffi_store8((iter_base) + 64, (1)) - let result120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let ptr32 = mbt_ffi_str2ptr(payload31) + mbt_ffi_store32((iter_base) + 72, payload31.length()) + mbt_ffi_store32((iter_base) + 68, ptr32) + cleanup_list.push(ptr32) - @types.DiscriminatorRule::Suffix(result120) - } - 2 => { + () + } + } - let result121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + () + } + } - @types.DiscriminatorRule::Contains(result121) - } - 3 => { + () + } + S32Type(payload33) => { + mbt_ffi_store8((iter_base) + 0, (4)) - let result122 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + match (payload33) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - @types.DiscriminatorRule::Regex(result122) - } - 4 => { + () + } + Some(payload35) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let result123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + match ((payload35).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let lifted125 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + () + } + Some(payload37) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let result124 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + match payload37 { + Signed(payload38) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload38) - Option::Some(result124) - } - _ => panic() - } + () + } + Unsigned(payload39) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload39).reinterpret_as_int64()) - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result123, literal : lifted125}) - } - 5 => { + () + } + FloatBits(payload40) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload40).reinterpret_as_int64()) - let result126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + () + } + } - @types.DiscriminatorRule::FieldAbsent(result126) - } - _ => panic() - } + () + } + } - let lifted129 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + match ((payload35).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - let result128 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + () + } + Some(payload42) => { + mbt_ffi_store8((iter_base) + 40, (1)) - Option::Some(result128) - } - _ => panic() - } + match payload42 { + Signed(payload43) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload43) - let array131 : Array[String] = []; - for index132 = 0; index132 < (mbt_ffi_load32((iter_base) + 52)); index132 = index132 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index132 * 8) + () + } + Unsigned(payload44) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload44).reinterpret_as_int64()) - let result130 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + FloatBits(payload45) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload45).reinterpret_as_int64()) - array131.push(result130) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + () + } + } - let array134 : Array[String] = []; - for index135 = 0; index135 < (mbt_ffi_load32((iter_base) + 60)); index135 = index135 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index135 * 8) + () + } + } - let result133 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + match ((payload35).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - array134.push(result133) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + () + } + Some(payload47) => { + mbt_ffi_store8((iter_base) + 64, (1)) - let lifted137 : String? = match mbt_ffi_load8_u((iter_base) + 64) { - 0 => Option::None - 1 => { + let ptr48 = mbt_ffi_str2ptr(payload47) + mbt_ffi_store32((iter_base) + 72, payload47.length()) + mbt_ffi_store32((iter_base) + 68, ptr48) + cleanup_list.push(ptr48) - let result136 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + () + } + } - Option::Some(result136) - } - _ => panic() - } + () + } + } - let lifted140 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { - 0 => Option::None - 1 => { + () + } + S64Type(payload49) => { + mbt_ffi_store8((iter_base) + 0, (5)) - let lifted139 = match (mbt_ffi_load8_u((iter_base) + 80)) { - 0 => { + match (payload49) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - @types.Role::Multimodal - } - 1 => { + () + } + Some(payload51) => { + mbt_ffi_store8((iter_base) + 8, (1)) - @types.Role::UnstructuredText - } - 2 => { + match ((payload51).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - @types.Role::UnstructuredBinary - } - 3 => { + () + } + Some(payload53) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let result138 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + match payload53 { + Signed(payload54) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload54) - @types.Role::Other(result138) - } - _ => panic() - } + () + } + Unsigned(payload55) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload55).reinterpret_as_int64()) - Option::Some(lifted139) - } - _ => panic() - } + () + } + FloatBits(payload56) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload56).reinterpret_as_int64()) - array141.push(@types.UnionBranch::{tag : result118, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted127, metadata : @types.MetadataEnvelope::{doc : lifted129, aliases : array131, examples : array134, deprecated : lifted137, role : lifted140}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + } - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array141}) - } - 32 => { + () + } + } - let lifted144 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + match ((payload51).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + () + } + Some(payload58) => { + mbt_ffi_store8((iter_base) + 40, (1)) - Option::Some(result143) - } - _ => panic() - } + match payload58 { + Signed(payload59) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload59) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted144}) - } - 33 => { + () + } + Unsigned(payload60) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload60).reinterpret_as_int64()) - let lifted146 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + FloatBits(payload61) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload61).reinterpret_as_int64()) - let result145 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + () + } + } - Option::Some(result145) - } - _ => panic() - } + () + } + } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted146}) - } - 34 => { + match ((payload51).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - let lifted147 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + Some(payload63) => { + mbt_ffi_store8((iter_base) + 64, (1)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let ptr64 = mbt_ffi_str2ptr(payload63) + mbt_ffi_store32((iter_base) + 72, payload63.length()) + mbt_ffi_store32((iter_base) + 68, ptr64) + cleanup_list.push(ptr64) - @types.SchemaTypeBody::FutureType(lifted147) - } - 35 => { + () + } + } - let lifted148 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + } - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + () + } + U8Type(payload65) => { + mbt_ffi_store8((iter_base) + 0, (6)) - @types.SchemaTypeBody::StreamType(lifted148) - } - _ => panic() - } + match (payload65) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let lifted151 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { + () + } + Some(payload67) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + match ((payload67).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - Option::Some(result150) - } - _ => panic() - } + () + } + Some(payload69) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let array153 : Array[String] = []; - for index154 = 0; index154 < (mbt_ffi_load32((iter_base) + 104)); index154 = index154 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index154 * 8) + match payload69 { + Signed(payload70) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload70) - let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + Unsigned(payload71) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload71).reinterpret_as_int64()) - array153.push(result152) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + () + } + FloatBits(payload72) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload72).reinterpret_as_int64()) - let array156 : Array[String] = []; - for index157 = 0; index157 < (mbt_ffi_load32((iter_base) + 112)); index157 = index157 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index157 * 8) + () + } + } - let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + } - array156.push(result155) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + match ((payload67).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - let lifted159 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + () + } + Some(payload74) => { + mbt_ffi_store8((iter_base) + 40, (1)) - let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + match payload74 { + Signed(payload75) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload75) - Option::Some(result158) - } - _ => panic() - } + () + } + Unsigned(payload76) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload76).reinterpret_as_int64()) - let lifted162 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + () + } + FloatBits(payload77) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload77).reinterpret_as_int64()) - let lifted161 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + () + } + } - @types.Role::Multimodal - } - 1 => { + () + } + } - @types.Role::UnstructuredText - } - 2 => { + match ((payload67).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - @types.Role::UnstructuredBinary - } - 3 => { + () + } + Some(payload79) => { + mbt_ffi_store8((iter_base) + 64, (1)) - let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let ptr80 = mbt_ffi_str2ptr(payload79) + mbt_ffi_store32((iter_base) + 72, payload79.length()) + mbt_ffi_store32((iter_base) + 68, ptr80) + cleanup_list.push(ptr80) - @types.Role::Other(result160) - } - _ => panic() - } + () + } + } - Option::Some(lifted161) - } - _ => panic() - } + () + } + } - array163.push(@types.SchemaTypeNode::{body : lifted149, metadata : @types.MetadataEnvelope::{doc : lifted151, aliases : array153, examples : array156, deprecated : lifted159, role : lifted162}}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) + () + } + U16Type(payload81) => { + mbt_ffi_store8((iter_base) + 0, (7)) - let array168 : Array[@types.SchemaTypeDef] = []; - for index169 = 0; index169 < (mbt_ffi_load32((return_area) + 28)); index169 = index169 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 24)) + (index169 * 24) + match (payload81) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + Some(payload83) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let lifted167 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + match ((payload83).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + () + } + Some(payload85) => { + mbt_ffi_store8((iter_base) + 16, (1)) - Option::Some(result166) - } - _ => panic() - } + match payload85 { + Signed(payload86) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload86) - array168.push(@types.SchemaTypeDef::{id : result165, name : lifted167, body : mbt_ffi_load32((iter_base) + 20)}) + () } - mbt_ffi_free(mbt_ffi_load32((return_area) + 24)) + Unsigned(payload87) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload87).reinterpret_as_int64()) - let array200 : Array[@types.SchemaValueNode] = []; - for index201 = 0; index201 < (mbt_ffi_load32((return_area) + 40)); index201 = index201 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 36)) + (index201 * 32) + () + } + FloatBits(payload88) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload88).reinterpret_as_int64()) - let lifted199 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + () + } + } - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + () + } + } - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + match ((payload83).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + () + } + Some(payload90) => { + mbt_ffi_store8((iter_base) + 40, (1)) - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + match payload90 { + Signed(payload91) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload91) - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + () + } + Unsigned(payload92) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload92).reinterpret_as_int64()) - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + () + } + FloatBits(payload93) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload93).reinterpret_as_int64()) - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + () + } + } - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + () + } + } - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + match ((payload83).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + () + } + Some(payload95) => { + mbt_ffi_store8((iter_base) + 64, (1)) - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + let ptr96 = mbt_ffi_str2ptr(payload95) + mbt_ffi_store32((iter_base) + 72, payload95.length()) + mbt_ffi_store32((iter_base) + 68, ptr96) + cleanup_list.push(ptr96) - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + () + } + } - let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + () + } + } - @types.SchemaValueNode::StringValue(result170) - } - 13 => { + () + } + U32Type(payload97) => { + mbt_ffi_store8((iter_base) + 0, (8)) - let array171 : Array[Int] = []; - for index172 = 0; index172 < (mbt_ffi_load32((iter_base) + 12)); index172 = index172 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index172 * 4) + match (payload97) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - array171.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + Some(payload99) => { + mbt_ffi_store8((iter_base) + 8, (1)) - @types.SchemaValueNode::RecordValue(array171) - } - 14 => { + match ((payload99).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let lifted173 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + () + } + Some(payload101) => { + mbt_ffi_store8((iter_base) + 16, (1)) - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + match payload101 { + Signed(payload102) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload102) - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted173}) - } - 15 => { + () + } + Unsigned(payload103) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload103).reinterpret_as_int64()) - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + () + } + FloatBits(payload104) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload104).reinterpret_as_int64()) - let array174 : Array[Bool] = []; - for index175 = 0; index175 < (mbt_ffi_load32((iter_base) + 12)); index175 = index175 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index175 * 1) + () + } + } - array174.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + } - @types.SchemaValueNode::FlagsValue(array174) - } - 17 => { + match ((payload99).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - let array176 : Array[Int] = []; - for index177 = 0; index177 < (mbt_ffi_load32((iter_base) + 12)); index177 = index177 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index177 * 4) + () + } + Some(payload106) => { + mbt_ffi_store8((iter_base) + 40, (1)) - array176.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + match payload106 { + Signed(payload107) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload107) - @types.SchemaValueNode::TupleValue(array176) - } - 18 => { + () + } + Unsigned(payload108) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload108).reinterpret_as_int64()) - let array178 : Array[Int] = []; - for index179 = 0; index179 < (mbt_ffi_load32((iter_base) + 12)); index179 = index179 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index179 * 4) + () + } + FloatBits(payload109) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload109).reinterpret_as_int64()) - array178.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + } - @types.SchemaValueNode::ListValue(array178) - } - 19 => { + () + } + } - let array180 : Array[Int] = []; - for index181 = 0; index181 < (mbt_ffi_load32((iter_base) + 12)); index181 = index181 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index181 * 4) + match ((payload99).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - array180.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + Some(payload111) => { + mbt_ffi_store8((iter_base) + 64, (1)) - @types.SchemaValueNode::FixedListValue(array180) - } - 20 => { + let ptr112 = mbt_ffi_str2ptr(payload111) + mbt_ffi_store32((iter_base) + 72, payload111.length()) + mbt_ffi_store32((iter_base) + 68, ptr112) + cleanup_list.push(ptr112) - let array182 : Array[@types.MapEntry] = []; - for index183 = 0; index183 < (mbt_ffi_load32((iter_base) + 12)); index183 = index183 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index183 * 8) + () + } + } - array182.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + } - @types.SchemaValueNode::MapValue(array182) - } - 21 => { + () + } + U64Type(payload113) => { + mbt_ffi_store8((iter_base) + 0, (9)) - let lifted184 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + match (payload113) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + () + } + Some(payload115) => { + mbt_ffi_store8((iter_base) + 8, (1)) - @types.SchemaValueNode::OptionValue(lifted184) - } - 22 => { + match ((payload115).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let lifted187 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + () + } + Some(payload117) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let lifted185 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + match payload117 { + Signed(payload118) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload118) - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + () + } + Unsigned(payload119) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload119).reinterpret_as_int64()) - @types.ResultValuePayload::OkValue(lifted185) - } - 1 => { + () + } + FloatBits(payload120) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload120).reinterpret_as_int64()) - let lifted186 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + () + } + } - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + () + } + } - @types.ResultValuePayload::ErrValue(lifted186) - } - _ => panic() - } + match ((payload115).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - @types.SchemaValueNode::ResultValue(lifted187) - } - 23 => { + () + } + Some(payload122) => { + mbt_ffi_store8((iter_base) + 40, (1)) - let result188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + match payload122 { + Signed(payload123) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload123) - let lifted190 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + () + } + Unsigned(payload124) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload124).reinterpret_as_int64()) - let result189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + () + } + FloatBits(payload125) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload125).reinterpret_as_int64()) - Option::Some(result189) - } - _ => panic() - } + () + } + } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result188, language : lifted190}) - } - 24 => { + () + } + } - let result191 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + match ((payload115).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - let lifted193 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + () + } + Some(payload127) => { + mbt_ffi_store8((iter_base) + 64, (1)) - let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let ptr128 = mbt_ffi_str2ptr(payload127) + mbt_ffi_store32((iter_base) + 72, payload127.length()) + mbt_ffi_store32((iter_base) + 68, ptr128) + cleanup_list.push(ptr128) - Option::Some(result192) - } - _ => panic() - } + () + } + } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result191, mime_type : lifted193}) - } - 25 => { + () + } + } - let result194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + () + } + F32Type(payload129) => { + mbt_ffi_store8((iter_base) + 0, (10)) - @types.SchemaValueNode::PathValue(result194) - } - 26 => { + match (payload129) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + () + } + Some(payload131) => { + mbt_ffi_store8((iter_base) + 8, (1)) - @types.SchemaValueNode::UrlValue(result195) - } - 27 => { + match ((payload131).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) - } - 28 => { + () + } + Some(payload133) => { + mbt_ffi_store8((iter_base) + 16, (1)) - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) - } - 29 => { + match payload133 { + Signed(payload134) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload134) - let result196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + () + } + Unsigned(payload135) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload135).reinterpret_as_int64()) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result196}) - } - 30 => { + () + } + FloatBits(payload136) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload136).reinterpret_as_int64()) - let result197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + () + } + } - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result197, body : mbt_ffi_load32((iter_base) + 16)}) - } - 31 => { + () + } + } - let result198 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + match ((payload131).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result198}) - } - 32 => { + () + } + Some(payload138) => { + mbt_ffi_store8((iter_base) + 40, (1)) - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) - } - _ => panic() - } + match payload138 { + Signed(payload139) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload139) - array200.push(lifted199) + () } - mbt_ffi_free(mbt_ffi_load32((return_area) + 36)) + Unsigned(payload140) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload140).reinterpret_as_int64()) + + () + } + FloatBits(payload141) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload141).reinterpret_as_int64()) - @common.AgentError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array163, defs : array168, root : mbt_ffi_load32((return_area) + 32)}, value : @types.SchemaValueTree::{value_nodes : array200, root : mbt_ffi_load32((return_area) + 44)}}) + () + } } - _ => panic() + + () + } + } + + match ((payload131).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () } + Some(payload143) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr144 = mbt_ffi_str2ptr(payload143) + mbt_ffi_store32((iter_base) + 72, payload143.length()) + mbt_ffi_store32((iter_base) + 68, ptr144) + cleanup_list.push(ptr144) - RpcError::RemoteAgentError(lifted202) + () + } } - _ => panic() - } - Result::Err(lifted203) + () + } } - _ => panic() - } - Option::Some(lifted204) - } - _ => panic() - } - let ret = lifted205 - mbt_ffi_free(return_area) - return ret + () + } + F64Type(payload145) => { + mbt_ffi_store8((iter_base) + 0, (11)) -} -///| -/// Best-effort attempt to cancel the remote invocation by idempotency key. -/// If the invocation has already started or completed, this is a no-op. -pub fn FutureInvokeResult::cancel(self : FutureInvokeResult) -> Unit { + match (payload145) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let FutureInvokeResult(handle) = self - wasmImportMethodFutureInvokeResultCancel(handle); + () + } + Some(payload147) => { + mbt_ffi_store8((iter_base) + 8, (1)) -} -///| -/// Cancel the scheduled invocation -pub fn CancellationToken::cancel(self : CancellationToken) -> Unit { + match ((payload147).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let CancellationToken(handle) = self - wasmImportMethodCancellationTokenCancel(handle); + () + } + Some(payload149) => { + mbt_ffi_store8((iter_base) + 16, (1)) -} -///| -/// Get the current value of the config key. -/// -/// The expected schema is a hint to the host what type of value is expected by the guest and can be used -/// by the host to automatically migrate config values to fit the expected schema. -/// -/// Only keys that are declared by the agent-type are allowed to be accessed. Trying -/// to access an undeclared key will trap, unless the expected type is an option. In that case -/// none is returned. -/// -/// Getting a local key will get values defined as part of the current -/// component revision + overrides declared during agent creation. -/// -/// Getting a shared key will get the current value of the key in the environment. -pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @types.SchemaValueTree { - let cleanup_list : Array[Int] = [] + match payload149 { + Signed(payload150) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload150) - let address = mbt_ffi_malloc((key).length() * 8); - for index = 0; index < (key).length(); index = index + 1 { - let iter_elem : String = (key)[(index)] - let iter_base = address + (index * 8); + () + } + Unsigned(payload151) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload151).reinterpret_as_int64()) - let ptr = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr) - cleanup_list.push(ptr) + () + } + FloatBits(payload152) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload152).reinterpret_as_int64()) - } + () + } + } - let address210 = mbt_ffi_malloc(((expected).type_nodes).length() * 144); - for index211 = 0; index211 < ((expected).type_nodes).length(); index211 = index211 + 1 { - let iter_elem : @types.SchemaTypeNode = ((expected).type_nodes)[(index211)] - let iter_base = address210 + (index211 * 144); + () + } + } - match (iter_elem).body { - RefType(payload) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store32((iter_base) + 8, payload) + match ((payload147).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - BoolType => { - mbt_ffi_store8((iter_base) + 0, (1)) + () + } + Some(payload154) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () - } - S8Type => { - mbt_ffi_store8((iter_base) + 0, (2)) + match payload154 { + Signed(payload155) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload155) - () - } - S16Type => { - mbt_ffi_store8((iter_base) + 0, (3)) + () + } + Unsigned(payload156) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload156).reinterpret_as_int64()) - () - } - S32Type => { - mbt_ffi_store8((iter_base) + 0, (4)) + () + } + FloatBits(payload157) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload157).reinterpret_as_int64()) - () - } - S64Type => { - mbt_ffi_store8((iter_base) + 0, (5)) + () + } + } - () - } - U8Type => { - mbt_ffi_store8((iter_base) + 0, (6)) + () + } + } - () - } - U16Type => { - mbt_ffi_store8((iter_base) + 0, (7)) + match ((payload147).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () - } - U32Type => { - mbt_ffi_store8((iter_base) + 0, (8)) + () + } + Some(payload159) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () - } - U64Type => { - mbt_ffi_store8((iter_base) + 0, (9)) + let ptr160 = mbt_ffi_str2ptr(payload159) + mbt_ffi_store32((iter_base) + 72, payload159.length()) + mbt_ffi_store32((iter_base) + 68, ptr160) + cleanup_list.push(ptr160) - () - } - F32Type => { - mbt_ffi_store8((iter_base) + 0, (10)) + () + } + } - () - } - F64Type => { - mbt_ffi_store8((iter_base) + 0, (11)) + () + } + } () } @@ -17972,17 +26952,17 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - RecordType(payload13) => { + RecordType(payload163) => { mbt_ffi_store8((iter_base) + 0, (14)) - let address34 = mbt_ffi_malloc((payload13).length() * 68); - for index35 = 0; index35 < (payload13).length(); index35 = index35 + 1 { - let iter_elem : @types.NamedFieldType = (payload13)[(index35)] - let iter_base = address34 + (index35 * 68); + let address184 = mbt_ffi_malloc((payload163).length() * 68); + for index185 = 0; index185 < (payload163).length(); index185 = index185 + 1 { + let iter_elem : @types.NamedFieldType = (payload163)[(index185)] + let iter_base = address184 + (index185 * 68); - let ptr14 = mbt_ffi_str2ptr((iter_elem).name) + let ptr164 = mbt_ffi_str2ptr((iter_elem).name) mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr14) + mbt_ffi_store32((iter_base) + 0, ptr164) mbt_ffi_store32((iter_base) + 8, (iter_elem).body) match (((iter_elem).metadata).doc) { @@ -17991,45 +26971,45 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload16) => { + Some(payload166) => { mbt_ffi_store8((iter_base) + 12, (1)) - let ptr17 = mbt_ffi_str2ptr(payload16) - mbt_ffi_store32((iter_base) + 20, payload16.length()) - mbt_ffi_store32((iter_base) + 16, ptr17) - cleanup_list.push(ptr17) + let ptr167 = mbt_ffi_str2ptr(payload166) + mbt_ffi_store32((iter_base) + 20, payload166.length()) + mbt_ffi_store32((iter_base) + 16, ptr167) + cleanup_list.push(ptr167) () } } - let address19 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index20 = 0; index20 < (((iter_elem).metadata).aliases).length(); index20 = index20 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index20)] - let iter_base = address19 + (index20 * 8); + let address169 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index170 = 0; index170 < (((iter_elem).metadata).aliases).length(); index170 = index170 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index170)] + let iter_base = address169 + (index170 * 8); - let ptr18 = mbt_ffi_str2ptr(iter_elem) + let ptr168 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr18) - cleanup_list.push(ptr18) + mbt_ffi_store32((iter_base) + 0, ptr168) + cleanup_list.push(ptr168) } mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 24, address19) + mbt_ffi_store32((iter_base) + 24, address169) - let address22 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index23 = 0; index23 < (((iter_elem).metadata).examples).length(); index23 = index23 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index23)] - let iter_base = address22 + (index23 * 8); + let address172 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index173 = 0; index173 < (((iter_elem).metadata).examples).length(); index173 = index173 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index173)] + let iter_base = address172 + (index173 * 8); - let ptr21 = mbt_ffi_str2ptr(iter_elem) + let ptr171 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr21) - cleanup_list.push(ptr21) + mbt_ffi_store32((iter_base) + 0, ptr171) + cleanup_list.push(ptr171) } mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 32, address22) + mbt_ffi_store32((iter_base) + 32, address172) match (((iter_elem).metadata).deprecated) { None => { @@ -18037,13 +27017,13 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload25) => { + Some(payload175) => { mbt_ffi_store8((iter_base) + 40, (1)) - let ptr26 = mbt_ffi_str2ptr(payload25) - mbt_ffi_store32((iter_base) + 48, payload25.length()) - mbt_ffi_store32((iter_base) + 44, ptr26) - cleanup_list.push(ptr26) + let ptr176 = mbt_ffi_str2ptr(payload175) + mbt_ffi_store32((iter_base) + 48, payload175.length()) + mbt_ffi_store32((iter_base) + 44, ptr176) + cleanup_list.push(ptr176) () } @@ -18055,10 +27035,10 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload28) => { + Some(payload178) => { mbt_ffi_store8((iter_base) + 52, (1)) - match payload28 { + match payload178 { Multimodal => { mbt_ffi_store8((iter_base) + 56, (0)) @@ -18074,13 +27054,13 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Other(payload32) => { + Other(payload182) => { mbt_ffi_store8((iter_base) + 56, (3)) - let ptr33 = mbt_ffi_str2ptr(payload32) - mbt_ffi_store32((iter_base) + 64, payload32.length()) - mbt_ffi_store32((iter_base) + 60, ptr33) - cleanup_list.push(ptr33) + let ptr183 = mbt_ffi_str2ptr(payload182) + mbt_ffi_store32((iter_base) + 64, payload182.length()) + mbt_ffi_store32((iter_base) + 60, ptr183) + cleanup_list.push(ptr183) () } @@ -18089,28 +27069,28 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } } - cleanup_list.push(ptr14) - cleanup_list.push(address19) - cleanup_list.push(address22) + cleanup_list.push(ptr164) + cleanup_list.push(address169) + cleanup_list.push(address172) } - mbt_ffi_store32((iter_base) + 12, (payload13).length()) - mbt_ffi_store32((iter_base) + 8, address34) - cleanup_list.push(address34) + mbt_ffi_store32((iter_base) + 12, (payload163).length()) + mbt_ffi_store32((iter_base) + 8, address184) + cleanup_list.push(address184) () } - VariantType(payload36) => { + VariantType(payload186) => { mbt_ffi_store8((iter_base) + 0, (15)) - let address59 = mbt_ffi_malloc((payload36).length() * 72); - for index60 = 0; index60 < (payload36).length(); index60 = index60 + 1 { - let iter_elem : @types.VariantCaseType = (payload36)[(index60)] - let iter_base = address59 + (index60 * 72); + let address209 = mbt_ffi_malloc((payload186).length() * 72); + for index210 = 0; index210 < (payload186).length(); index210 = index210 + 1 { + let iter_elem : @types.VariantCaseType = (payload186)[(index210)] + let iter_base = address209 + (index210 * 72); - let ptr37 = mbt_ffi_str2ptr((iter_elem).name) + let ptr187 = mbt_ffi_str2ptr((iter_elem).name) mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr37) + mbt_ffi_store32((iter_base) + 0, ptr187) match ((iter_elem).payload) { None => { @@ -18118,9 +27098,9 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload39) => { + Some(payload189) => { mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload39) + mbt_ffi_store32((iter_base) + 12, payload189) () } @@ -18132,45 +27112,45 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload41) => { + Some(payload191) => { mbt_ffi_store8((iter_base) + 16, (1)) - let ptr42 = mbt_ffi_str2ptr(payload41) - mbt_ffi_store32((iter_base) + 24, payload41.length()) - mbt_ffi_store32((iter_base) + 20, ptr42) - cleanup_list.push(ptr42) + let ptr192 = mbt_ffi_str2ptr(payload191) + mbt_ffi_store32((iter_base) + 24, payload191.length()) + mbt_ffi_store32((iter_base) + 20, ptr192) + cleanup_list.push(ptr192) () } } - let address44 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index45 = 0; index45 < (((iter_elem).metadata).aliases).length(); index45 = index45 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index45)] - let iter_base = address44 + (index45 * 8); + let address194 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index195 = 0; index195 < (((iter_elem).metadata).aliases).length(); index195 = index195 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index195)] + let iter_base = address194 + (index195 * 8); - let ptr43 = mbt_ffi_str2ptr(iter_elem) + let ptr193 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr43) - cleanup_list.push(ptr43) + mbt_ffi_store32((iter_base) + 0, ptr193) + cleanup_list.push(ptr193) } mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 28, address44) + mbt_ffi_store32((iter_base) + 28, address194) - let address47 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index48 = 0; index48 < (((iter_elem).metadata).examples).length(); index48 = index48 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index48)] - let iter_base = address47 + (index48 * 8); + let address197 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index198 = 0; index198 < (((iter_elem).metadata).examples).length(); index198 = index198 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index198)] + let iter_base = address197 + (index198 * 8); - let ptr46 = mbt_ffi_str2ptr(iter_elem) + let ptr196 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr46) - cleanup_list.push(ptr46) + mbt_ffi_store32((iter_base) + 0, ptr196) + cleanup_list.push(ptr196) } mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 36, address47) + mbt_ffi_store32((iter_base) + 36, address197) match (((iter_elem).metadata).deprecated) { None => { @@ -18178,13 +27158,13 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload50) => { + Some(payload200) => { mbt_ffi_store8((iter_base) + 44, (1)) - let ptr51 = mbt_ffi_str2ptr(payload50) - mbt_ffi_store32((iter_base) + 52, payload50.length()) - mbt_ffi_store32((iter_base) + 48, ptr51) - cleanup_list.push(ptr51) + let ptr201 = mbt_ffi_str2ptr(payload200) + mbt_ffi_store32((iter_base) + 52, payload200.length()) + mbt_ffi_store32((iter_base) + 48, ptr201) + cleanup_list.push(ptr201) () } @@ -18196,10 +27176,10 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload53) => { + Some(payload203) => { mbt_ffi_store8((iter_base) + 56, (1)) - match payload53 { + match payload203 { Multimodal => { mbt_ffi_store8((iter_base) + 60, (0)) @@ -18215,13 +27195,13 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Other(payload57) => { + Other(payload207) => { mbt_ffi_store8((iter_base) + 60, (3)) - let ptr58 = mbt_ffi_str2ptr(payload57) - mbt_ffi_store32((iter_base) + 68, payload57.length()) - mbt_ffi_store32((iter_base) + 64, ptr58) - cleanup_list.push(ptr58) + let ptr208 = mbt_ffi_str2ptr(payload207) + mbt_ffi_store32((iter_base) + 68, payload207.length()) + mbt_ffi_store32((iter_base) + 64, ptr208) + cleanup_list.push(ptr208) () } @@ -18230,125 +27210,125 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } } - cleanup_list.push(ptr37) - cleanup_list.push(address44) - cleanup_list.push(address47) + cleanup_list.push(ptr187) + cleanup_list.push(address194) + cleanup_list.push(address197) } - mbt_ffi_store32((iter_base) + 12, (payload36).length()) - mbt_ffi_store32((iter_base) + 8, address59) - cleanup_list.push(address59) + mbt_ffi_store32((iter_base) + 12, (payload186).length()) + mbt_ffi_store32((iter_base) + 8, address209) + cleanup_list.push(address209) () } - EnumType(payload61) => { + EnumType(payload211) => { mbt_ffi_store8((iter_base) + 0, (16)) - let address63 = mbt_ffi_malloc((payload61).length() * 8); - for index64 = 0; index64 < (payload61).length(); index64 = index64 + 1 { - let iter_elem : String = (payload61)[(index64)] - let iter_base = address63 + (index64 * 8); + let address213 = mbt_ffi_malloc((payload211).length() * 8); + for index214 = 0; index214 < (payload211).length(); index214 = index214 + 1 { + let iter_elem : String = (payload211)[(index214)] + let iter_base = address213 + (index214 * 8); - let ptr62 = mbt_ffi_str2ptr(iter_elem) + let ptr212 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr62) - cleanup_list.push(ptr62) + mbt_ffi_store32((iter_base) + 0, ptr212) + cleanup_list.push(ptr212) } - mbt_ffi_store32((iter_base) + 12, (payload61).length()) - mbt_ffi_store32((iter_base) + 8, address63) - cleanup_list.push(address63) + mbt_ffi_store32((iter_base) + 12, (payload211).length()) + mbt_ffi_store32((iter_base) + 8, address213) + cleanup_list.push(address213) () } - FlagsType(payload65) => { + FlagsType(payload215) => { mbt_ffi_store8((iter_base) + 0, (17)) - let address67 = mbt_ffi_malloc((payload65).length() * 8); - for index68 = 0; index68 < (payload65).length(); index68 = index68 + 1 { - let iter_elem : String = (payload65)[(index68)] - let iter_base = address67 + (index68 * 8); + let address217 = mbt_ffi_malloc((payload215).length() * 8); + for index218 = 0; index218 < (payload215).length(); index218 = index218 + 1 { + let iter_elem : String = (payload215)[(index218)] + let iter_base = address217 + (index218 * 8); - let ptr66 = mbt_ffi_str2ptr(iter_elem) + let ptr216 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr66) - cleanup_list.push(ptr66) + mbt_ffi_store32((iter_base) + 0, ptr216) + cleanup_list.push(ptr216) } - mbt_ffi_store32((iter_base) + 12, (payload65).length()) - mbt_ffi_store32((iter_base) + 8, address67) - cleanup_list.push(address67) + mbt_ffi_store32((iter_base) + 12, (payload215).length()) + mbt_ffi_store32((iter_base) + 8, address217) + cleanup_list.push(address217) () } - TupleType(payload69) => { + TupleType(payload219) => { mbt_ffi_store8((iter_base) + 0, (18)) - let address70 = mbt_ffi_malloc((payload69).length() * 4); - for index71 = 0; index71 < (payload69).length(); index71 = index71 + 1 { - let iter_elem : Int = (payload69)[(index71)] - let iter_base = address70 + (index71 * 4); + let address220 = mbt_ffi_malloc((payload219).length() * 4); + for index221 = 0; index221 < (payload219).length(); index221 = index221 + 1 { + let iter_elem : Int = (payload219)[(index221)] + let iter_base = address220 + (index221 * 4); mbt_ffi_store32((iter_base) + 0, iter_elem) } - mbt_ffi_store32((iter_base) + 12, (payload69).length()) - mbt_ffi_store32((iter_base) + 8, address70) - cleanup_list.push(address70) + mbt_ffi_store32((iter_base) + 12, (payload219).length()) + mbt_ffi_store32((iter_base) + 8, address220) + cleanup_list.push(address220) () } - ListType(payload72) => { + ListType(payload222) => { mbt_ffi_store8((iter_base) + 0, (19)) - mbt_ffi_store32((iter_base) + 8, payload72) + mbt_ffi_store32((iter_base) + 8, payload222) () } - FixedListType(payload73) => { + FixedListType(payload223) => { mbt_ffi_store8((iter_base) + 0, (20)) - mbt_ffi_store32((iter_base) + 8, (payload73).element) - mbt_ffi_store32((iter_base) + 12, ((payload73).length).reinterpret_as_int()) + mbt_ffi_store32((iter_base) + 8, (payload223).element) + mbt_ffi_store32((iter_base) + 12, ((payload223).length).reinterpret_as_int()) () } - MapType(payload74) => { + MapType(payload224) => { mbt_ffi_store8((iter_base) + 0, (21)) - mbt_ffi_store32((iter_base) + 8, (payload74).key) - mbt_ffi_store32((iter_base) + 12, (payload74).value) + mbt_ffi_store32((iter_base) + 8, (payload224).key) + mbt_ffi_store32((iter_base) + 12, (payload224).value) () } - OptionType(payload75) => { + OptionType(payload225) => { mbt_ffi_store8((iter_base) + 0, (22)) - mbt_ffi_store32((iter_base) + 8, payload75) + mbt_ffi_store32((iter_base) + 8, payload225) () } - ResultType(payload76) => { + ResultType(payload226) => { mbt_ffi_store8((iter_base) + 0, (23)) - match ((payload76).ok) { + match ((payload226).ok) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload78) => { + Some(payload228) => { mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload78) + mbt_ffi_store32((iter_base) + 12, payload228) () } } - match ((payload76).err) { + match ((payload226).err) { None => { mbt_ffi_store8((iter_base) + 16, (0)) () } - Some(payload80) => { + Some(payload230) => { mbt_ffi_store8((iter_base) + 16, (1)) - mbt_ffi_store32((iter_base) + 20, payload80) + mbt_ffi_store32((iter_base) + 20, payload230) () } @@ -18356,78 +27336,78 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - TextType(payload81) => { + TextType(payload231) => { mbt_ffi_store8((iter_base) + 0, (24)) - match ((payload81).languages) { + match ((payload231).languages) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload83) => { + Some(payload233) => { mbt_ffi_store8((iter_base) + 8, (1)) - let address85 = mbt_ffi_malloc((payload83).length() * 8); - for index86 = 0; index86 < (payload83).length(); index86 = index86 + 1 { - let iter_elem : String = (payload83)[(index86)] - let iter_base = address85 + (index86 * 8); + let address235 = mbt_ffi_malloc((payload233).length() * 8); + for index236 = 0; index236 < (payload233).length(); index236 = index236 + 1 { + let iter_elem : String = (payload233)[(index236)] + let iter_base = address235 + (index236 * 8); - let ptr84 = mbt_ffi_str2ptr(iter_elem) + let ptr234 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr84) - cleanup_list.push(ptr84) + mbt_ffi_store32((iter_base) + 0, ptr234) + cleanup_list.push(ptr234) } - mbt_ffi_store32((iter_base) + 16, (payload83).length()) - mbt_ffi_store32((iter_base) + 12, address85) - cleanup_list.push(address85) + mbt_ffi_store32((iter_base) + 16, (payload233).length()) + mbt_ffi_store32((iter_base) + 12, address235) + cleanup_list.push(address235) () } } - match ((payload81).min_length) { + match ((payload231).min_length) { None => { mbt_ffi_store8((iter_base) + 20, (0)) () } - Some(payload88) => { + Some(payload238) => { mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload88).reinterpret_as_int()) + mbt_ffi_store32((iter_base) + 24, (payload238).reinterpret_as_int()) () } } - match ((payload81).max_length) { + match ((payload231).max_length) { None => { mbt_ffi_store8((iter_base) + 28, (0)) () } - Some(payload90) => { + Some(payload240) => { mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload90).reinterpret_as_int()) + mbt_ffi_store32((iter_base) + 32, (payload240).reinterpret_as_int()) () } } - match ((payload81).regex) { + match ((payload231).regex) { None => { mbt_ffi_store8((iter_base) + 36, (0)) () } - Some(payload92) => { + Some(payload242) => { mbt_ffi_store8((iter_base) + 36, (1)) - let ptr93 = mbt_ffi_str2ptr(payload92) - mbt_ffi_store32((iter_base) + 44, payload92.length()) - mbt_ffi_store32((iter_base) + 40, ptr93) - cleanup_list.push(ptr93) + let ptr243 = mbt_ffi_str2ptr(payload242) + mbt_ffi_store32((iter_base) + 44, payload242.length()) + mbt_ffi_store32((iter_base) + 40, ptr243) + cleanup_list.push(ptr243) () } @@ -18435,60 +27415,60 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - BinaryType(payload94) => { + BinaryType(payload244) => { mbt_ffi_store8((iter_base) + 0, (25)) - match ((payload94).mime_types) { + match ((payload244).mime_types) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload96) => { + Some(payload246) => { mbt_ffi_store8((iter_base) + 8, (1)) - let address98 = mbt_ffi_malloc((payload96).length() * 8); - for index99 = 0; index99 < (payload96).length(); index99 = index99 + 1 { - let iter_elem : String = (payload96)[(index99)] - let iter_base = address98 + (index99 * 8); + let address248 = mbt_ffi_malloc((payload246).length() * 8); + for index249 = 0; index249 < (payload246).length(); index249 = index249 + 1 { + let iter_elem : String = (payload246)[(index249)] + let iter_base = address248 + (index249 * 8); - let ptr97 = mbt_ffi_str2ptr(iter_elem) + let ptr247 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr97) - cleanup_list.push(ptr97) + mbt_ffi_store32((iter_base) + 0, ptr247) + cleanup_list.push(ptr247) } - mbt_ffi_store32((iter_base) + 16, (payload96).length()) - mbt_ffi_store32((iter_base) + 12, address98) - cleanup_list.push(address98) + mbt_ffi_store32((iter_base) + 16, (payload246).length()) + mbt_ffi_store32((iter_base) + 12, address248) + cleanup_list.push(address248) () } } - match ((payload94).min_bytes) { + match ((payload244).min_bytes) { None => { mbt_ffi_store8((iter_base) + 20, (0)) () } - Some(payload101) => { + Some(payload251) => { mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload101).reinterpret_as_int()) + mbt_ffi_store32((iter_base) + 24, (payload251).reinterpret_as_int()) () } } - match ((payload94).max_bytes) { + match ((payload244).max_bytes) { None => { mbt_ffi_store8((iter_base) + 28, (0)) () } - Some(payload103) => { + Some(payload253) => { mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload103).reinterpret_as_int()) + mbt_ffi_store32((iter_base) + 32, (payload253).reinterpret_as_int()) () } @@ -18496,62 +27476,62 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - PathType(payload104) => { + PathType(payload254) => { mbt_ffi_store8((iter_base) + 0, (26)) - mbt_ffi_store8((iter_base) + 8, (payload104).direction.ordinal()) - mbt_ffi_store8((iter_base) + 9, (payload104).kind.ordinal()) + mbt_ffi_store8((iter_base) + 8, (payload254).direction.ordinal()) + mbt_ffi_store8((iter_base) + 9, (payload254).kind.ordinal()) - match ((payload104).allowed_mime_types) { + match ((payload254).allowed_mime_types) { None => { mbt_ffi_store8((iter_base) + 12, (0)) () } - Some(payload106) => { + Some(payload256) => { mbt_ffi_store8((iter_base) + 12, (1)) - let address108 = mbt_ffi_malloc((payload106).length() * 8); - for index109 = 0; index109 < (payload106).length(); index109 = index109 + 1 { - let iter_elem : String = (payload106)[(index109)] - let iter_base = address108 + (index109 * 8); + let address258 = mbt_ffi_malloc((payload256).length() * 8); + for index259 = 0; index259 < (payload256).length(); index259 = index259 + 1 { + let iter_elem : String = (payload256)[(index259)] + let iter_base = address258 + (index259 * 8); - let ptr107 = mbt_ffi_str2ptr(iter_elem) + let ptr257 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr107) - cleanup_list.push(ptr107) + mbt_ffi_store32((iter_base) + 0, ptr257) + cleanup_list.push(ptr257) } - mbt_ffi_store32((iter_base) + 20, (payload106).length()) - mbt_ffi_store32((iter_base) + 16, address108) - cleanup_list.push(address108) + mbt_ffi_store32((iter_base) + 20, (payload256).length()) + mbt_ffi_store32((iter_base) + 16, address258) + cleanup_list.push(address258) () } } - match ((payload104).allowed_extensions) { + match ((payload254).allowed_extensions) { None => { mbt_ffi_store8((iter_base) + 24, (0)) () } - Some(payload111) => { + Some(payload261) => { mbt_ffi_store8((iter_base) + 24, (1)) - let address113 = mbt_ffi_malloc((payload111).length() * 8); - for index114 = 0; index114 < (payload111).length(); index114 = index114 + 1 { - let iter_elem : String = (payload111)[(index114)] - let iter_base = address113 + (index114 * 8); + let address263 = mbt_ffi_malloc((payload261).length() * 8); + for index264 = 0; index264 < (payload261).length(); index264 = index264 + 1 { + let iter_elem : String = (payload261)[(index264)] + let iter_base = address263 + (index264 * 8); - let ptr112 = mbt_ffi_str2ptr(iter_elem) + let ptr262 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr112) - cleanup_list.push(ptr112) + mbt_ffi_store32((iter_base) + 0, ptr262) + cleanup_list.push(ptr262) } - mbt_ffi_store32((iter_base) + 32, (payload111).length()) - mbt_ffi_store32((iter_base) + 28, address113) - cleanup_list.push(address113) + mbt_ffi_store32((iter_base) + 32, (payload261).length()) + mbt_ffi_store32((iter_base) + 28, address263) + cleanup_list.push(address263) () } @@ -18559,60 +27539,60 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - UrlType(payload115) => { + UrlType(payload265) => { mbt_ffi_store8((iter_base) + 0, (27)) - match ((payload115).allowed_schemes) { + match ((payload265).allowed_schemes) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload117) => { + Some(payload267) => { mbt_ffi_store8((iter_base) + 8, (1)) - let address119 = mbt_ffi_malloc((payload117).length() * 8); - for index120 = 0; index120 < (payload117).length(); index120 = index120 + 1 { - let iter_elem : String = (payload117)[(index120)] - let iter_base = address119 + (index120 * 8); + let address269 = mbt_ffi_malloc((payload267).length() * 8); + for index270 = 0; index270 < (payload267).length(); index270 = index270 + 1 { + let iter_elem : String = (payload267)[(index270)] + let iter_base = address269 + (index270 * 8); - let ptr118 = mbt_ffi_str2ptr(iter_elem) + let ptr268 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr118) - cleanup_list.push(ptr118) + mbt_ffi_store32((iter_base) + 0, ptr268) + cleanup_list.push(ptr268) } - mbt_ffi_store32((iter_base) + 16, (payload117).length()) - mbt_ffi_store32((iter_base) + 12, address119) - cleanup_list.push(address119) + mbt_ffi_store32((iter_base) + 16, (payload267).length()) + mbt_ffi_store32((iter_base) + 12, address269) + cleanup_list.push(address269) () } } - match ((payload115).allowed_hosts) { + match ((payload265).allowed_hosts) { None => { mbt_ffi_store8((iter_base) + 20, (0)) () } - Some(payload122) => { + Some(payload272) => { mbt_ffi_store8((iter_base) + 20, (1)) - let address124 = mbt_ffi_malloc((payload122).length() * 8); - for index125 = 0; index125 < (payload122).length(); index125 = index125 + 1 { - let iter_elem : String = (payload122)[(index125)] - let iter_base = address124 + (index125 * 8); + let address274 = mbt_ffi_malloc((payload272).length() * 8); + for index275 = 0; index275 < (payload272).length(); index275 = index275 + 1 { + let iter_elem : String = (payload272)[(index275)] + let iter_base = address274 + (index275 * 8); - let ptr123 = mbt_ffi_str2ptr(iter_elem) + let ptr273 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr123) - cleanup_list.push(ptr123) + mbt_ffi_store32((iter_base) + 0, ptr273) + cleanup_list.push(ptr273) } - mbt_ffi_store32((iter_base) + 28, (payload122).length()) - mbt_ffi_store32((iter_base) + 24, address124) - cleanup_list.push(address124) + mbt_ffi_store32((iter_base) + 28, (payload272).length()) + mbt_ffi_store32((iter_base) + 24, address274) + cleanup_list.push(address274) () } @@ -18630,160 +27610,160 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - QuantityType(payload128) => { + QuantityType(payload278) => { mbt_ffi_store8((iter_base) + 0, (30)) - let ptr129 = mbt_ffi_str2ptr((payload128).base_unit) - mbt_ffi_store32((iter_base) + 12, (payload128).base_unit.length()) - mbt_ffi_store32((iter_base) + 8, ptr129) + let ptr279 = mbt_ffi_str2ptr((payload278).base_unit) + mbt_ffi_store32((iter_base) + 12, (payload278).base_unit.length()) + mbt_ffi_store32((iter_base) + 8, ptr279) - let address131 = mbt_ffi_malloc(((payload128).allowed_suffixes).length() * 8); - for index132 = 0; index132 < ((payload128).allowed_suffixes).length(); index132 = index132 + 1 { - let iter_elem : String = ((payload128).allowed_suffixes)[(index132)] - let iter_base = address131 + (index132 * 8); + let address281 = mbt_ffi_malloc(((payload278).allowed_suffixes).length() * 8); + for index282 = 0; index282 < ((payload278).allowed_suffixes).length(); index282 = index282 + 1 { + let iter_elem : String = ((payload278).allowed_suffixes)[(index282)] + let iter_base = address281 + (index282 * 8); - let ptr130 = mbt_ffi_str2ptr(iter_elem) + let ptr280 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr130) - cleanup_list.push(ptr130) + mbt_ffi_store32((iter_base) + 0, ptr280) + cleanup_list.push(ptr280) } - mbt_ffi_store32((iter_base) + 20, ((payload128).allowed_suffixes).length()) - mbt_ffi_store32((iter_base) + 16, address131) + mbt_ffi_store32((iter_base) + 20, ((payload278).allowed_suffixes).length()) + mbt_ffi_store32((iter_base) + 16, address281) - match ((payload128).min) { + match ((payload278).min) { None => { mbt_ffi_store8((iter_base) + 24, (0)) () } - Some(payload134) => { + Some(payload284) => { mbt_ffi_store8((iter_base) + 24, (1)) - mbt_ffi_store64((iter_base) + 32, (payload134).mantissa) - mbt_ffi_store32((iter_base) + 40, (payload134).scale) + mbt_ffi_store64((iter_base) + 32, (payload284).mantissa) + mbt_ffi_store32((iter_base) + 40, (payload284).scale) - let ptr135 = mbt_ffi_str2ptr((payload134).unit) - mbt_ffi_store32((iter_base) + 48, (payload134).unit.length()) - mbt_ffi_store32((iter_base) + 44, ptr135) - cleanup_list.push(ptr135) + let ptr285 = mbt_ffi_str2ptr((payload284).unit) + mbt_ffi_store32((iter_base) + 48, (payload284).unit.length()) + mbt_ffi_store32((iter_base) + 44, ptr285) + cleanup_list.push(ptr285) () } } - match ((payload128).max) { + match ((payload278).max) { None => { mbt_ffi_store8((iter_base) + 56, (0)) () } - Some(payload137) => { + Some(payload287) => { mbt_ffi_store8((iter_base) + 56, (1)) - mbt_ffi_store64((iter_base) + 64, (payload137).mantissa) - mbt_ffi_store32((iter_base) + 72, (payload137).scale) + mbt_ffi_store64((iter_base) + 64, (payload287).mantissa) + mbt_ffi_store32((iter_base) + 72, (payload287).scale) - let ptr138 = mbt_ffi_str2ptr((payload137).unit) - mbt_ffi_store32((iter_base) + 80, (payload137).unit.length()) - mbt_ffi_store32((iter_base) + 76, ptr138) - cleanup_list.push(ptr138) + let ptr288 = mbt_ffi_str2ptr((payload287).unit) + mbt_ffi_store32((iter_base) + 80, (payload287).unit.length()) + mbt_ffi_store32((iter_base) + 76, ptr288) + cleanup_list.push(ptr288) () } } - cleanup_list.push(ptr129) - cleanup_list.push(address131) + cleanup_list.push(ptr279) + cleanup_list.push(address281) () } - UnionType(payload139) => { + UnionType(payload289) => { mbt_ffi_store8((iter_base) + 0, (31)) - let address175 = mbt_ffi_malloc(((payload139).branches).length() * 92); - for index176 = 0; index176 < ((payload139).branches).length(); index176 = index176 + 1 { - let iter_elem : @types.UnionBranch = ((payload139).branches)[(index176)] - let iter_base = address175 + (index176 * 92); + let address325 = mbt_ffi_malloc(((payload289).branches).length() * 92); + for index326 = 0; index326 < ((payload289).branches).length(); index326 = index326 + 1 { + let iter_elem : @types.UnionBranch = ((payload289).branches)[(index326)] + let iter_base = address325 + (index326 * 92); - let ptr140 = mbt_ffi_str2ptr((iter_elem).tag) + let ptr290 = mbt_ffi_str2ptr((iter_elem).tag) mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) - mbt_ffi_store32((iter_base) + 0, ptr140) + mbt_ffi_store32((iter_base) + 0, ptr290) mbt_ffi_store32((iter_base) + 8, (iter_elem).body) match (iter_elem).discriminator { - Prefix(payload141) => { + Prefix(payload291) => { mbt_ffi_store8((iter_base) + 12, (0)) - let ptr142 = mbt_ffi_str2ptr(payload141) - mbt_ffi_store32((iter_base) + 20, payload141.length()) - mbt_ffi_store32((iter_base) + 16, ptr142) - cleanup_list.push(ptr142) + let ptr292 = mbt_ffi_str2ptr(payload291) + mbt_ffi_store32((iter_base) + 20, payload291.length()) + mbt_ffi_store32((iter_base) + 16, ptr292) + cleanup_list.push(ptr292) () } - Suffix(payload143) => { + Suffix(payload293) => { mbt_ffi_store8((iter_base) + 12, (1)) - let ptr144 = mbt_ffi_str2ptr(payload143) - mbt_ffi_store32((iter_base) + 20, payload143.length()) - mbt_ffi_store32((iter_base) + 16, ptr144) - cleanup_list.push(ptr144) + let ptr294 = mbt_ffi_str2ptr(payload293) + mbt_ffi_store32((iter_base) + 20, payload293.length()) + mbt_ffi_store32((iter_base) + 16, ptr294) + cleanup_list.push(ptr294) () } - Contains(payload145) => { + Contains(payload295) => { mbt_ffi_store8((iter_base) + 12, (2)) - let ptr146 = mbt_ffi_str2ptr(payload145) - mbt_ffi_store32((iter_base) + 20, payload145.length()) - mbt_ffi_store32((iter_base) + 16, ptr146) - cleanup_list.push(ptr146) + let ptr296 = mbt_ffi_str2ptr(payload295) + mbt_ffi_store32((iter_base) + 20, payload295.length()) + mbt_ffi_store32((iter_base) + 16, ptr296) + cleanup_list.push(ptr296) () } - Regex(payload147) => { + Regex(payload297) => { mbt_ffi_store8((iter_base) + 12, (3)) - let ptr148 = mbt_ffi_str2ptr(payload147) - mbt_ffi_store32((iter_base) + 20, payload147.length()) - mbt_ffi_store32((iter_base) + 16, ptr148) - cleanup_list.push(ptr148) + let ptr298 = mbt_ffi_str2ptr(payload297) + mbt_ffi_store32((iter_base) + 20, payload297.length()) + mbt_ffi_store32((iter_base) + 16, ptr298) + cleanup_list.push(ptr298) () } - FieldEquals(payload149) => { + FieldEquals(payload299) => { mbt_ffi_store8((iter_base) + 12, (4)) - let ptr150 = mbt_ffi_str2ptr((payload149).field_name) - mbt_ffi_store32((iter_base) + 20, (payload149).field_name.length()) - mbt_ffi_store32((iter_base) + 16, ptr150) + let ptr300 = mbt_ffi_str2ptr((payload299).field_name) + mbt_ffi_store32((iter_base) + 20, (payload299).field_name.length()) + mbt_ffi_store32((iter_base) + 16, ptr300) - match ((payload149).literal) { + match ((payload299).literal) { None => { mbt_ffi_store8((iter_base) + 24, (0)) () } - Some(payload152) => { + Some(payload302) => { mbt_ffi_store8((iter_base) + 24, (1)) - let ptr153 = mbt_ffi_str2ptr(payload152) - mbt_ffi_store32((iter_base) + 32, payload152.length()) - mbt_ffi_store32((iter_base) + 28, ptr153) - cleanup_list.push(ptr153) + let ptr303 = mbt_ffi_str2ptr(payload302) + mbt_ffi_store32((iter_base) + 32, payload302.length()) + mbt_ffi_store32((iter_base) + 28, ptr303) + cleanup_list.push(ptr303) () } } - cleanup_list.push(ptr150) + cleanup_list.push(ptr300) () } - FieldAbsent(payload154) => { + FieldAbsent(payload304) => { mbt_ffi_store8((iter_base) + 12, (5)) - let ptr155 = mbt_ffi_str2ptr(payload154) - mbt_ffi_store32((iter_base) + 20, payload154.length()) - mbt_ffi_store32((iter_base) + 16, ptr155) - cleanup_list.push(ptr155) + let ptr305 = mbt_ffi_str2ptr(payload304) + mbt_ffi_store32((iter_base) + 20, payload304.length()) + mbt_ffi_store32((iter_base) + 16, ptr305) + cleanup_list.push(ptr305) () } @@ -18795,45 +27775,45 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload157) => { + Some(payload307) => { mbt_ffi_store8((iter_base) + 36, (1)) - let ptr158 = mbt_ffi_str2ptr(payload157) - mbt_ffi_store32((iter_base) + 44, payload157.length()) - mbt_ffi_store32((iter_base) + 40, ptr158) - cleanup_list.push(ptr158) + let ptr308 = mbt_ffi_str2ptr(payload307) + mbt_ffi_store32((iter_base) + 44, payload307.length()) + mbt_ffi_store32((iter_base) + 40, ptr308) + cleanup_list.push(ptr308) () } } - let address160 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index161 = 0; index161 < (((iter_elem).metadata).aliases).length(); index161 = index161 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index161)] - let iter_base = address160 + (index161 * 8); + let address310 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index311 = 0; index311 < (((iter_elem).metadata).aliases).length(); index311 = index311 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index311)] + let iter_base = address310 + (index311 * 8); - let ptr159 = mbt_ffi_str2ptr(iter_elem) + let ptr309 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr159) - cleanup_list.push(ptr159) + mbt_ffi_store32((iter_base) + 0, ptr309) + cleanup_list.push(ptr309) } mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 48, address160) + mbt_ffi_store32((iter_base) + 48, address310) - let address163 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index164 = 0; index164 < (((iter_elem).metadata).examples).length(); index164 = index164 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index164)] - let iter_base = address163 + (index164 * 8); + let address313 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index314 = 0; index314 < (((iter_elem).metadata).examples).length(); index314 = index314 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index314)] + let iter_base = address313 + (index314 * 8); - let ptr162 = mbt_ffi_str2ptr(iter_elem) + let ptr312 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr162) - cleanup_list.push(ptr162) + mbt_ffi_store32((iter_base) + 0, ptr312) + cleanup_list.push(ptr312) } mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 56, address163) + mbt_ffi_store32((iter_base) + 56, address313) match (((iter_elem).metadata).deprecated) { None => { @@ -18841,13 +27821,13 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload166) => { + Some(payload316) => { mbt_ffi_store8((iter_base) + 64, (1)) - let ptr167 = mbt_ffi_str2ptr(payload166) - mbt_ffi_store32((iter_base) + 72, payload166.length()) - mbt_ffi_store32((iter_base) + 68, ptr167) - cleanup_list.push(ptr167) + let ptr317 = mbt_ffi_str2ptr(payload316) + mbt_ffi_store32((iter_base) + 72, payload316.length()) + mbt_ffi_store32((iter_base) + 68, ptr317) + cleanup_list.push(ptr317) () } @@ -18859,10 +27839,10 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload169) => { + Some(payload319) => { mbt_ffi_store8((iter_base) + 76, (1)) - match payload169 { + match payload319 { Multimodal => { mbt_ffi_store8((iter_base) + 80, (0)) @@ -18878,13 +27858,13 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Other(payload173) => { + Other(payload323) => { mbt_ffi_store8((iter_base) + 80, (3)) - let ptr174 = mbt_ffi_str2ptr(payload173) - mbt_ffi_store32((iter_base) + 88, payload173.length()) - mbt_ffi_store32((iter_base) + 84, ptr174) - cleanup_list.push(ptr174) + let ptr324 = mbt_ffi_str2ptr(payload323) + mbt_ffi_store32((iter_base) + 88, payload323.length()) + mbt_ffi_store32((iter_base) + 84, ptr324) + cleanup_list.push(ptr324) () } @@ -18893,33 +27873,33 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } } - cleanup_list.push(ptr140) - cleanup_list.push(address160) - cleanup_list.push(address163) + cleanup_list.push(ptr290) + cleanup_list.push(address310) + cleanup_list.push(address313) } - mbt_ffi_store32((iter_base) + 12, ((payload139).branches).length()) - mbt_ffi_store32((iter_base) + 8, address175) - cleanup_list.push(address175) + mbt_ffi_store32((iter_base) + 12, ((payload289).branches).length()) + mbt_ffi_store32((iter_base) + 8, address325) + cleanup_list.push(address325) () } - SecretType(payload177) => { + SecretType(payload327) => { mbt_ffi_store8((iter_base) + 0, (32)) - match ((payload177).category) { + match ((payload327).category) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload179) => { + Some(payload329) => { mbt_ffi_store8((iter_base) + 8, (1)) - let ptr180 = mbt_ffi_str2ptr(payload179) - mbt_ffi_store32((iter_base) + 16, payload179.length()) - mbt_ffi_store32((iter_base) + 12, ptr180) - cleanup_list.push(ptr180) + let ptr330 = mbt_ffi_str2ptr(payload329) + mbt_ffi_store32((iter_base) + 16, payload329.length()) + mbt_ffi_store32((iter_base) + 12, ptr330) + cleanup_list.push(ptr330) () } @@ -18927,22 +27907,22 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - QuotaTokenType(payload181) => { + QuotaTokenType(payload331) => { mbt_ffi_store8((iter_base) + 0, (33)) - match ((payload181).resource_name) { + match ((payload331).resource_name) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload183) => { + Some(payload333) => { mbt_ffi_store8((iter_base) + 8, (1)) - let ptr184 = mbt_ffi_str2ptr(payload183) - mbt_ffi_store32((iter_base) + 16, payload183.length()) - mbt_ffi_store32((iter_base) + 12, ptr184) - cleanup_list.push(ptr184) + let ptr334 = mbt_ffi_str2ptr(payload333) + mbt_ffi_store32((iter_base) + 16, payload333.length()) + mbt_ffi_store32((iter_base) + 12, ptr334) + cleanup_list.push(ptr334) () } @@ -18950,18 +27930,18 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - FutureType(payload185) => { + FutureType(payload335) => { mbt_ffi_store8((iter_base) + 0, (34)) - match (payload185) { + match (payload335) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload187) => { + Some(payload337) => { mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload187) + mbt_ffi_store32((iter_base) + 12, payload337) () } @@ -18969,18 +27949,18 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - StreamType(payload188) => { + StreamType(payload338) => { mbt_ffi_store8((iter_base) + 0, (35)) - match (payload188) { + match (payload338) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload190) => { + Some(payload340) => { mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload190) + mbt_ffi_store32((iter_base) + 12, payload340) () } @@ -18996,45 +27976,45 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload192) => { + Some(payload342) => { mbt_ffi_store8((iter_base) + 88, (1)) - let ptr193 = mbt_ffi_str2ptr(payload192) - mbt_ffi_store32((iter_base) + 96, payload192.length()) - mbt_ffi_store32((iter_base) + 92, ptr193) - cleanup_list.push(ptr193) + let ptr343 = mbt_ffi_str2ptr(payload342) + mbt_ffi_store32((iter_base) + 96, payload342.length()) + mbt_ffi_store32((iter_base) + 92, ptr343) + cleanup_list.push(ptr343) () } } - let address195 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index196 = 0; index196 < (((iter_elem).metadata).aliases).length(); index196 = index196 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index196)] - let iter_base = address195 + (index196 * 8); + let address345 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index346 = 0; index346 < (((iter_elem).metadata).aliases).length(); index346 = index346 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index346)] + let iter_base = address345 + (index346 * 8); - let ptr194 = mbt_ffi_str2ptr(iter_elem) + let ptr344 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr194) - cleanup_list.push(ptr194) + mbt_ffi_store32((iter_base) + 0, ptr344) + cleanup_list.push(ptr344) } mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 100, address195) + mbt_ffi_store32((iter_base) + 100, address345) - let address198 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index199 = 0; index199 < (((iter_elem).metadata).examples).length(); index199 = index199 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index199)] - let iter_base = address198 + (index199 * 8); + let address348 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index349 = 0; index349 < (((iter_elem).metadata).examples).length(); index349 = index349 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index349)] + let iter_base = address348 + (index349 * 8); - let ptr197 = mbt_ffi_str2ptr(iter_elem) + let ptr347 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr197) - cleanup_list.push(ptr197) + mbt_ffi_store32((iter_base) + 0, ptr347) + cleanup_list.push(ptr347) } mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 108, address198) + mbt_ffi_store32((iter_base) + 108, address348) match (((iter_elem).metadata).deprecated) { None => { @@ -19042,13 +28022,13 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload201) => { + Some(payload351) => { mbt_ffi_store8((iter_base) + 116, (1)) - let ptr202 = mbt_ffi_str2ptr(payload201) - mbt_ffi_store32((iter_base) + 124, payload201.length()) - mbt_ffi_store32((iter_base) + 120, ptr202) - cleanup_list.push(ptr202) + let ptr352 = mbt_ffi_str2ptr(payload351) + mbt_ffi_store32((iter_base) + 124, payload351.length()) + mbt_ffi_store32((iter_base) + 120, ptr352) + cleanup_list.push(ptr352) () } @@ -19060,10 +28040,10 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload204) => { + Some(payload354) => { mbt_ffi_store8((iter_base) + 128, (1)) - match payload204 { + match payload354 { Multimodal => { mbt_ffi_store8((iter_base) + 132, (0)) @@ -19079,13 +28059,13 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Other(payload208) => { + Other(payload358) => { mbt_ffi_store8((iter_base) + 132, (3)) - let ptr209 = mbt_ffi_str2ptr(payload208) - mbt_ffi_store32((iter_base) + 140, payload208.length()) - mbt_ffi_store32((iter_base) + 136, ptr209) - cleanup_list.push(ptr209) + let ptr359 = mbt_ffi_str2ptr(payload358) + mbt_ffi_store32((iter_base) + 140, payload358.length()) + mbt_ffi_store32((iter_base) + 136, ptr359) + cleanup_list.push(ptr359) () } @@ -19094,19 +28074,19 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } } - cleanup_list.push(address195) - cleanup_list.push(address198) + cleanup_list.push(address345) + cleanup_list.push(address348) } - let address216 = mbt_ffi_malloc(((expected).defs).length() * 24); - for index217 = 0; index217 < ((expected).defs).length(); index217 = index217 + 1 { - let iter_elem : @types.SchemaTypeDef = ((expected).defs)[(index217)] - let iter_base = address216 + (index217 * 24); + let address366 = mbt_ffi_malloc(((expected).defs).length() * 24); + for index367 = 0; index367 < ((expected).defs).length(); index367 = index367 + 1 { + let iter_elem : @types.SchemaTypeDef = ((expected).defs)[(index367)] + let iter_base = address366 + (index367 * 24); - let ptr212 = mbt_ffi_str2ptr((iter_elem).id) + let ptr362 = mbt_ffi_str2ptr((iter_elem).id) mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) - mbt_ffi_store32((iter_base) + 0, ptr212) + mbt_ffi_store32((iter_base) + 0, ptr362) match ((iter_elem).name) { None => { @@ -19114,29 +28094,29 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ () } - Some(payload214) => { + Some(payload364) => { mbt_ffi_store8((iter_base) + 8, (1)) - let ptr215 = mbt_ffi_str2ptr(payload214) - mbt_ffi_store32((iter_base) + 16, payload214.length()) - mbt_ffi_store32((iter_base) + 12, ptr215) - cleanup_list.push(ptr215) + let ptr365 = mbt_ffi_str2ptr(payload364) + mbt_ffi_store32((iter_base) + 16, payload364.length()) + mbt_ffi_store32((iter_base) + 12, ptr365) + cleanup_list.push(ptr365) () } } mbt_ffi_store32((iter_base) + 20, (iter_elem).body) - cleanup_list.push(ptr212) + cleanup_list.push(ptr362) } let return_area = mbt_ffi_malloc(12) - wasmImportGetConfigValue(address, (key).length(), address210, ((expected).type_nodes).length(), address216, ((expected).defs).length(), (expected).root, return_area); + wasmImportGetConfigValue(address, (key).length(), address360, ((expected).type_nodes).length(), address366, ((expected).defs).length(), (expected).root, return_area); - let array245 : Array[@types.SchemaValueNode] = []; - for index246 = 0; index246 < (mbt_ffi_load32((return_area) + 4)); index246 = index246 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 0)) + (index246 * 32) + let array395 : Array[@types.SchemaValueNode] = []; + for index396 = 0; index396 < (mbt_ffi_load32((return_area) + 4)); index396 = index396 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 0)) + (index396 * 32) - let lifted244 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted394 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -19194,8 +28174,8 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ 13 => { let array : Array[Int] = []; - for index218 = 0; index218 < (mbt_ffi_load32((iter_base) + 12)); index218 = index218 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index218 * 4) + for index368 = 0; index368 < (mbt_ffi_load32((iter_base) + 12)); index368 = index368 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index368 * 4) array.push(mbt_ffi_load32((iter_base) + 0)) } @@ -19222,67 +28202,67 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ } 16 => { - let array219 : Array[Bool] = []; - for index220 = 0; index220 < (mbt_ffi_load32((iter_base) + 12)); index220 = index220 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index220 * 1) + let array369 : Array[Bool] = []; + for index370 = 0; index370 < (mbt_ffi_load32((iter_base) + 12)); index370 = index370 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index370 * 1) - array219.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array369.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array219) + @types.SchemaValueNode::FlagsValue(array369) } 17 => { - let array221 : Array[Int] = []; - for index222 = 0; index222 < (mbt_ffi_load32((iter_base) + 12)); index222 = index222 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index222 * 4) + let array371 : Array[Int] = []; + for index372 = 0; index372 < (mbt_ffi_load32((iter_base) + 12)); index372 = index372 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index372 * 4) - array221.push(mbt_ffi_load32((iter_base) + 0)) + array371.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array221) + @types.SchemaValueNode::TupleValue(array371) } 18 => { - let array223 : Array[Int] = []; - for index224 = 0; index224 < (mbt_ffi_load32((iter_base) + 12)); index224 = index224 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index224 * 4) + let array373 : Array[Int] = []; + for index374 = 0; index374 < (mbt_ffi_load32((iter_base) + 12)); index374 = index374 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index374 * 4) - array223.push(mbt_ffi_load32((iter_base) + 0)) + array373.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array223) + @types.SchemaValueNode::ListValue(array373) } 19 => { - let array225 : Array[Int] = []; - for index226 = 0; index226 < (mbt_ffi_load32((iter_base) + 12)); index226 = index226 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index226 * 4) + let array375 : Array[Int] = []; + for index376 = 0; index376 < (mbt_ffi_load32((iter_base) + 12)); index376 = index376 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index376 * 4) - array225.push(mbt_ffi_load32((iter_base) + 0)) + array375.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array225) + @types.SchemaValueNode::FixedListValue(array375) } 20 => { - let array227 : Array[@types.MapEntry] = []; - for index228 = 0; index228 < (mbt_ffi_load32((iter_base) + 12)); index228 = index228 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index228 * 8) + let array377 : Array[@types.MapEntry] = []; + for index378 = 0; index378 < (mbt_ffi_load32((iter_base) + 12)); index378 = index378 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index378 * 8) - array227.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array377.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array227) + @types.SchemaValueNode::MapValue(array377) } 21 => { - let lifted229 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted379 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -19291,14 +28271,14 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ _ => panic() } - @types.SchemaValueNode::OptionValue(lifted229) + @types.SchemaValueNode::OptionValue(lifted379) } 22 => { - let lifted232 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted382 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted230 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted380 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -19307,11 +28287,11 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ _ => panic() } - @types.ResultValuePayload::OkValue(lifted230) + @types.ResultValuePayload::OkValue(lifted380) } 1 => { - let lifted231 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted381 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -19320,58 +28300,58 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ _ => panic() } - @types.ResultValuePayload::ErrValue(lifted231) + @types.ResultValuePayload::ErrValue(lifted381) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted232) + @types.SchemaValueNode::ResultValue(lifted382) } 23 => { - let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted235 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted385 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result234 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result234) + Option::Some(result384) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result233, language : lifted235}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result383, language : lifted385}) } 24 => { - let result236 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result386 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted238 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted388 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result237 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result387 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result237) + Option::Some(result387) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result236, mime_type : lifted238}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result386, mime_type : lifted388}) } 25 => { - let result239 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result389 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result239) + @types.SchemaValueNode::PathValue(result389) } 26 => { - let result240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result390 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result240) + @types.SchemaValueNode::UrlValue(result390) } 27 => { @@ -19383,21 +28363,21 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ } 29 => { - let result241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result391 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result241}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result391}) } 30 => { - let result242 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result392 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result242, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result392, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result243}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result393}) } 32 => { @@ -19406,13 +28386,13 @@ pub fn get_config_value(key : Array[String], expected : @types.SchemaGraph) -> @ _ => panic() } - array245.push(lifted244) + array395.push(lifted394) } mbt_ffi_free(mbt_ffi_load32((return_area) + 0)) - let ret = @types.SchemaValueTree::{value_nodes : array245, root : mbt_ffi_load32((return_area) + 8)} + let ret = @types.SchemaValueTree::{value_nodes : array395, root : mbt_ffi_load32((return_area) + 8)} mbt_ffi_free(address) - mbt_ffi_free(address210) - mbt_ffi_free(address216) + mbt_ffi_free(address360) + mbt_ffi_free(address366) mbt_ffi_free(return_area) cleanup_list.each(mbt_ffi_free) diff --git a/sdks/moonbit/golem_sdk/interface/golem/api/oplog/top.mbt b/sdks/moonbit/golem_sdk/interface/golem/api/oplog/top.mbt index 7fa197aaf0..283d5c6b18 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/api/oplog/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/api/oplog/top.mbt @@ -3474,14 +3474,14 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty let return_area = mbt_ffi_malloc(12) wasmImportEnrichOplogEntries((((environment_id).uuid).high_bits).reinterpret_as_int64(), (((environment_id).uuid).low_bits).reinterpret_as_int64(), ((((agent_id).component_id).uuid).high_bits).reinterpret_as_int64(), ((((agent_id).component_id).uuid).low_bits).reinterpret_as_int64(), ptr, (agent_id).agent_id.length(), address458, (entries).length(), (component_revision).reinterpret_as_int64(), return_area); - let lifted2375 = match (mbt_ffi_load8_u((return_area) + 0)) { + let lifted3075 = match (mbt_ffi_load8_u((return_area) + 0)) { 0 => { - let array2372 : Array[PublicOplogEntry] = []; - for index2373 = 0; index2373 < (mbt_ffi_load32((return_area) + 8)); index2373 = index2373 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 4)) + (index2373 * 208) + let array3072 : Array[PublicOplogEntry] = []; + for index3073 = 0; index3073 < (mbt_ffi_load32((return_area) + 8)); index3073 = index3073 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 4)) + (index3073 * 208) - let lifted2371 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted3071 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) @@ -3533,9 +3533,9 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } mbt_ffi_free(mbt_ffi_load32((iter_base) + 152)) - let array640 : Array[LocalAgentConfigEntry] = []; - for index641 = 0; index641 < (mbt_ffi_load32((iter_base) + 164)); index641 = index641 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 160)) + (index641 * 40) + let array710 : Array[LocalAgentConfigEntry] = []; + for index711 = 0; index711 < (mbt_ffi_load32((iter_base) + 164)); index711 = index711 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 160)) + (index711 * 40) let array473 : Array[String] = []; for index474 = 0; index474 < (mbt_ffi_load32((iter_base) + 4)); index474 = index474 + 1 { @@ -3547,11 +3547,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - let array601 : Array[@types.SchemaTypeNode] = []; - for index602 = 0; index602 < (mbt_ffi_load32((iter_base) + 12)); index602 = index602 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index602 * 144) + let array671 : Array[@types.SchemaTypeNode] = []; + for index672 = 0; index672 < (mbt_ffi_load32((iter_base) + 12)); index672 = index672 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index672 * 144) - let lifted587 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted657 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -3562,642 +3562,1342 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted481 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted476 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted475 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted475) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted478 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted477 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array489 : Array[@types.NamedFieldType] = []; - for index490 = 0; index490 < (mbt_ffi_load32((iter_base) + 12)); index490 = index490 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index490 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result475 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted477) + } + _ => panic() + } - let lifted477 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted480 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result476 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result479 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result476) + Option::Some(result479) + } + _ => panic() } - _ => panic() - } - let array479 : Array[String] = []; - for index480 = 0; index480 < (mbt_ffi_load32((iter_base) + 28)); index480 = index480 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index480 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted476, max : lifted478, unit : lifted480}) + } + _ => panic() + } - let result478 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted481) + } + 3 => { - array479.push(result478) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted488 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array482 : Array[String] = []; - for index483 = 0; index483 < (mbt_ffi_load32((iter_base) + 36)); index483 = index483 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index483 * 8) + let lifted483 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result481 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted482 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array482.push(result481) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted485 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result484 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result484) + Option::Some(lifted482) + } + _ => panic() } - _ => panic() - } - let lifted488 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted485 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted487 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted484 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - - let result486 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result486) - } - _ => panic() + Option::Some(lifted484) } + _ => panic() + } + + let lifted487 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result486 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(lifted487) + Option::Some(result486) + } + _ => panic() } - _ => panic() - } - array489.push(@types.NamedFieldType::{name : result475, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted477, aliases : array479, examples : array482, deprecated : lifted485, role : lifted488}}) + Option::Some(@types.NumericRestrictions::{min : lifted483, max : lifted485, unit : lifted487}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array489) + @types.SchemaTypeBody::S16Type(lifted488) } - 15 => { + 4 => { - let array506 : Array[@types.VariantCaseType] = []; - for index507 = 0; index507 < (mbt_ffi_load32((iter_base) + 12)); index507 = index507 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index507 * 72) + let lifted495 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result491 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted490 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted492 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted489 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted494 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result493 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result493) + Option::Some(lifted489) + } + _ => panic() } - _ => panic() - } - let array496 : Array[String] = []; - for index497 = 0; index497 < (mbt_ffi_load32((iter_base) + 32)); index497 = index497 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index497 * 8) + let lifted492 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result495 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted491 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - array496.push(result495) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let array499 : Array[String] = []; - for index500 = 0; index500 < (mbt_ffi_load32((iter_base) + 40)); index500 = index500 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index500 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result498 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array499.push(result498) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + Option::Some(lifted491) + } + _ => panic() + } - let lifted502 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + let lifted494 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result501 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result493 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result501) + Option::Some(result493) + } + _ => panic() } - _ => panic() + + Option::Some(@types.NumericRestrictions::{min : lifted490, max : lifted492, unit : lifted494}) } + _ => panic() + } - let lifted505 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::S32Type(lifted495) + } + 5 => { - let lifted504 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + let lifted502 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.Role::Multimodal - } - 1 => { + let lifted497 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredText - } - 2 => { + let lifted496 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.Role::UnstructuredBinary - } - 3 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result503 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::Other(result503) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() - } - Option::Some(lifted504) + Option::Some(lifted496) + } + _ => panic() } - _ => panic() - } - array506.push(@types.VariantCaseType::{name : result491, payload : lifted492, metadata : @types.MetadataEnvelope::{doc : lifted494, aliases : array496, examples : array499, deprecated : lifted502, role : lifted505}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted499 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::VariantType(array506) - } - 16 => { + let lifted498 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array509 : Array[String] = []; - for index510 = 0; index510 < (mbt_ffi_load32((iter_base) + 12)); index510 = index510 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index510 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result508 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - array509.push(result508) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::EnumType(array509) - } - 17 => { + Option::Some(lifted498) + } + _ => panic() + } - let array512 : Array[String] = []; - for index513 = 0; index513 < (mbt_ffi_load32((iter_base) + 12)); index513 = index513 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index513 * 8) + let lifted501 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result500 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result500) + } + _ => panic() + } - array512.push(result511) + Option::Some(@types.NumericRestrictions::{min : lifted497, max : lifted499, unit : lifted501}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array512) + @types.SchemaTypeBody::S64Type(lifted502) } - 18 => { + 6 => { - let array514 : Array[Int] = []; - for index515 = 0; index515 < (mbt_ffi_load32((iter_base) + 12)); index515 = index515 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index515 * 4) + let lifted509 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array514.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted504 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::TupleType(array514) - } - 19 => { + let lifted503 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) - } - 23 => { + Option::Some(lifted503) + } + _ => panic() + } - let lifted516 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted506 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let lifted505 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted517 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 20)) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted516, err : lifted517}) - } - 24 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted521 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + Option::Some(lifted505) + } + _ => panic() + } - let array519 : Array[String] = []; - for index520 = 0; index520 < (mbt_ffi_load32((iter_base) + 16)); index520 = index520 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index520 * 8) + let lifted508 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result507 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array519.push(result518) + Option::Some(result507) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array519) + Option::Some(@types.NumericRestrictions::{min : lifted504, max : lifted506, unit : lifted508}) } _ => panic() } - let lifted522 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + @types.SchemaTypeBody::U8Type(lifted509) + } + 7 => { + + let lifted516 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let lifted511 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted523 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let lifted510 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted525 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result524 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result524) - } - _ => panic() - } + Option::Some(lifted510) + } + _ => panic() + } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted521, min_length : lifted522, max_length : lifted523, regex : lifted525}) - } - 25 => { + let lifted513 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted529 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted512 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array527 : Array[String] = []; - for index528 = 0; index528 < (mbt_ffi_load32((iter_base) + 16)); index528 = index528 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index528 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result526 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - array527.push(result526) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(array527) - } - _ => panic() - } + Option::Some(lifted512) + } + _ => panic() + } - let lifted530 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let lifted515 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let result514 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted531 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + Option::Some(result514) + } + _ => panic() + } - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + Option::Some(@types.NumericRestrictions::{min : lifted511, max : lifted513, unit : lifted515}) } _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted529, min_bytes : lifted530, max_bytes : lifted531}) + @types.SchemaTypeBody::U16Type(lifted516) } - 26 => { + 8 => { - let lifted535 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted523 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array533 : Array[String] = []; - for index534 = 0; index534 < (mbt_ffi_load32((iter_base) + 20)); index534 = index534 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index534 * 8) + let lifted518 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result532 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted517 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array533.push(result532) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - Option::Some(array533) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted539 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let array537 : Array[String] = []; - for index538 = 0; index538 < (mbt_ffi_load32((iter_base) + 32)); index538 = index538 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index538 * 8) + Option::Some(lifted517) + } + _ => panic() + } - let result536 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted520 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - array537.push(result536) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let lifted519 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - Option::Some(array537) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted535, allowed_extensions : lifted539}) - } - 27 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted543 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let array541 : Array[String] = []; - for index542 = 0; index542 < (mbt_ffi_load32((iter_base) + 16)); index542 = index542 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index542 * 8) + Option::Some(lifted519) + } + _ => panic() + } + + let lifted522 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result540 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result521 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array541.push(result540) + Option::Some(result521) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array541) + Option::Some(@types.NumericRestrictions::{min : lifted518, max : lifted520, unit : lifted522}) } _ => panic() } - let lifted547 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + @types.SchemaTypeBody::U32Type(lifted523) + } + 9 => { + + let lifted530 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array545 : Array[String] = []; - for index546 = 0; index546 < (mbt_ffi_load32((iter_base) + 28)); index546 = index546 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index546 * 8) - - let result544 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted525 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - array545.push(result544) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted524 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(array545) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted543, allowed_hosts : lifted547}) - } - 28 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::DatetimeType - } - 29 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::DurationType - } - 30 => { + Option::Some(lifted524) + } + _ => panic() + } - let result548 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted527 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array550 : Array[String] = []; - for index551 = 0; index551 < (mbt_ffi_load32((iter_base) + 20)); index551 = index551 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index551 * 8) + let lifted526 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result549 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - array550.push(result549) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted553 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result552 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + Option::Some(lifted526) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result552}) - } - _ => panic() - } + let lifted529 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted555 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let result528 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result554 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + Option::Some(result528) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result554}) + Option::Some(@types.NumericRestrictions::{min : lifted525, max : lifted527, unit : lifted529}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result548, allowed_suffixes : array550, min : lifted553, max : lifted555}) + @types.SchemaTypeBody::U64Type(lifted530) } - 31 => { + 10 => { - let array579 : Array[@types.UnionBranch] = []; - for index580 = 0; index580 < (mbt_ffi_load32((iter_base) + 12)); index580 = index580 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index580 * 92) + let lifted537 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted532 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted565 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + let lifted531 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result557 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.DiscriminatorRule::Prefix(result557) - } - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result558 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.DiscriminatorRule::Suffix(result558) + Option::Some(lifted531) + } + _ => panic() } - 2 => { - let result559 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted534 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.DiscriminatorRule::Contains(result559) - } - 3 => { + let lifted533 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result560 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.DiscriminatorRule::Regex(result560) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted533) + } + _ => panic() } - 4 => { - let result561 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted536 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result535 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted563 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None + Option::Some(result535) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted532, max : lifted534, unit : lifted536}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted537) + } + 11 => { + + let lifted544 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted539 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted538 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted538) + } + _ => panic() + } + + let lifted541 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted540 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted540) + } + _ => panic() + } + + let lifted543 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result542 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result542) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted539, max : lifted541, unit : lifted543}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted544) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array559 : Array[@types.NamedFieldType] = []; + for index560 = 0; index560 < (mbt_ffi_load32((iter_base) + 12)); index560 = index560 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index560 * 68) + + let result545 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted547 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result546 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result546) + } + _ => panic() + } + + let array549 : Array[String] = []; + for index550 = 0; index550 < (mbt_ffi_load32((iter_base) + 28)); index550 = index550 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index550 * 8) + + let result548 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array549.push(result548) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array552 : Array[String] = []; + for index553 = 0; index553 < (mbt_ffi_load32((iter_base) + 36)); index553 = index553 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index553 * 8) + + let result551 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array552.push(result551) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted555 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result554 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result554) + } + _ => panic() + } + + let lifted558 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted557 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } 1 => { - let result562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - Option::Some(result562) + @types.Role::Other(result556) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result561, literal : lifted563}) + Option::Some(lifted557) } - 5 => { + _ => panic() + } + + array559.push(@types.NamedFieldType::{name : result545, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted547, aliases : array549, examples : array552, deprecated : lifted555, role : lifted558}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array559) + } + 15 => { + + let array576 : Array[@types.VariantCaseType] = []; + for index577 = 0; index577 < (mbt_ffi_load32((iter_base) + 12)); index577 = index577 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index577 * 72) - let result564 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result561 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted562 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.DiscriminatorRule::FieldAbsent(result564) + Option::Some(mbt_ffi_load32((iter_base) + 12)) } _ => panic() } - let lifted567 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted564 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result563 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result566) + Option::Some(result563) } _ => panic() } + let array566 : Array[String] = []; + for index567 = 0; index567 < (mbt_ffi_load32((iter_base) + 32)); index567 = index567 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index567 * 8) + + let result565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array566.push(result565) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let array569 : Array[String] = []; - for index570 = 0; index570 < (mbt_ffi_load32((iter_base) + 52)); index570 = index570 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index570 * 8) + for index570 = 0; index570 < (mbt_ffi_load32((iter_base) + 40)); index570 = index570 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index570 * 8) let result568 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) array569.push(result568) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + + let lifted572 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { + + let result571 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + + Option::Some(result571) + } + _ => panic() + } + + let lifted575 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let lifted574 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result573 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + + @types.Role::Other(result573) + } + _ => panic() + } + + Option::Some(lifted574) + } + _ => panic() + } + + array576.push(@types.VariantCaseType::{name : result561, payload : lifted562, metadata : @types.MetadataEnvelope::{doc : lifted564, aliases : array566, examples : array569, deprecated : lifted572, role : lifted575}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::VariantType(array576) + } + 16 => { + + let array579 : Array[String] = []; + for index580 = 0; index580 < (mbt_ffi_load32((iter_base) + 12)); index580 = index580 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index580 * 8) + + let result578 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array579.push(result578) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::EnumType(array579) + } + 17 => { + + let array582 : Array[String] = []; + for index583 = 0; index583 < (mbt_ffi_load32((iter_base) + 12)); index583 = index583 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index583 * 8) + + let result581 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array582.push(result581) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::FlagsType(array582) + } + 18 => { + + let array584 : Array[Int] = []; + for index585 = 0; index585 < (mbt_ffi_load32((iter_base) + 12)); index585 = index585 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index585 * 4) + + array584.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::TupleType(array584) + } + 19 => { + + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { + + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { + + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { + + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { + + let lifted586 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + let lifted587 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } + + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted586, err : lifted587}) + } + 24 => { + + let lifted591 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array589 : Array[String] = []; + for index590 = 0; index590 < (mbt_ffi_load32((iter_base) + 16)); index590 = index590 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index590 * 8) + + let result588 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array589.push(result588) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array589) + } + _ => panic() + } + + let lifted592 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted593 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted595 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result594 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result594) + } + _ => panic() + } + + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted591, min_length : lifted592, max_length : lifted593, regex : lifted595}) + } + 25 => { + + let lifted599 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array597 : Array[String] = []; + for index598 = 0; index598 < (mbt_ffi_load32((iter_base) + 16)); index598 = index598 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index598 * 8) + + let result596 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array597.push(result596) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array597) + } + _ => panic() + } + + let lifted600 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted601 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted599, min_bytes : lifted600, max_bytes : lifted601}) + } + 26 => { + + let lifted605 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let array603 : Array[String] = []; + for index604 = 0; index604 < (mbt_ffi_load32((iter_base) + 20)); index604 = index604 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index604 * 8) + + let result602 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array603.push(result602) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + Option::Some(array603) + } + _ => panic() + } + + let lifted609 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let array607 : Array[String] = []; + for index608 = 0; index608 < (mbt_ffi_load32((iter_base) + 32)); index608 = index608 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index608 * 8) + + let result606 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array607.push(result606) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + Option::Some(array607) + } + _ => panic() + } + + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted605, allowed_extensions : lifted609}) + } + 27 => { + + let lifted613 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array611 : Array[String] = []; + for index612 = 0; index612 < (mbt_ffi_load32((iter_base) + 16)); index612 = index612 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index612 * 8) + + let result610 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array611.push(result610) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array611) + } + _ => panic() + } + + let lifted617 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + let array615 : Array[String] = []; + for index616 = 0; index616 < (mbt_ffi_load32((iter_base) + 28)); index616 = index616 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index616 * 8) + + let result614 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array615.push(result614) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + Option::Some(array615) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted613, allowed_hosts : lifted617}) + } + 28 => { + + @types.SchemaTypeBody::DatetimeType + } + 29 => { + + @types.SchemaTypeBody::DurationType + } + 30 => { + + let result618 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let array620 : Array[String] = []; + for index621 = 0; index621 < (mbt_ffi_load32((iter_base) + 20)); index621 = index621 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index621 * 8) + + let result619 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array620.push(result619) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + let lifted623 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result622 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result622}) + } + _ => panic() + } + + let lifted625 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let result624 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result624}) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result618, allowed_suffixes : array620, min : lifted623, max : lifted625}) + } + 31 => { + + let array649 : Array[@types.UnionBranch] = []; + for index650 = 0; index650 < (mbt_ffi_load32((iter_base) + 12)); index650 = index650 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index650 * 92) + + let result626 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted635 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { + + let result627 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Prefix(result627) + } + 1 => { + + let result628 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Suffix(result628) + } + 2 => { + + let result629 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Contains(result629) + } + 3 => { + + let result630 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Regex(result630) + } + 4 => { + + let result631 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + let lifted633 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result632 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + + Option::Some(result632) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result631, literal : lifted633}) + } + 5 => { + + let result634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::FieldAbsent(result634) + } + _ => panic() + } + + let lifted637 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result636 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result636) + } + _ => panic() + } + + let array639 : Array[String] = []; + for index640 = 0; index640 < (mbt_ffi_load32((iter_base) + 52)); index640 = index640 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index640 * 8) + + let result638 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array639.push(result638) + } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array572 : Array[String] = []; - for index573 = 0; index573 < (mbt_ffi_load32((iter_base) + 60)); index573 = index573 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index573 * 8) + let array642 : Array[String] = []; + for index643 = 0; index643 < (mbt_ffi_load32((iter_base) + 60)); index643 = index643 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index643 * 8) - let result571 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result641 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array572.push(result571) + array642.push(result641) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted575 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted645 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result574 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result644 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result574) + Option::Some(result644) } _ => panic() } - let lifted578 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted648 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted577 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted647 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -4212,57 +4912,57 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result576 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result646 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result576) + @types.Role::Other(result646) } _ => panic() } - Option::Some(lifted577) + Option::Some(lifted647) } _ => panic() } - array579.push(@types.UnionBranch::{tag : result556, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted565, metadata : @types.MetadataEnvelope::{doc : lifted567, aliases : array569, examples : array572, deprecated : lifted575, role : lifted578}}) + array649.push(@types.UnionBranch::{tag : result626, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted635, metadata : @types.MetadataEnvelope::{doc : lifted637, aliases : array639, examples : array642, deprecated : lifted645, role : lifted648}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array579}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array649}) } 32 => { - let lifted582 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted652 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result581 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result651 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result581) + Option::Some(result651) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted582}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted652}) } 33 => { - let lifted584 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted654 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result653 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result583) + Option::Some(result653) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted584}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted654}) } 34 => { - let lifted585 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted655 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -4271,11 +4971,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::FutureType(lifted585) + @types.SchemaTypeBody::FutureType(lifted655) } 35 => { - let lifted586 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted656 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -4284,58 +4984,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::StreamType(lifted586) + @types.SchemaTypeBody::StreamType(lifted656) } _ => panic() } - let lifted589 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted659 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result588 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result658 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result588) + Option::Some(result658) } _ => panic() } - let array591 : Array[String] = []; - for index592 = 0; index592 < (mbt_ffi_load32((iter_base) + 104)); index592 = index592 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index592 * 8) + let array661 : Array[String] = []; + for index662 = 0; index662 < (mbt_ffi_load32((iter_base) + 104)); index662 = index662 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index662 * 8) - let result590 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result660 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array591.push(result590) + array661.push(result660) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array594 : Array[String] = []; - for index595 = 0; index595 < (mbt_ffi_load32((iter_base) + 112)); index595 = index595 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index595 * 8) + let array664 : Array[String] = []; + for index665 = 0; index665 < (mbt_ffi_load32((iter_base) + 112)); index665 = index665 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index665 * 8) - let result593 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result663 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array594.push(result593) + array664.push(result663) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted597 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted667 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result596 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result666 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result596) + Option::Some(result666) } _ => panic() } - let lifted600 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted670 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted599 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted669 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -4350,48 +5050,48 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result598 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result668 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result598) + @types.Role::Other(result668) } _ => panic() } - Option::Some(lifted599) + Option::Some(lifted669) } _ => panic() } - array601.push(@types.SchemaTypeNode::{body : lifted587, metadata : @types.MetadataEnvelope::{doc : lifted589, aliases : array591, examples : array594, deprecated : lifted597, role : lifted600}}) + array671.push(@types.SchemaTypeNode::{body : lifted657, metadata : @types.MetadataEnvelope::{doc : lifted659, aliases : array661, examples : array664, deprecated : lifted667, role : lifted670}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array606 : Array[@types.SchemaTypeDef] = []; - for index607 = 0; index607 < (mbt_ffi_load32((iter_base) + 20)); index607 = index607 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index607 * 24) + let array676 : Array[@types.SchemaTypeDef] = []; + for index677 = 0; index677 < (mbt_ffi_load32((iter_base) + 20)); index677 = index677 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index677 * 24) - let result603 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result673 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted605 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted675 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result604 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result674 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result604) + Option::Some(result674) } _ => panic() } - array606.push(@types.SchemaTypeDef::{id : result603, name : lifted605, body : mbt_ffi_load32((iter_base) + 20)}) + array676.push(@types.SchemaTypeDef::{id : result673, name : lifted675, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let array638 : Array[@types.SchemaValueNode] = []; - for index639 = 0; index639 < (mbt_ffi_load32((iter_base) + 32)); index639 = index639 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index639 * 32) + let array708 : Array[@types.SchemaValueNode] = []; + for index709 = 0; index709 < (mbt_ffi_load32((iter_base) + 32)); index709 = index709 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index709 * 32) - let lifted637 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted707 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -4442,25 +5142,25 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 12 => { - let result608 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result678 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result608) + @types.SchemaValueNode::StringValue(result678) } 13 => { - let array609 : Array[Int] = []; - for index610 = 0; index610 < (mbt_ffi_load32((iter_base) + 12)); index610 = index610 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index610 * 4) + let array679 : Array[Int] = []; + for index680 = 0; index680 < (mbt_ffi_load32((iter_base) + 12)); index680 = index680 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index680 * 4) - array609.push(mbt_ffi_load32((iter_base) + 0)) + array679.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array609) + @types.SchemaValueNode::RecordValue(array679) } 14 => { - let lifted611 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted681 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -4469,7 +5169,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted611}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted681}) } 15 => { @@ -4477,67 +5177,67 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 16 => { - let array612 : Array[Bool] = []; - for index613 = 0; index613 < (mbt_ffi_load32((iter_base) + 12)); index613 = index613 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index613 * 1) + let array682 : Array[Bool] = []; + for index683 = 0; index683 < (mbt_ffi_load32((iter_base) + 12)); index683 = index683 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index683 * 1) - array612.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array682.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array612) + @types.SchemaValueNode::FlagsValue(array682) } 17 => { - let array614 : Array[Int] = []; - for index615 = 0; index615 < (mbt_ffi_load32((iter_base) + 12)); index615 = index615 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index615 * 4) + let array684 : Array[Int] = []; + for index685 = 0; index685 < (mbt_ffi_load32((iter_base) + 12)); index685 = index685 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index685 * 4) - array614.push(mbt_ffi_load32((iter_base) + 0)) + array684.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array614) + @types.SchemaValueNode::TupleValue(array684) } 18 => { - let array616 : Array[Int] = []; - for index617 = 0; index617 < (mbt_ffi_load32((iter_base) + 12)); index617 = index617 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index617 * 4) + let array686 : Array[Int] = []; + for index687 = 0; index687 < (mbt_ffi_load32((iter_base) + 12)); index687 = index687 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index687 * 4) - array616.push(mbt_ffi_load32((iter_base) + 0)) + array686.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array616) + @types.SchemaValueNode::ListValue(array686) } 19 => { - let array618 : Array[Int] = []; - for index619 = 0; index619 < (mbt_ffi_load32((iter_base) + 12)); index619 = index619 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index619 * 4) + let array688 : Array[Int] = []; + for index689 = 0; index689 < (mbt_ffi_load32((iter_base) + 12)); index689 = index689 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index689 * 4) - array618.push(mbt_ffi_load32((iter_base) + 0)) + array688.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array618) + @types.SchemaValueNode::FixedListValue(array688) } 20 => { - let array620 : Array[@types.MapEntry] = []; - for index621 = 0; index621 < (mbt_ffi_load32((iter_base) + 12)); index621 = index621 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index621 * 8) + let array690 : Array[@types.MapEntry] = []; + for index691 = 0; index691 < (mbt_ffi_load32((iter_base) + 12)); index691 = index691 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index691 * 8) - array620.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array690.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array620) + @types.SchemaValueNode::MapValue(array690) } 21 => { - let lifted622 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted692 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -4546,14 +5246,14 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::OptionValue(lifted622) + @types.SchemaValueNode::OptionValue(lifted692) } 22 => { - let lifted625 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted695 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted623 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted693 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -4562,11 +5262,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::OkValue(lifted623) + @types.ResultValuePayload::OkValue(lifted693) } 1 => { - let lifted624 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted694 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -4575,58 +5275,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::ErrValue(lifted624) + @types.ResultValuePayload::ErrValue(lifted694) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted625) + @types.SchemaValueNode::ResultValue(lifted695) } 23 => { - let result626 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result696 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted628 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted698 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result627 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result697 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result627) + Option::Some(result697) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result626, language : lifted628}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result696, language : lifted698}) } 24 => { - let result629 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result699 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted631 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted701 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result630 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result700 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result630) + Option::Some(result700) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result629, mime_type : lifted631}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result699, mime_type : lifted701}) } 25 => { - let result632 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result702 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result632) + @types.SchemaValueNode::PathValue(result702) } 26 => { - let result633 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result703 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result633) + @types.SchemaValueNode::UrlValue(result703) } 27 => { @@ -4638,21 +5338,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 29 => { - let result634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result704 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result634}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result704}) } 30 => { - let result635 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result705 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result635, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result705, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result636 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result706 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result636}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result706}) } 32 => { @@ -4661,15 +5361,15 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array638.push(lifted637) + array708.push(lifted707) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - array640.push(LocalAgentConfigEntry::{path : array473, value : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array601, defs : array606, root : mbt_ffi_load32((iter_base) + 24)}, value : @types.SchemaValueTree::{value_nodes : array638, root : mbt_ffi_load32((iter_base) + 36)}}}) + array710.push(LocalAgentConfigEntry::{path : array473, value : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array671, defs : array676, root : mbt_ffi_load32((iter_base) + 24)}, value : @types.SchemaValueTree::{value_nodes : array708, root : mbt_ffi_load32((iter_base) + 36)}}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 160)) - let lifted642 : @types.Uuid? = match mbt_ffi_load8_u((iter_base) + 168) { + let lifted712 : @types.Uuid? = match mbt_ffi_load8_u((iter_base) + 168) { 0 => Option::None 1 => { @@ -4678,11 +5378,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - PublicOplogEntry::Create(CreateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, agent_id : result}, agent_mode : AgentMode::from(mbt_ffi_load8_u((iter_base) + 48)), component_revision : (mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64(), env : array, created_by : @types.AccountId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}}, environment_id : @host.EnvironmentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 88)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 96)).reinterpret_as_uint64()}}, parent : lifted, component_size : (mbt_ffi_load64((iter_base) + 136)).reinterpret_as_uint64(), initial_total_linear_memory_size : (mbt_ffi_load64((iter_base) + 144)).reinterpret_as_uint64(), initial_active_plugins : array470, local_agent_config : array640, original_phantom_id : lifted642, instance_id : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 192)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 200)).reinterpret_as_uint64()}}) + PublicOplogEntry::Create(CreateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, agent_id : result}, agent_mode : AgentMode::from(mbt_ffi_load8_u((iter_base) + 48)), component_revision : (mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64(), env : array, created_by : @types.AccountId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}}, environment_id : @host.EnvironmentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 88)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 96)).reinterpret_as_uint64()}}, parent : lifted, component_size : (mbt_ffi_load64((iter_base) + 136)).reinterpret_as_uint64(), initial_total_linear_memory_size : (mbt_ffi_load64((iter_base) + 144)).reinterpret_as_uint64(), initial_active_plugins : array470, local_agent_config : array710, original_phantom_id : lifted712, instance_id : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 192)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 200)).reinterpret_as_uint64()}}) } 1 => { - let lifted643 : UInt64? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted713 : UInt64? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { @@ -4691,17 +5391,17 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let result644 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let lifted810 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted950 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { - let array771 : Array[@types.SchemaTypeNode] = []; - for index772 = 0; index772 < (mbt_ffi_load32((iter_base) + 56)); index772 = index772 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index772 * 144) + let array911 : Array[@types.SchemaTypeNode] = []; + for index912 = 0; index912 < (mbt_ffi_load32((iter_base) + 56)); index912 = index912 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index912 * 144) - let lifted757 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted897 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -4712,107 +5412,807 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted721 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted716 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted715 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted715) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted718 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted717 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array659 : Array[@types.NamedFieldType] = []; - for index660 = 0; index660 < (mbt_ffi_load32((iter_base) + 12)); index660 = index660 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index660 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result645 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted717) + } + _ => panic() + } - let lifted647 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted720 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result646 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result719 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result646) + Option::Some(result719) + } + _ => panic() } - _ => panic() - } - - let array649 : Array[String] = []; - for index650 = 0; index650 < (mbt_ffi_load32((iter_base) + 28)); index650 = index650 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index650 * 8) - let result648 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array649.push(result648) + Option::Some(@types.NumericRestrictions::{min : lifted716, max : lifted718, unit : lifted720}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted721) + } + 3 => { + + let lifted728 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted723 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted722 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted722) + } + _ => panic() + } + + let lifted725 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted724 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted724) + } + _ => panic() + } + + let lifted727 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result726 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result726) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted723, max : lifted725, unit : lifted727}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted728) + } + 4 => { + + let lifted735 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted730 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted729 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted729) + } + _ => panic() + } + + let lifted732 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted731 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted731) + } + _ => panic() + } + + let lifted734 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result733 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result733) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted730, max : lifted732, unit : lifted734}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted735) + } + 5 => { + + let lifted742 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted737 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted736 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted736) + } + _ => panic() + } + + let lifted739 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted738 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted738) + } + _ => panic() + } + + let lifted741 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result740 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result740) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted737, max : lifted739, unit : lifted741}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted742) + } + 6 => { + + let lifted749 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted744 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted743 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted743) + } + _ => panic() + } + + let lifted746 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted745 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted745) + } + _ => panic() + } + + let lifted748 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result747 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result747) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted744, max : lifted746, unit : lifted748}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted749) + } + 7 => { + + let lifted756 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted751 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted750 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted750) + } + _ => panic() + } + + let lifted753 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted752 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted752) + } + _ => panic() + } + + let lifted755 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result754 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result754) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted751, max : lifted753, unit : lifted755}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted756) + } + 8 => { + + let lifted763 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted758 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted757 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted757) + } + _ => panic() + } + + let lifted760 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted759 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted759) + } + _ => panic() + } + + let lifted762 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result761 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result761) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted758, max : lifted760, unit : lifted762}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted763) + } + 9 => { + + let lifted770 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted765 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted764 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted764) + } + _ => panic() + } + + let lifted767 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted766 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted766) + } + _ => panic() + } + + let lifted769 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result768 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result768) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted765, max : lifted767, unit : lifted769}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted770) + } + 10 => { + + let lifted777 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted772 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted771 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted771) + } + _ => panic() + } + + let lifted774 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted773 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted773) + } + _ => panic() + } + + let lifted776 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result775 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result775) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted772, max : lifted774, unit : lifted776}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted777) + } + 11 => { + + let lifted784 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted779 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted778 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted778) + } + _ => panic() + } + + let lifted781 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted780 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted780) + } + _ => panic() + } + + let lifted783 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result782 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result782) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted779, max : lifted781, unit : lifted783}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted784) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array799 : Array[@types.NamedFieldType] = []; + for index800 = 0; index800 < (mbt_ffi_load32((iter_base) + 12)); index800 = index800 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index800 * 68) + + let result785 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted787 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result786 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result786) + } + _ => panic() + } + + let array789 : Array[String] = []; + for index790 = 0; index790 < (mbt_ffi_load32((iter_base) + 28)); index790 = index790 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index790 * 8) + + let result788 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array789.push(result788) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array652 : Array[String] = []; - for index653 = 0; index653 < (mbt_ffi_load32((iter_base) + 36)); index653 = index653 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index653 * 8) + let array792 : Array[String] = []; + for index793 = 0; index793 < (mbt_ffi_load32((iter_base) + 36)); index793 = index793 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index793 * 8) - let result651 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result791 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array652.push(result651) + array792.push(result791) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted655 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted795 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result654 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result794 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result654) + Option::Some(result794) } _ => panic() } - let lifted658 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted798 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted657 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted797 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -4827,33 +6227,33 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result656 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result796 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result656) + @types.Role::Other(result796) } _ => panic() } - Option::Some(lifted657) + Option::Some(lifted797) } _ => panic() } - array659.push(@types.NamedFieldType::{name : result645, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted647, aliases : array649, examples : array652, deprecated : lifted655, role : lifted658}}) + array799.push(@types.NamedFieldType::{name : result785, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted787, aliases : array789, examples : array792, deprecated : lifted795, role : lifted798}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array659) + @types.SchemaTypeBody::RecordType(array799) } 15 => { - let array676 : Array[@types.VariantCaseType] = []; - for index677 = 0; index677 < (mbt_ffi_load32((iter_base) + 12)); index677 = index677 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index677 * 72) + let array816 : Array[@types.VariantCaseType] = []; + for index817 = 0; index817 < (mbt_ffi_load32((iter_base) + 12)); index817 = index817 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index817 * 72) - let result661 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result801 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted662 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted802 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -4862,53 +6262,53 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted664 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted804 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result663 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result803 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result663) + Option::Some(result803) } _ => panic() } - let array666 : Array[String] = []; - for index667 = 0; index667 < (mbt_ffi_load32((iter_base) + 32)); index667 = index667 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index667 * 8) + let array806 : Array[String] = []; + for index807 = 0; index807 < (mbt_ffi_load32((iter_base) + 32)); index807 = index807 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index807 * 8) - let result665 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result805 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array666.push(result665) + array806.push(result805) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array669 : Array[String] = []; - for index670 = 0; index670 < (mbt_ffi_load32((iter_base) + 40)); index670 = index670 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index670 * 8) + let array809 : Array[String] = []; + for index810 = 0; index810 < (mbt_ffi_load32((iter_base) + 40)); index810 = index810 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index810 * 8) - let result668 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result808 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array669.push(result668) + array809.push(result808) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted672 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted812 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result811 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result671) + Option::Some(result811) } _ => panic() } - let lifted675 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted815 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted674 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted814 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -4923,63 +6323,63 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result673 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result813 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result673) + @types.Role::Other(result813) } _ => panic() } - Option::Some(lifted674) + Option::Some(lifted814) } _ => panic() } - array676.push(@types.VariantCaseType::{name : result661, payload : lifted662, metadata : @types.MetadataEnvelope::{doc : lifted664, aliases : array666, examples : array669, deprecated : lifted672, role : lifted675}}) + array816.push(@types.VariantCaseType::{name : result801, payload : lifted802, metadata : @types.MetadataEnvelope::{doc : lifted804, aliases : array806, examples : array809, deprecated : lifted812, role : lifted815}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array676) + @types.SchemaTypeBody::VariantType(array816) } 16 => { - let array679 : Array[String] = []; - for index680 = 0; index680 < (mbt_ffi_load32((iter_base) + 12)); index680 = index680 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index680 * 8) + let array819 : Array[String] = []; + for index820 = 0; index820 < (mbt_ffi_load32((iter_base) + 12)); index820 = index820 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index820 * 8) - let result678 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result818 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array679.push(result678) + array819.push(result818) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array679) + @types.SchemaTypeBody::EnumType(array819) } 17 => { - let array682 : Array[String] = []; - for index683 = 0; index683 < (mbt_ffi_load32((iter_base) + 12)); index683 = index683 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index683 * 8) + let array822 : Array[String] = []; + for index823 = 0; index823 < (mbt_ffi_load32((iter_base) + 12)); index823 = index823 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index823 * 8) - let result681 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result821 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array682.push(result681) + array822.push(result821) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array682) + @types.SchemaTypeBody::FlagsType(array822) } 18 => { - let array684 : Array[Int] = []; - for index685 = 0; index685 < (mbt_ffi_load32((iter_base) + 12)); index685 = index685 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index685 * 4) + let array824 : Array[Int] = []; + for index825 = 0; index825 < (mbt_ffi_load32((iter_base) + 12)); index825 = index825 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index825 * 4) - array684.push(mbt_ffi_load32((iter_base) + 0)) + array824.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array684) + @types.SchemaTypeBody::TupleType(array824) } 19 => { @@ -4999,7 +6399,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 23 => { - let lifted686 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted826 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -5008,7 +6408,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted687 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted827 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -5017,30 +6417,30 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted686, err : lifted687}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted826, err : lifted827}) } 24 => { - let lifted691 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted831 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array689 : Array[String] = []; - for index690 = 0; index690 < (mbt_ffi_load32((iter_base) + 16)); index690 = index690 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index690 * 8) + let array829 : Array[String] = []; + for index830 = 0; index830 < (mbt_ffi_load32((iter_base) + 16)); index830 = index830 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index830 * 8) - let result688 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result828 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array689.push(result688) + array829.push(result828) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array689) + Option::Some(array829) } _ => panic() } - let lifted692 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted832 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -5049,7 +6449,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted693 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted833 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -5058,41 +6458,41 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted695 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted835 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result694 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result834 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result694) + Option::Some(result834) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted691, min_length : lifted692, max_length : lifted693, regex : lifted695}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted831, min_length : lifted832, max_length : lifted833, regex : lifted835}) } 25 => { - let lifted699 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted839 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array697 : Array[String] = []; - for index698 = 0; index698 < (mbt_ffi_load32((iter_base) + 16)); index698 = index698 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index698 * 8) + let array837 : Array[String] = []; + for index838 = 0; index838 < (mbt_ffi_load32((iter_base) + 16)); index838 = index838 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index838 * 8) - let result696 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result836 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array697.push(result696) + array837.push(result836) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array697) + Option::Some(array837) } _ => panic() } - let lifted700 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted840 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -5101,7 +6501,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted701 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted841 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -5110,91 +6510,91 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted699, min_bytes : lifted700, max_bytes : lifted701}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted839, min_bytes : lifted840, max_bytes : lifted841}) } 26 => { - let lifted705 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted845 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array703 : Array[String] = []; - for index704 = 0; index704 < (mbt_ffi_load32((iter_base) + 20)); index704 = index704 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index704 * 8) + let array843 : Array[String] = []; + for index844 = 0; index844 < (mbt_ffi_load32((iter_base) + 20)); index844 = index844 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index844 * 8) - let result702 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result842 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array703.push(result702) + array843.push(result842) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array703) + Option::Some(array843) } _ => panic() } - let lifted709 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted849 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array707 : Array[String] = []; - for index708 = 0; index708 < (mbt_ffi_load32((iter_base) + 32)); index708 = index708 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index708 * 8) + let array847 : Array[String] = []; + for index848 = 0; index848 < (mbt_ffi_load32((iter_base) + 32)); index848 = index848 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index848 * 8) - let result706 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result846 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array707.push(result706) + array847.push(result846) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array707) + Option::Some(array847) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted705, allowed_extensions : lifted709}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted845, allowed_extensions : lifted849}) } 27 => { - let lifted713 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted853 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array711 : Array[String] = []; - for index712 = 0; index712 < (mbt_ffi_load32((iter_base) + 16)); index712 = index712 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index712 * 8) + let array851 : Array[String] = []; + for index852 = 0; index852 < (mbt_ffi_load32((iter_base) + 16)); index852 = index852 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index852 * 8) - let result710 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result850 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array711.push(result710) + array851.push(result850) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array711) + Option::Some(array851) } _ => panic() } - let lifted717 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted857 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array715 : Array[String] = []; - for index716 = 0; index716 < (mbt_ffi_load32((iter_base) + 28)); index716 = index716 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index716 * 8) + let array855 : Array[String] = []; + for index856 = 0; index856 < (mbt_ffi_load32((iter_base) + 28)); index856 = index856 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index856 * 8) - let result714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result854 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array715.push(result714) + array855.push(result854) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array715) + Option::Some(array855) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted713, allowed_hosts : lifted717}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted853, allowed_hosts : lifted857}) } 28 => { @@ -5206,148 +6606,148 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 30 => { - let result718 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result858 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array720 : Array[String] = []; - for index721 = 0; index721 < (mbt_ffi_load32((iter_base) + 20)); index721 = index721 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index721 * 8) + let array860 : Array[String] = []; + for index861 = 0; index861 < (mbt_ffi_load32((iter_base) + 20)); index861 = index861 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index861 * 8) - let result719 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result859 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array720.push(result719) + array860.push(result859) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted723 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted863 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result722 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result862 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result722}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result862}) } _ => panic() } - let lifted725 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted865 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result724 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result864 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result724}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result864}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result718, allowed_suffixes : array720, min : lifted723, max : lifted725}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result858, allowed_suffixes : array860, min : lifted863, max : lifted865}) } 31 => { - let array749 : Array[@types.UnionBranch] = []; - for index750 = 0; index750 < (mbt_ffi_load32((iter_base) + 12)); index750 = index750 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index750 * 92) + let array889 : Array[@types.UnionBranch] = []; + for index890 = 0; index890 < (mbt_ffi_load32((iter_base) + 12)); index890 = index890 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index890 * 92) - let result726 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result866 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted735 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted875 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result727 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result867 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result727) + @types.DiscriminatorRule::Prefix(result867) } 1 => { - let result728 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result868 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result728) + @types.DiscriminatorRule::Suffix(result868) } 2 => { - let result729 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result869 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result729) + @types.DiscriminatorRule::Contains(result869) } 3 => { - let result730 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result870 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result730) + @types.DiscriminatorRule::Regex(result870) } 4 => { - let result731 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result871 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted733 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted873 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result732 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result872 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result732) + Option::Some(result872) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result731, literal : lifted733}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result871, literal : lifted873}) } 5 => { - let result734 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result874 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result734) + @types.DiscriminatorRule::FieldAbsent(result874) } _ => panic() } - let lifted737 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted877 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result736 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result876 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result736) + Option::Some(result876) } _ => panic() } - let array739 : Array[String] = []; - for index740 = 0; index740 < (mbt_ffi_load32((iter_base) + 52)); index740 = index740 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index740 * 8) + let array879 : Array[String] = []; + for index880 = 0; index880 < (mbt_ffi_load32((iter_base) + 52)); index880 = index880 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index880 * 8) - let result738 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result878 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array739.push(result738) + array879.push(result878) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array742 : Array[String] = []; - for index743 = 0; index743 < (mbt_ffi_load32((iter_base) + 60)); index743 = index743 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index743 * 8) + let array882 : Array[String] = []; + for index883 = 0; index883 < (mbt_ffi_load32((iter_base) + 60)); index883 = index883 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index883 * 8) - let result741 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result881 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array742.push(result741) + array882.push(result881) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted745 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted885 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result744 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result884 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result744) + Option::Some(result884) } _ => panic() } - let lifted748 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted888 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted747 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted887 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -5362,57 +6762,57 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result746 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result886 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result746) + @types.Role::Other(result886) } _ => panic() } - Option::Some(lifted747) + Option::Some(lifted887) } _ => panic() } - array749.push(@types.UnionBranch::{tag : result726, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted735, metadata : @types.MetadataEnvelope::{doc : lifted737, aliases : array739, examples : array742, deprecated : lifted745, role : lifted748}}) + array889.push(@types.UnionBranch::{tag : result866, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted875, metadata : @types.MetadataEnvelope::{doc : lifted877, aliases : array879, examples : array882, deprecated : lifted885, role : lifted888}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array749}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array889}) } 32 => { - let lifted752 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted892 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result751 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result891 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result751) + Option::Some(result891) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted752}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted892}) } 33 => { - let lifted754 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted894 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result753 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result893 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result753) + Option::Some(result893) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted754}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted894}) } 34 => { - let lifted755 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted895 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -5421,11 +6821,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::FutureType(lifted755) + @types.SchemaTypeBody::FutureType(lifted895) } 35 => { - let lifted756 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted896 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -5434,58 +6834,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::StreamType(lifted756) + @types.SchemaTypeBody::StreamType(lifted896) } _ => panic() } - let lifted759 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted899 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result758 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result898 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result758) + Option::Some(result898) } _ => panic() } - let array761 : Array[String] = []; - for index762 = 0; index762 < (mbt_ffi_load32((iter_base) + 104)); index762 = index762 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index762 * 8) + let array901 : Array[String] = []; + for index902 = 0; index902 < (mbt_ffi_load32((iter_base) + 104)); index902 = index902 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index902 * 8) - let result760 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result900 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array761.push(result760) + array901.push(result900) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array764 : Array[String] = []; - for index765 = 0; index765 < (mbt_ffi_load32((iter_base) + 112)); index765 = index765 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index765 * 8) + let array904 : Array[String] = []; + for index905 = 0; index905 < (mbt_ffi_load32((iter_base) + 112)); index905 = index905 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index905 * 8) - let result763 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result903 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array764.push(result763) + array904.push(result903) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted767 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted907 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result766 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result906 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result766) + Option::Some(result906) } _ => panic() } - let lifted770 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted910 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted769 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted909 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -5500,48 +6900,48 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result768 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result908 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result768) + @types.Role::Other(result908) } _ => panic() } - Option::Some(lifted769) + Option::Some(lifted909) } _ => panic() } - array771.push(@types.SchemaTypeNode::{body : lifted757, metadata : @types.MetadataEnvelope::{doc : lifted759, aliases : array761, examples : array764, deprecated : lifted767, role : lifted770}}) + array911.push(@types.SchemaTypeNode::{body : lifted897, metadata : @types.MetadataEnvelope::{doc : lifted899, aliases : array901, examples : array904, deprecated : lifted907, role : lifted910}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 52)) - let array776 : Array[@types.SchemaTypeDef] = []; - for index777 = 0; index777 < (mbt_ffi_load32((iter_base) + 64)); index777 = index777 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index777 * 24) + let array916 : Array[@types.SchemaTypeDef] = []; + for index917 = 0; index917 < (mbt_ffi_load32((iter_base) + 64)); index917 = index917 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index917 * 24) - let result773 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result913 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted775 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted915 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result774 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result914 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result774) + Option::Some(result914) } _ => panic() } - array776.push(@types.SchemaTypeDef::{id : result773, name : lifted775, body : mbt_ffi_load32((iter_base) + 20)}) + array916.push(@types.SchemaTypeDef::{id : result913, name : lifted915, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - let array808 : Array[@types.SchemaValueNode] = []; - for index809 = 0; index809 < (mbt_ffi_load32((iter_base) + 76)); index809 = index809 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 72)) + (index809 * 32) + let array948 : Array[@types.SchemaValueNode] = []; + for index949 = 0; index949 < (mbt_ffi_load32((iter_base) + 76)); index949 = index949 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 72)) + (index949 * 32) - let lifted807 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted947 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -5592,25 +6992,25 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 12 => { - let result778 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result918 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result778) + @types.SchemaValueNode::StringValue(result918) } 13 => { - let array779 : Array[Int] = []; - for index780 = 0; index780 < (mbt_ffi_load32((iter_base) + 12)); index780 = index780 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index780 * 4) + let array919 : Array[Int] = []; + for index920 = 0; index920 < (mbt_ffi_load32((iter_base) + 12)); index920 = index920 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index920 * 4) - array779.push(mbt_ffi_load32((iter_base) + 0)) + array919.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array779) + @types.SchemaValueNode::RecordValue(array919) } 14 => { - let lifted781 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted921 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -5619,7 +7019,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted781}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted921}) } 15 => { @@ -5627,67 +7027,67 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 16 => { - let array782 : Array[Bool] = []; - for index783 = 0; index783 < (mbt_ffi_load32((iter_base) + 12)); index783 = index783 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index783 * 1) + let array922 : Array[Bool] = []; + for index923 = 0; index923 < (mbt_ffi_load32((iter_base) + 12)); index923 = index923 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index923 * 1) - array782.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array922.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array782) + @types.SchemaValueNode::FlagsValue(array922) } 17 => { - let array784 : Array[Int] = []; - for index785 = 0; index785 < (mbt_ffi_load32((iter_base) + 12)); index785 = index785 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index785 * 4) + let array924 : Array[Int] = []; + for index925 = 0; index925 < (mbt_ffi_load32((iter_base) + 12)); index925 = index925 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index925 * 4) - array784.push(mbt_ffi_load32((iter_base) + 0)) + array924.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array784) + @types.SchemaValueNode::TupleValue(array924) } 18 => { - let array786 : Array[Int] = []; - for index787 = 0; index787 < (mbt_ffi_load32((iter_base) + 12)); index787 = index787 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index787 * 4) + let array926 : Array[Int] = []; + for index927 = 0; index927 < (mbt_ffi_load32((iter_base) + 12)); index927 = index927 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index927 * 4) - array786.push(mbt_ffi_load32((iter_base) + 0)) + array926.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array786) + @types.SchemaValueNode::ListValue(array926) } 19 => { - let array788 : Array[Int] = []; - for index789 = 0; index789 < (mbt_ffi_load32((iter_base) + 12)); index789 = index789 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index789 * 4) + let array928 : Array[Int] = []; + for index929 = 0; index929 < (mbt_ffi_load32((iter_base) + 12)); index929 = index929 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index929 * 4) - array788.push(mbt_ffi_load32((iter_base) + 0)) + array928.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array788) + @types.SchemaValueNode::FixedListValue(array928) } 20 => { - let array790 : Array[@types.MapEntry] = []; - for index791 = 0; index791 < (mbt_ffi_load32((iter_base) + 12)); index791 = index791 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index791 * 8) + let array930 : Array[@types.MapEntry] = []; + for index931 = 0; index931 < (mbt_ffi_load32((iter_base) + 12)); index931 = index931 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index931 * 8) - array790.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array930.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array790) + @types.SchemaValueNode::MapValue(array930) } 21 => { - let lifted792 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted932 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -5696,14 +7096,14 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::OptionValue(lifted792) + @types.SchemaValueNode::OptionValue(lifted932) } 22 => { - let lifted795 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted935 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted793 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted933 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -5712,11 +7112,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::OkValue(lifted793) + @types.ResultValuePayload::OkValue(lifted933) } 1 => { - let lifted794 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted934 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -5725,58 +7125,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::ErrValue(lifted794) + @types.ResultValuePayload::ErrValue(lifted934) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted795) + @types.SchemaValueNode::ResultValue(lifted935) } 23 => { - let result796 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result936 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted798 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted938 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result797 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result937 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result797) + Option::Some(result937) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result796, language : lifted798}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result936, language : lifted938}) } 24 => { - let result799 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result939 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted801 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted941 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result800 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result940 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result800) + Option::Some(result940) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result799, mime_type : lifted801}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result939, mime_type : lifted941}) } 25 => { - let result802 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result942 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result802) + @types.SchemaValueNode::PathValue(result942) } 26 => { - let result803 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result943 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result803) + @types.SchemaValueNode::UrlValue(result943) } 27 => { @@ -5788,21 +7188,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 29 => { - let result804 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result944 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result804}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result944}) } 30 => { - let result805 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result945 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result805, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result945, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result806 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result946 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result806}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result946}) } 32 => { @@ -5811,16 +7211,16 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array808.push(lifted807) + array948.push(lifted947) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 72)) - Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array771, defs : array776, root : mbt_ffi_load32((iter_base) + 68)}, value : @types.SchemaValueTree::{value_nodes : array808, root : mbt_ffi_load32((iter_base) + 80)}}) + Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array911, defs : array916, root : mbt_ffi_load32((iter_base) + 68)}, value : @types.SchemaValueTree::{value_nodes : array948, root : mbt_ffi_load32((iter_base) + 80)}}) } _ => panic() } - let lifted813 = match (mbt_ffi_load8_u((iter_base) + 88)) { + let lifted953 = match (mbt_ffi_load8_u((iter_base) + 88)) { 0 => { WrappedFunctionType::ReadLocal @@ -5839,7 +7239,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 4 => { - let lifted811 : UInt64? = match mbt_ffi_load8_u((iter_base) + 96) { + let lifted951 : UInt64? = match mbt_ffi_load8_u((iter_base) + 96) { 0 => Option::None 1 => { @@ -5848,11 +7248,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - WrappedFunctionType::WriteRemoteBatched(lifted811) + WrappedFunctionType::WriteRemoteBatched(lifted951) } 5 => { - let lifted812 : UInt64? = match mbt_ffi_load8_u((iter_base) + 96) { + let lifted952 : UInt64? = match mbt_ffi_load8_u((iter_base) + 96) { 0 => Option::None 1 => { @@ -5861,24 +7261,24 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - WrappedFunctionType::WriteRemoteTransaction(lifted812) + WrappedFunctionType::WriteRemoteTransaction(lifted952) } _ => panic() } - PublicOplogEntry::Start(StartParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, parent_start_index : lifted643, function_name : result644, request : lifted810, durable_function_type : lifted813}) + PublicOplogEntry::Start(StartParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, parent_start_index : lifted713, function_name : result714, request : lifted950, durable_function_type : lifted953}) } 2 => { - let lifted979 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted1189 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let array940 : Array[@types.SchemaTypeNode] = []; - for index941 = 0; index941 < (mbt_ffi_load32((iter_base) + 40)); index941 = index941 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index941 * 144) + let array1150 : Array[@types.SchemaTypeNode] = []; + for index1151 = 0; index1151 < (mbt_ffi_load32((iter_base) + 40)); index1151 = index1151 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1151 * 144) - let lifted926 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1136 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -5889,148 +7289,848 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted960 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted955 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted954 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted954) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted957 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted956 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array828 : Array[@types.NamedFieldType] = []; - for index829 = 0; index829 < (mbt_ffi_load32((iter_base) + 12)); index829 = index829 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index829 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result814 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted956) + } + _ => panic() + } - let lifted816 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted959 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result815 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result958 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result815) + Option::Some(result958) + } + _ => panic() } - _ => panic() - } - let array818 : Array[String] = []; - for index819 = 0; index819 < (mbt_ffi_load32((iter_base) + 28)); index819 = index819 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index819 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted955, max : lifted957, unit : lifted959}) + } + _ => panic() + } - let result817 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted960) + } + 3 => { - array818.push(result817) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted967 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array821 : Array[String] = []; - for index822 = 0; index822 < (mbt_ffi_load32((iter_base) + 36)); index822 = index822 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index822 * 8) + let lifted962 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result820 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted961 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array821.push(result820) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted824 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result823 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result823) + Option::Some(lifted961) + } + _ => panic() } - _ => panic() - } - let lifted827 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted964 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted826 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted963 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - - let result825 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result825) - } - _ => panic() + Option::Some(lifted963) } + _ => panic() + } + + let lifted966 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result965 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(lifted826) + Option::Some(result965) + } + _ => panic() } - _ => panic() - } - array828.push(@types.NamedFieldType::{name : result814, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted816, aliases : array818, examples : array821, deprecated : lifted824, role : lifted827}}) + Option::Some(@types.NumericRestrictions::{min : lifted962, max : lifted964, unit : lifted966}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array828) + @types.SchemaTypeBody::S16Type(lifted967) } - 15 => { - - let array845 : Array[@types.VariantCaseType] = []; - for index846 = 0; index846 < (mbt_ffi_load32((iter_base) + 12)); index846 = index846 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index846 * 72) + 4 => { - let result830 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted974 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted969 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted968 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted968) + } + _ => panic() + } + + let lifted971 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted970 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted970) + } + _ => panic() + } + + let lifted973 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result972 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result972) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted969, max : lifted971, unit : lifted973}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted974) + } + 5 => { + + let lifted981 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted976 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted975 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted975) + } + _ => panic() + } + + let lifted978 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted977 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted977) + } + _ => panic() + } + + let lifted980 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result979 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result979) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted976, max : lifted978, unit : lifted980}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted981) + } + 6 => { + + let lifted988 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted983 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted982 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted982) + } + _ => panic() + } + + let lifted985 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted984 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted984) + } + _ => panic() + } + + let lifted987 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result986 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result986) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted983, max : lifted985, unit : lifted987}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted988) + } + 7 => { + + let lifted995 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted990 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted989 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted989) + } + _ => panic() + } + + let lifted992 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted991 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted991) + } + _ => panic() + } + + let lifted994 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result993 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result993) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted990, max : lifted992, unit : lifted994}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted995) + } + 8 => { + + let lifted1002 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted997 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted996 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted996) + } + _ => panic() + } + + let lifted999 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted998 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted998) + } + _ => panic() + } + + let lifted1001 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1000 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1000) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted997, max : lifted999, unit : lifted1001}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1002) + } + 9 => { + + let lifted1009 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1004 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1003 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1003) + } + _ => panic() + } + + let lifted1006 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1005 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1005) + } + _ => panic() + } + + let lifted1008 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1007 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1007) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1004, max : lifted1006, unit : lifted1008}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1009) + } + 10 => { + + let lifted1016 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1011 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1010 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1010) + } + _ => panic() + } + + let lifted1013 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1012 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1012) + } + _ => panic() + } + + let lifted1015 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1014 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1014) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1011, max : lifted1013, unit : lifted1015}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1016) + } + 11 => { + + let lifted1023 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1018 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1017 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1017) + } + _ => panic() + } + + let lifted1020 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1019 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1019) + } + _ => panic() + } + + let lifted1022 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1021 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1021) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1018, max : lifted1020, unit : lifted1022}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1023) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array1038 : Array[@types.NamedFieldType] = []; + for index1039 = 0; index1039 < (mbt_ffi_load32((iter_base) + 12)); index1039 = index1039 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1039 * 68) + + let result1024 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1026 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result1025 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result1025) + } + _ => panic() + } + + let array1028 : Array[String] = []; + for index1029 = 0; index1029 < (mbt_ffi_load32((iter_base) + 28)); index1029 = index1029 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1029 * 8) + + let result1027 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1028.push(result1027) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array1031 : Array[String] = []; + for index1032 = 0; index1032 < (mbt_ffi_load32((iter_base) + 36)); index1032 = index1032 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1032 * 8) + + let result1030 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1031.push(result1030) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted1034 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result1033 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result1033) + } + _ => panic() + } + + let lifted1037 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted1036 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { - let lifted831 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + @types.Role::UnstructuredBinary + } + 3 => { + + let result1035 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result1035) + } + _ => panic() + } + + Option::Some(lifted1036) + } + _ => panic() + } + + array1038.push(@types.NamedFieldType::{name : result1024, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1026, aliases : array1028, examples : array1031, deprecated : lifted1034, role : lifted1037}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array1038) + } + 15 => { + + let array1055 : Array[@types.VariantCaseType] = []; + for index1056 = 0; index1056 < (mbt_ffi_load32((iter_base) + 12)); index1056 = index1056 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1056 * 72) + + let result1040 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1041 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6039,53 +8139,53 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted833 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1043 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result832 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1042 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result832) + Option::Some(result1042) } _ => panic() } - let array835 : Array[String] = []; - for index836 = 0; index836 < (mbt_ffi_load32((iter_base) + 32)); index836 = index836 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index836 * 8) + let array1045 : Array[String] = []; + for index1046 = 0; index1046 < (mbt_ffi_load32((iter_base) + 32)); index1046 = index1046 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1046 * 8) - let result834 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1044 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array835.push(result834) + array1045.push(result1044) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array838 : Array[String] = []; - for index839 = 0; index839 < (mbt_ffi_load32((iter_base) + 40)); index839 = index839 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index839 * 8) + let array1048 : Array[String] = []; + for index1049 = 0; index1049 < (mbt_ffi_load32((iter_base) + 40)); index1049 = index1049 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1049 * 8) - let result837 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1047 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array838.push(result837) + array1048.push(result1047) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted841 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1051 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result840 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1050 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result840) + Option::Some(result1050) } _ => panic() } - let lifted844 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1054 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted843 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1053 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -6100,63 +8200,63 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result842 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1052 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result842) + @types.Role::Other(result1052) } _ => panic() } - Option::Some(lifted843) + Option::Some(lifted1053) } _ => panic() } - array845.push(@types.VariantCaseType::{name : result830, payload : lifted831, metadata : @types.MetadataEnvelope::{doc : lifted833, aliases : array835, examples : array838, deprecated : lifted841, role : lifted844}}) + array1055.push(@types.VariantCaseType::{name : result1040, payload : lifted1041, metadata : @types.MetadataEnvelope::{doc : lifted1043, aliases : array1045, examples : array1048, deprecated : lifted1051, role : lifted1054}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array845) + @types.SchemaTypeBody::VariantType(array1055) } 16 => { - let array848 : Array[String] = []; - for index849 = 0; index849 < (mbt_ffi_load32((iter_base) + 12)); index849 = index849 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index849 * 8) + let array1058 : Array[String] = []; + for index1059 = 0; index1059 < (mbt_ffi_load32((iter_base) + 12)); index1059 = index1059 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1059 * 8) - let result847 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1057 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array848.push(result847) + array1058.push(result1057) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array848) + @types.SchemaTypeBody::EnumType(array1058) } 17 => { - let array851 : Array[String] = []; - for index852 = 0; index852 < (mbt_ffi_load32((iter_base) + 12)); index852 = index852 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index852 * 8) + let array1061 : Array[String] = []; + for index1062 = 0; index1062 < (mbt_ffi_load32((iter_base) + 12)); index1062 = index1062 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1062 * 8) - let result850 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1060 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array851.push(result850) + array1061.push(result1060) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array851) + @types.SchemaTypeBody::FlagsType(array1061) } 18 => { - let array853 : Array[Int] = []; - for index854 = 0; index854 < (mbt_ffi_load32((iter_base) + 12)); index854 = index854 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index854 * 4) + let array1063 : Array[Int] = []; + for index1064 = 0; index1064 < (mbt_ffi_load32((iter_base) + 12)); index1064 = index1064 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1064 * 4) - array853.push(mbt_ffi_load32((iter_base) + 0)) + array1063.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array853) + @types.SchemaTypeBody::TupleType(array1063) } 19 => { @@ -6176,7 +8276,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 23 => { - let lifted855 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1065 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6185,7 +8285,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted856 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1066 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -6194,30 +8294,30 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted855, err : lifted856}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1065, err : lifted1066}) } 24 => { - let lifted860 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1070 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array858 : Array[String] = []; - for index859 = 0; index859 < (mbt_ffi_load32((iter_base) + 16)); index859 = index859 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index859 * 8) + let array1068 : Array[String] = []; + for index1069 = 0; index1069 < (mbt_ffi_load32((iter_base) + 16)); index1069 = index1069 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1069 * 8) - let result857 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1067 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array858.push(result857) + array1068.push(result1067) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array858) + Option::Some(array1068) } _ => panic() } - let lifted861 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1071 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -6226,7 +8326,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted862 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1072 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -6235,41 +8335,41 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted864 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1074 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result863 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1073 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result863) + Option::Some(result1073) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted860, min_length : lifted861, max_length : lifted862, regex : lifted864}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1070, min_length : lifted1071, max_length : lifted1072, regex : lifted1074}) } 25 => { - let lifted868 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1078 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array866 : Array[String] = []; - for index867 = 0; index867 < (mbt_ffi_load32((iter_base) + 16)); index867 = index867 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index867 * 8) + let array1076 : Array[String] = []; + for index1077 = 0; index1077 < (mbt_ffi_load32((iter_base) + 16)); index1077 = index1077 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1077 * 8) - let result865 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1075 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array866.push(result865) + array1076.push(result1075) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array866) + Option::Some(array1076) } _ => panic() } - let lifted869 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1079 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -6278,7 +8378,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted870 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1080 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -6287,91 +8387,91 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted868, min_bytes : lifted869, max_bytes : lifted870}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1078, min_bytes : lifted1079, max_bytes : lifted1080}) } 26 => { - let lifted874 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1084 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array872 : Array[String] = []; - for index873 = 0; index873 < (mbt_ffi_load32((iter_base) + 20)); index873 = index873 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index873 * 8) + let array1082 : Array[String] = []; + for index1083 = 0; index1083 < (mbt_ffi_load32((iter_base) + 20)); index1083 = index1083 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1083 * 8) - let result871 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1081 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array872.push(result871) + array1082.push(result1081) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array872) + Option::Some(array1082) } _ => panic() } - let lifted878 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1088 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array876 : Array[String] = []; - for index877 = 0; index877 < (mbt_ffi_load32((iter_base) + 32)); index877 = index877 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index877 * 8) + let array1086 : Array[String] = []; + for index1087 = 0; index1087 < (mbt_ffi_load32((iter_base) + 32)); index1087 = index1087 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1087 * 8) - let result875 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1085 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array876.push(result875) + array1086.push(result1085) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array876) + Option::Some(array1086) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted874, allowed_extensions : lifted878}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1084, allowed_extensions : lifted1088}) } 27 => { - let lifted882 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1092 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array880 : Array[String] = []; - for index881 = 0; index881 < (mbt_ffi_load32((iter_base) + 16)); index881 = index881 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index881 * 8) + let array1090 : Array[String] = []; + for index1091 = 0; index1091 < (mbt_ffi_load32((iter_base) + 16)); index1091 = index1091 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1091 * 8) - let result879 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1089 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array880.push(result879) + array1090.push(result1089) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array880) + Option::Some(array1090) } _ => panic() } - let lifted886 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1096 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array884 : Array[String] = []; - for index885 = 0; index885 < (mbt_ffi_load32((iter_base) + 28)); index885 = index885 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index885 * 8) + let array1094 : Array[String] = []; + for index1095 = 0; index1095 < (mbt_ffi_load32((iter_base) + 28)); index1095 = index1095 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1095 * 8) - let result883 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1093 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array884.push(result883) + array1094.push(result1093) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array884) + Option::Some(array1094) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted882, allowed_hosts : lifted886}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1092, allowed_hosts : lifted1096}) } 28 => { @@ -6383,148 +8483,148 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 30 => { - let result887 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1097 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array889 : Array[String] = []; - for index890 = 0; index890 < (mbt_ffi_load32((iter_base) + 20)); index890 = index890 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index890 * 8) + let array1099 : Array[String] = []; + for index1100 = 0; index1100 < (mbt_ffi_load32((iter_base) + 20)); index1100 = index1100 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1100 * 8) - let result888 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1098 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array889.push(result888) + array1099.push(result1098) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted892 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1102 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result891 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1101 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result891}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1101}) } _ => panic() } - let lifted894 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1104 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result893 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result893}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1103}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result887, allowed_suffixes : array889, min : lifted892, max : lifted894}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1097, allowed_suffixes : array1099, min : lifted1102, max : lifted1104}) } 31 => { - let array918 : Array[@types.UnionBranch] = []; - for index919 = 0; index919 < (mbt_ffi_load32((iter_base) + 12)); index919 = index919 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index919 * 92) + let array1128 : Array[@types.UnionBranch] = []; + for index1129 = 0; index1129 < (mbt_ffi_load32((iter_base) + 12)); index1129 = index1129 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1129 * 92) - let result895 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted904 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1114 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result896 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1106 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result896) + @types.DiscriminatorRule::Prefix(result1106) } 1 => { - let result897 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result897) + @types.DiscriminatorRule::Suffix(result1107) } 2 => { - let result898 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1108 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result898) + @types.DiscriminatorRule::Contains(result1108) } 3 => { - let result899 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result899) + @types.DiscriminatorRule::Regex(result1109) } 4 => { - let result900 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted902 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1112 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result901 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1111 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result901) + Option::Some(result1111) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result900, literal : lifted902}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1110, literal : lifted1112}) } 5 => { - let result903 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result903) + @types.DiscriminatorRule::FieldAbsent(result1113) } _ => panic() } - let lifted906 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1116 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result905 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result905) + Option::Some(result1115) } _ => panic() } - let array908 : Array[String] = []; - for index909 = 0; index909 < (mbt_ffi_load32((iter_base) + 52)); index909 = index909 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index909 * 8) + let array1118 : Array[String] = []; + for index1119 = 0; index1119 < (mbt_ffi_load32((iter_base) + 52)); index1119 = index1119 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1119 * 8) - let result907 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array908.push(result907) + array1118.push(result1117) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array911 : Array[String] = []; - for index912 = 0; index912 < (mbt_ffi_load32((iter_base) + 60)); index912 = index912 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index912 * 8) + let array1121 : Array[String] = []; + for index1122 = 0; index1122 < (mbt_ffi_load32((iter_base) + 60)); index1122 = index1122 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1122 * 8) - let result910 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array911.push(result910) + array1121.push(result1120) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted914 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1124 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result913 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result913) + Option::Some(result1123) } _ => panic() } - let lifted917 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1127 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted916 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1126 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -6539,57 +8639,57 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result915 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result915) + @types.Role::Other(result1125) } _ => panic() } - Option::Some(lifted916) + Option::Some(lifted1126) } _ => panic() } - array918.push(@types.UnionBranch::{tag : result895, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted904, metadata : @types.MetadataEnvelope::{doc : lifted906, aliases : array908, examples : array911, deprecated : lifted914, role : lifted917}}) + array1128.push(@types.UnionBranch::{tag : result1105, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1114, metadata : @types.MetadataEnvelope::{doc : lifted1116, aliases : array1118, examples : array1121, deprecated : lifted1124, role : lifted1127}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array918}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1128}) } 32 => { - let lifted921 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1131 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result920 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1130 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result920) + Option::Some(result1130) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted921}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1131}) } 33 => { - let lifted923 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1133 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result922 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result922) + Option::Some(result1132) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted923}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1133}) } 34 => { - let lifted924 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1134 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6598,11 +8698,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::FutureType(lifted924) + @types.SchemaTypeBody::FutureType(lifted1134) } 35 => { - let lifted925 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1135 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6611,58 +8711,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::StreamType(lifted925) + @types.SchemaTypeBody::StreamType(lifted1135) } _ => panic() } - let lifted928 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1138 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result927 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result927) + Option::Some(result1137) } _ => panic() } - let array930 : Array[String] = []; - for index931 = 0; index931 < (mbt_ffi_load32((iter_base) + 104)); index931 = index931 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index931 * 8) + let array1140 : Array[String] = []; + for index1141 = 0; index1141 < (mbt_ffi_load32((iter_base) + 104)); index1141 = index1141 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1141 * 8) - let result929 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array930.push(result929) + array1140.push(result1139) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array933 : Array[String] = []; - for index934 = 0; index934 < (mbt_ffi_load32((iter_base) + 112)); index934 = index934 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index934 * 8) + let array1143 : Array[String] = []; + for index1144 = 0; index1144 < (mbt_ffi_load32((iter_base) + 112)); index1144 = index1144 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1144 * 8) - let result932 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array933.push(result932) + array1143.push(result1142) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted936 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1146 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result935 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1145 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result935) + Option::Some(result1145) } _ => panic() } - let lifted939 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1149 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted938 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1148 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -6677,48 +8777,48 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result937 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result937) + @types.Role::Other(result1147) } _ => panic() } - Option::Some(lifted938) + Option::Some(lifted1148) } _ => panic() } - array940.push(@types.SchemaTypeNode::{body : lifted926, metadata : @types.MetadataEnvelope::{doc : lifted928, aliases : array930, examples : array933, deprecated : lifted936, role : lifted939}}) + array1150.push(@types.SchemaTypeNode::{body : lifted1136, metadata : @types.MetadataEnvelope::{doc : lifted1138, aliases : array1140, examples : array1143, deprecated : lifted1146, role : lifted1149}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array945 : Array[@types.SchemaTypeDef] = []; - for index946 = 0; index946 < (mbt_ffi_load32((iter_base) + 48)); index946 = index946 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index946 * 24) + let array1155 : Array[@types.SchemaTypeDef] = []; + for index1156 = 0; index1156 < (mbt_ffi_load32((iter_base) + 48)); index1156 = index1156 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index1156 * 24) - let result942 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted944 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1154 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result943 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result943) + Option::Some(result1153) } _ => panic() } - array945.push(@types.SchemaTypeDef::{id : result942, name : lifted944, body : mbt_ffi_load32((iter_base) + 20)}) + array1155.push(@types.SchemaTypeDef::{id : result1152, name : lifted1154, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) - let array977 : Array[@types.SchemaValueNode] = []; - for index978 = 0; index978 < (mbt_ffi_load32((iter_base) + 60)); index978 = index978 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index978 * 32) + let array1187 : Array[@types.SchemaValueNode] = []; + for index1188 = 0; index1188 < (mbt_ffi_load32((iter_base) + 60)); index1188 = index1188 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1188 * 32) - let lifted976 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1186 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -6769,25 +8869,25 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 12 => { - let result947 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result947) + @types.SchemaValueNode::StringValue(result1157) } 13 => { - let array948 : Array[Int] = []; - for index949 = 0; index949 < (mbt_ffi_load32((iter_base) + 12)); index949 = index949 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index949 * 4) + let array1158 : Array[Int] = []; + for index1159 = 0; index1159 < (mbt_ffi_load32((iter_base) + 12)); index1159 = index1159 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1159 * 4) - array948.push(mbt_ffi_load32((iter_base) + 0)) + array1158.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array948) + @types.SchemaValueNode::RecordValue(array1158) } 14 => { - let lifted950 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1160 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6796,7 +8896,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted950}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1160}) } 15 => { @@ -6804,67 +8904,67 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 16 => { - let array951 : Array[Bool] = []; - for index952 = 0; index952 < (mbt_ffi_load32((iter_base) + 12)); index952 = index952 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index952 * 1) + let array1161 : Array[Bool] = []; + for index1162 = 0; index1162 < (mbt_ffi_load32((iter_base) + 12)); index1162 = index1162 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1162 * 1) - array951.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1161.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array951) + @types.SchemaValueNode::FlagsValue(array1161) } 17 => { - let array953 : Array[Int] = []; - for index954 = 0; index954 < (mbt_ffi_load32((iter_base) + 12)); index954 = index954 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index954 * 4) + let array1163 : Array[Int] = []; + for index1164 = 0; index1164 < (mbt_ffi_load32((iter_base) + 12)); index1164 = index1164 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1164 * 4) - array953.push(mbt_ffi_load32((iter_base) + 0)) + array1163.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array953) + @types.SchemaValueNode::TupleValue(array1163) } 18 => { - let array955 : Array[Int] = []; - for index956 = 0; index956 < (mbt_ffi_load32((iter_base) + 12)); index956 = index956 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index956 * 4) + let array1165 : Array[Int] = []; + for index1166 = 0; index1166 < (mbt_ffi_load32((iter_base) + 12)); index1166 = index1166 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1166 * 4) - array955.push(mbt_ffi_load32((iter_base) + 0)) + array1165.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array955) + @types.SchemaValueNode::ListValue(array1165) } 19 => { - let array957 : Array[Int] = []; - for index958 = 0; index958 < (mbt_ffi_load32((iter_base) + 12)); index958 = index958 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index958 * 4) + let array1167 : Array[Int] = []; + for index1168 = 0; index1168 < (mbt_ffi_load32((iter_base) + 12)); index1168 = index1168 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1168 * 4) - array957.push(mbt_ffi_load32((iter_base) + 0)) + array1167.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array957) + @types.SchemaValueNode::FixedListValue(array1167) } 20 => { - let array959 : Array[@types.MapEntry] = []; - for index960 = 0; index960 < (mbt_ffi_load32((iter_base) + 12)); index960 = index960 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index960 * 8) + let array1169 : Array[@types.MapEntry] = []; + for index1170 = 0; index1170 < (mbt_ffi_load32((iter_base) + 12)); index1170 = index1170 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1170 * 8) - array959.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1169.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array959) + @types.SchemaValueNode::MapValue(array1169) } 21 => { - let lifted961 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1171 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6873,14 +8973,14 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::OptionValue(lifted961) + @types.SchemaValueNode::OptionValue(lifted1171) } 22 => { - let lifted964 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1174 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted962 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1172 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6889,11 +8989,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::OkValue(lifted962) + @types.ResultValuePayload::OkValue(lifted1172) } 1 => { - let lifted963 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1173 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6902,58 +9002,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::ErrValue(lifted963) + @types.ResultValuePayload::ErrValue(lifted1173) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted964) + @types.SchemaValueNode::ResultValue(lifted1174) } 23 => { - let result965 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted967 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1177 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result966 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1176 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result966) + Option::Some(result1176) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result965, language : lifted967}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1175, language : lifted1177}) } 24 => { - let result968 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1178 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted970 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1180 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result969 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1179 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result969) + Option::Some(result1179) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result968, mime_type : lifted970}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1178, mime_type : lifted1180}) } 25 => { - let result971 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1181 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result971) + @types.SchemaValueNode::PathValue(result1181) } 26 => { - let result972 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1182 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result972) + @types.SchemaValueNode::UrlValue(result1182) } 27 => { @@ -6965,21 +9065,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 29 => { - let result973 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result973}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1183}) } 30 => { - let result974 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1184 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result974, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1184, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result975 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result975}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1185}) } 32 => { @@ -6988,28 +9088,28 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array977.push(lifted976) + array1187.push(lifted1186) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array940, defs : array945, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array977, root : mbt_ffi_load32((iter_base) + 64)}}) + Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1150, defs : array1155, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array1187, root : mbt_ffi_load32((iter_base) + 64)}}) } _ => panic() } - PublicOplogEntry::End(EndParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), response : lifted979, forced_commit : (mbt_ffi_load8_u((iter_base) + 68) != 0)}) + PublicOplogEntry::End(EndParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), response : lifted1189, forced_commit : (mbt_ffi_load8_u((iter_base) + 68) != 0)}) } 3 => { - let lifted1145 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted1425 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let array1106 : Array[@types.SchemaTypeNode] = []; - for index1107 = 0; index1107 < (mbt_ffi_load32((iter_base) + 40)); index1107 = index1107 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1107 * 144) + let array1386 : Array[@types.SchemaTypeNode] = []; + for index1387 = 0; index1387 < (mbt_ffi_load32((iter_base) + 40)); index1387 = index1387 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1387 * 144) - let lifted1092 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1372 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -7020,148 +9120,848 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted1196 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted1191 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted1190 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted1190) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted1193 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted1192 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array994 : Array[@types.NamedFieldType] = []; - for index995 = 0; index995 < (mbt_ffi_load32((iter_base) + 12)); index995 = index995 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index995 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result980 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted1192) + } + _ => panic() + } - let lifted982 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted1195 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result981 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result981) + Option::Some(result1194) + } + _ => panic() } - _ => panic() - } - let array984 : Array[String] = []; - for index985 = 0; index985 < (mbt_ffi_load32((iter_base) + 28)); index985 = index985 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index985 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted1191, max : lifted1193, unit : lifted1195}) + } + _ => panic() + } - let result983 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted1196) + } + 3 => { - array984.push(result983) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted1203 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array987 : Array[String] = []; - for index988 = 0; index988 < (mbt_ffi_load32((iter_base) + 36)); index988 = index988 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index988 * 8) + let lifted1198 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result986 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted1197 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array987.push(result986) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted990 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result989 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result989) + Option::Some(lifted1197) + } + _ => panic() } - _ => panic() - } - let lifted993 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted1200 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted992 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted1199 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - let result991 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result991) - } - _ => panic() + Option::Some(lifted1199) } + _ => panic() + } + + let lifted1202 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some(lifted992) + let result1201 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1201) + } + _ => panic() } - _ => panic() - } - array994.push(@types.NamedFieldType::{name : result980, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted982, aliases : array984, examples : array987, deprecated : lifted990, role : lifted993}}) + Option::Some(@types.NumericRestrictions::{min : lifted1198, max : lifted1200, unit : lifted1202}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array994) + @types.SchemaTypeBody::S16Type(lifted1203) } - 15 => { + 4 => { - let array1011 : Array[@types.VariantCaseType] = []; - for index1012 = 0; index1012 < (mbt_ffi_load32((iter_base) + 12)); index1012 = index1012 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1012 * 72) + let lifted1210 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result996 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted1205 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1204 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1204) + } + _ => panic() + } + + let lifted1207 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1206 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1206) + } + _ => panic() + } + + let lifted1209 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1208 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1208) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1205, max : lifted1207, unit : lifted1209}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1210) + } + 5 => { + + let lifted1217 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1212 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1211 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1211) + } + _ => panic() + } + + let lifted1214 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1213 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1213) + } + _ => panic() + } + + let lifted1216 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1215 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1215) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1212, max : lifted1214, unit : lifted1216}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1217) + } + 6 => { + + let lifted1224 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1219 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1218 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1218) + } + _ => panic() + } + + let lifted1221 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1220 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1220) + } + _ => panic() + } + + let lifted1223 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1222 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1222) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1219, max : lifted1221, unit : lifted1223}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1224) + } + 7 => { + + let lifted1231 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1226 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1225 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1225) + } + _ => panic() + } + + let lifted1228 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1227 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1227) + } + _ => panic() + } + + let lifted1230 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1229 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1229) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1226, max : lifted1228, unit : lifted1230}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1231) + } + 8 => { + + let lifted1238 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1233 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1232 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1232) + } + _ => panic() + } + + let lifted1235 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1234 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1234) + } + _ => panic() + } + + let lifted1237 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1236) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1233, max : lifted1235, unit : lifted1237}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1238) + } + 9 => { + + let lifted1245 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1240 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1239 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1239) + } + _ => panic() + } + + let lifted1242 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1241 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1241) + } + _ => panic() + } + + let lifted1244 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1243) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1240, max : lifted1242, unit : lifted1244}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1245) + } + 10 => { + + let lifted1252 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1247 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1246 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted997 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1246) + } + _ => panic() + } + + let lifted1249 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1248 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1248) + } + _ => panic() + } + + let lifted1251 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1250 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1250) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1247, max : lifted1249, unit : lifted1251}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1252) + } + 11 => { + + let lifted1259 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1254 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1253 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1253) + } + _ => panic() + } + + let lifted1256 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1255 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1255) + } + _ => panic() + } + + let lifted1258 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1257 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1257) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1254, max : lifted1256, unit : lifted1258}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1259) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array1274 : Array[@types.NamedFieldType] = []; + for index1275 = 0; index1275 < (mbt_ffi_load32((iter_base) + 12)); index1275 = index1275 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1275 * 68) + + let result1260 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1262 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result1261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result1261) + } + _ => panic() + } + + let array1264 : Array[String] = []; + for index1265 = 0; index1265 < (mbt_ffi_load32((iter_base) + 28)); index1265 = index1265 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1265 * 8) + + let result1263 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1264.push(result1263) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array1267 : Array[String] = []; + for index1268 = 0; index1268 < (mbt_ffi_load32((iter_base) + 36)); index1268 = index1268 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1268 * 8) + + let result1266 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1267.push(result1266) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted1270 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result1269 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result1269) + } + _ => panic() + } + + let lifted1273 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted1272 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result1271 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result1271) + } + _ => panic() + } + + Option::Some(lifted1272) + } + _ => panic() + } + + array1274.push(@types.NamedFieldType::{name : result1260, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1262, aliases : array1264, examples : array1267, deprecated : lifted1270, role : lifted1273}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array1274) + } + 15 => { + + let array1291 : Array[@types.VariantCaseType] = []; + for index1292 = 0; index1292 < (mbt_ffi_load32((iter_base) + 12)); index1292 = index1292 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1292 * 72) + + let result1276 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1277 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -7170,53 +9970,53 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted999 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1279 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result998 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1278 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result998) + Option::Some(result1278) } _ => panic() } - let array1001 : Array[String] = []; - for index1002 = 0; index1002 < (mbt_ffi_load32((iter_base) + 32)); index1002 = index1002 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1002 * 8) + let array1281 : Array[String] = []; + for index1282 = 0; index1282 < (mbt_ffi_load32((iter_base) + 32)); index1282 = index1282 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1282 * 8) - let result1000 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1001.push(result1000) + array1281.push(result1280) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1004 : Array[String] = []; - for index1005 = 0; index1005 < (mbt_ffi_load32((iter_base) + 40)); index1005 = index1005 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1005 * 8) + let array1284 : Array[String] = []; + for index1285 = 0; index1285 < (mbt_ffi_load32((iter_base) + 40)); index1285 = index1285 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1285 * 8) - let result1003 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1283 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1004.push(result1003) + array1284.push(result1283) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1007 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1287 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1006 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1286 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1006) + Option::Some(result1286) } _ => panic() } - let lifted1010 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1290 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1009 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1289 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -7231,63 +10031,63 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1008 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1288 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1008) + @types.Role::Other(result1288) } _ => panic() } - Option::Some(lifted1009) + Option::Some(lifted1289) } _ => panic() } - array1011.push(@types.VariantCaseType::{name : result996, payload : lifted997, metadata : @types.MetadataEnvelope::{doc : lifted999, aliases : array1001, examples : array1004, deprecated : lifted1007, role : lifted1010}}) + array1291.push(@types.VariantCaseType::{name : result1276, payload : lifted1277, metadata : @types.MetadataEnvelope::{doc : lifted1279, aliases : array1281, examples : array1284, deprecated : lifted1287, role : lifted1290}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1011) + @types.SchemaTypeBody::VariantType(array1291) } 16 => { - let array1014 : Array[String] = []; - for index1015 = 0; index1015 < (mbt_ffi_load32((iter_base) + 12)); index1015 = index1015 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1015 * 8) + let array1294 : Array[String] = []; + for index1295 = 0; index1295 < (mbt_ffi_load32((iter_base) + 12)); index1295 = index1295 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1295 * 8) - let result1013 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1293 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1014.push(result1013) + array1294.push(result1293) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1014) + @types.SchemaTypeBody::EnumType(array1294) } 17 => { - let array1017 : Array[String] = []; - for index1018 = 0; index1018 < (mbt_ffi_load32((iter_base) + 12)); index1018 = index1018 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1018 * 8) + let array1297 : Array[String] = []; + for index1298 = 0; index1298 < (mbt_ffi_load32((iter_base) + 12)); index1298 = index1298 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1298 * 8) - let result1016 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1296 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1017.push(result1016) + array1297.push(result1296) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1017) + @types.SchemaTypeBody::FlagsType(array1297) } 18 => { - let array1019 : Array[Int] = []; - for index1020 = 0; index1020 < (mbt_ffi_load32((iter_base) + 12)); index1020 = index1020 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1020 * 4) + let array1299 : Array[Int] = []; + for index1300 = 0; index1300 < (mbt_ffi_load32((iter_base) + 12)); index1300 = index1300 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1300 * 4) - array1019.push(mbt_ffi_load32((iter_base) + 0)) + array1299.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1019) + @types.SchemaTypeBody::TupleType(array1299) } 19 => { @@ -7307,7 +10107,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 23 => { - let lifted1021 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1301 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -7316,7 +10116,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1022 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1302 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -7325,30 +10125,30 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1021, err : lifted1022}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1301, err : lifted1302}) } 24 => { - let lifted1026 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1306 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1024 : Array[String] = []; - for index1025 = 0; index1025 < (mbt_ffi_load32((iter_base) + 16)); index1025 = index1025 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1025 * 8) + let array1304 : Array[String] = []; + for index1305 = 0; index1305 < (mbt_ffi_load32((iter_base) + 16)); index1305 = index1305 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1305 * 8) - let result1023 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1303 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1024.push(result1023) + array1304.push(result1303) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1024) + Option::Some(array1304) } _ => panic() } - let lifted1027 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1307 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -7357,7 +10157,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1028 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1308 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -7366,41 +10166,41 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1030 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1310 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1029 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1309 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1029) + Option::Some(result1309) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1026, min_length : lifted1027, max_length : lifted1028, regex : lifted1030}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1306, min_length : lifted1307, max_length : lifted1308, regex : lifted1310}) } 25 => { - let lifted1034 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1314 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1032 : Array[String] = []; - for index1033 = 0; index1033 < (mbt_ffi_load32((iter_base) + 16)); index1033 = index1033 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1033 * 8) + let array1312 : Array[String] = []; + for index1313 = 0; index1313 < (mbt_ffi_load32((iter_base) + 16)); index1313 = index1313 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1313 * 8) - let result1031 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1311 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1032.push(result1031) + array1312.push(result1311) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1032) + Option::Some(array1312) } _ => panic() } - let lifted1035 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1315 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -7409,7 +10209,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1036 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1316 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -7418,91 +10218,91 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1034, min_bytes : lifted1035, max_bytes : lifted1036}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1314, min_bytes : lifted1315, max_bytes : lifted1316}) } 26 => { - let lifted1040 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1320 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1038 : Array[String] = []; - for index1039 = 0; index1039 < (mbt_ffi_load32((iter_base) + 20)); index1039 = index1039 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1039 * 8) + let array1318 : Array[String] = []; + for index1319 = 0; index1319 < (mbt_ffi_load32((iter_base) + 20)); index1319 = index1319 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1319 * 8) - let result1037 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1038.push(result1037) + array1318.push(result1317) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1038) + Option::Some(array1318) } _ => panic() } - let lifted1044 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1324 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1042 : Array[String] = []; - for index1043 = 0; index1043 < (mbt_ffi_load32((iter_base) + 32)); index1043 = index1043 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1043 * 8) + let array1322 : Array[String] = []; + for index1323 = 0; index1323 < (mbt_ffi_load32((iter_base) + 32)); index1323 = index1323 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1323 * 8) - let result1041 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1321 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1042.push(result1041) + array1322.push(result1321) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1042) + Option::Some(array1322) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1040, allowed_extensions : lifted1044}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1320, allowed_extensions : lifted1324}) } 27 => { - let lifted1048 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1328 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1046 : Array[String] = []; - for index1047 = 0; index1047 < (mbt_ffi_load32((iter_base) + 16)); index1047 = index1047 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1047 * 8) + let array1326 : Array[String] = []; + for index1327 = 0; index1327 < (mbt_ffi_load32((iter_base) + 16)); index1327 = index1327 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1327 * 8) - let result1045 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1046.push(result1045) + array1326.push(result1325) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1046) + Option::Some(array1326) } _ => panic() } - let lifted1052 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1332 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1050 : Array[String] = []; - for index1051 = 0; index1051 < (mbt_ffi_load32((iter_base) + 28)); index1051 = index1051 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1051 * 8) + let array1330 : Array[String] = []; + for index1331 = 0; index1331 < (mbt_ffi_load32((iter_base) + 28)); index1331 = index1331 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1331 * 8) - let result1049 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1329 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1050.push(result1049) + array1330.push(result1329) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1050) + Option::Some(array1330) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1048, allowed_hosts : lifted1052}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1328, allowed_hosts : lifted1332}) } 28 => { @@ -7514,148 +10314,148 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 30 => { - let result1053 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1333 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1055 : Array[String] = []; - for index1056 = 0; index1056 < (mbt_ffi_load32((iter_base) + 20)); index1056 = index1056 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1056 * 8) + let array1335 : Array[String] = []; + for index1336 = 0; index1336 < (mbt_ffi_load32((iter_base) + 20)); index1336 = index1336 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1336 * 8) - let result1054 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1334 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1055.push(result1054) + array1335.push(result1334) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1058 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1338 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1057 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1337 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1057}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1337}) } _ => panic() } - let lifted1060 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1340 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1059 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1339 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1059}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1339}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1053, allowed_suffixes : array1055, min : lifted1058, max : lifted1060}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1333, allowed_suffixes : array1335, min : lifted1338, max : lifted1340}) } 31 => { - let array1084 : Array[@types.UnionBranch] = []; - for index1085 = 0; index1085 < (mbt_ffi_load32((iter_base) + 12)); index1085 = index1085 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1085 * 92) + let array1364 : Array[@types.UnionBranch] = []; + for index1365 = 0; index1365 < (mbt_ffi_load32((iter_base) + 12)); index1365 = index1365 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1365 * 92) - let result1061 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1341 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1070 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1350 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1062 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1062) + @types.DiscriminatorRule::Prefix(result1342) } 1 => { - let result1063 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1063) + @types.DiscriminatorRule::Suffix(result1343) } 2 => { - let result1064 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1064) + @types.DiscriminatorRule::Contains(result1344) } 3 => { - let result1065 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1065) + @types.DiscriminatorRule::Regex(result1345) } 4 => { - let result1066 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1346 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1068 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1348 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1067 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1067) + Option::Some(result1347) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1066, literal : lifted1068}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1346, literal : lifted1348}) } 5 => { - let result1069 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1349 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1069) + @types.DiscriminatorRule::FieldAbsent(result1349) } _ => panic() } - let lifted1072 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1352 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1071 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1351 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1071) + Option::Some(result1351) } _ => panic() } - let array1074 : Array[String] = []; - for index1075 = 0; index1075 < (mbt_ffi_load32((iter_base) + 52)); index1075 = index1075 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1075 * 8) + let array1354 : Array[String] = []; + for index1355 = 0; index1355 < (mbt_ffi_load32((iter_base) + 52)); index1355 = index1355 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1355 * 8) - let result1073 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1353 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1074.push(result1073) + array1354.push(result1353) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1077 : Array[String] = []; - for index1078 = 0; index1078 < (mbt_ffi_load32((iter_base) + 60)); index1078 = index1078 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1078 * 8) + let array1357 : Array[String] = []; + for index1358 = 0; index1358 < (mbt_ffi_load32((iter_base) + 60)); index1358 = index1358 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1358 * 8) - let result1076 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1077.push(result1076) + array1357.push(result1356) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1080 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1360 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1079 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1359 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1079) + Option::Some(result1359) } _ => panic() } - let lifted1083 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1363 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1082 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1362 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -7670,57 +10470,57 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1081 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1361 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1081) + @types.Role::Other(result1361) } _ => panic() } - Option::Some(lifted1082) + Option::Some(lifted1362) } _ => panic() } - array1084.push(@types.UnionBranch::{tag : result1061, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1070, metadata : @types.MetadataEnvelope::{doc : lifted1072, aliases : array1074, examples : array1077, deprecated : lifted1080, role : lifted1083}}) + array1364.push(@types.UnionBranch::{tag : result1341, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1350, metadata : @types.MetadataEnvelope::{doc : lifted1352, aliases : array1354, examples : array1357, deprecated : lifted1360, role : lifted1363}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1084}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1364}) } 32 => { - let lifted1087 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1367 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1086 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1366 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1086) + Option::Some(result1366) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1087}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1367}) } 33 => { - let lifted1089 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1369 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1088 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1368 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1088) + Option::Some(result1368) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1089}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1369}) } 34 => { - let lifted1090 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1370 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -7729,11 +10529,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1090) + @types.SchemaTypeBody::FutureType(lifted1370) } 35 => { - let lifted1091 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1371 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -7742,58 +10542,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1091) + @types.SchemaTypeBody::StreamType(lifted1371) } _ => panic() } - let lifted1094 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1374 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1093 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1093) + Option::Some(result1373) } _ => panic() } - let array1096 : Array[String] = []; - for index1097 = 0; index1097 < (mbt_ffi_load32((iter_base) + 104)); index1097 = index1097 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1097 * 8) + let array1376 : Array[String] = []; + for index1377 = 0; index1377 < (mbt_ffi_load32((iter_base) + 104)); index1377 = index1377 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1377 * 8) - let result1095 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1096.push(result1095) + array1376.push(result1375) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1099 : Array[String] = []; - for index1100 = 0; index1100 < (mbt_ffi_load32((iter_base) + 112)); index1100 = index1100 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1100 * 8) + let array1379 : Array[String] = []; + for index1380 = 0; index1380 < (mbt_ffi_load32((iter_base) + 112)); index1380 = index1380 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1380 * 8) - let result1098 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1378 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1099.push(result1098) + array1379.push(result1378) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1102 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1382 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1101 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1381 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1101) + Option::Some(result1381) } _ => panic() } - let lifted1105 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1385 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1104 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1384 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -7808,48 +10608,48 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1103) + @types.Role::Other(result1383) } _ => panic() } - Option::Some(lifted1104) + Option::Some(lifted1384) } _ => panic() } - array1106.push(@types.SchemaTypeNode::{body : lifted1092, metadata : @types.MetadataEnvelope::{doc : lifted1094, aliases : array1096, examples : array1099, deprecated : lifted1102, role : lifted1105}}) + array1386.push(@types.SchemaTypeNode::{body : lifted1372, metadata : @types.MetadataEnvelope::{doc : lifted1374, aliases : array1376, examples : array1379, deprecated : lifted1382, role : lifted1385}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array1111 : Array[@types.SchemaTypeDef] = []; - for index1112 = 0; index1112 < (mbt_ffi_load32((iter_base) + 48)); index1112 = index1112 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index1112 * 24) + let array1391 : Array[@types.SchemaTypeDef] = []; + for index1392 = 0; index1392 < (mbt_ffi_load32((iter_base) + 48)); index1392 = index1392 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index1392 * 24) - let result1108 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1388 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1110 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1390 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1389 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1109) + Option::Some(result1389) } _ => panic() } - array1111.push(@types.SchemaTypeDef::{id : result1108, name : lifted1110, body : mbt_ffi_load32((iter_base) + 20)}) + array1391.push(@types.SchemaTypeDef::{id : result1388, name : lifted1390, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) - let array1143 : Array[@types.SchemaValueNode] = []; - for index1144 = 0; index1144 < (mbt_ffi_load32((iter_base) + 60)); index1144 = index1144 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1144 * 32) + let array1423 : Array[@types.SchemaValueNode] = []; + for index1424 = 0; index1424 < (mbt_ffi_load32((iter_base) + 60)); index1424 = index1424 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1424 * 32) - let lifted1142 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1422 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -7900,25 +10700,25 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 12 => { - let result1113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1113) + @types.SchemaValueNode::StringValue(result1393) } 13 => { - let array1114 : Array[Int] = []; - for index1115 = 0; index1115 < (mbt_ffi_load32((iter_base) + 12)); index1115 = index1115 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1115 * 4) + let array1394 : Array[Int] = []; + for index1395 = 0; index1395 < (mbt_ffi_load32((iter_base) + 12)); index1395 = index1395 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1395 * 4) - array1114.push(mbt_ffi_load32((iter_base) + 0)) + array1394.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1114) + @types.SchemaValueNode::RecordValue(array1394) } 14 => { - let lifted1116 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1396 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -7927,7 +10727,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1116}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1396}) } 15 => { @@ -7935,67 +10735,67 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 16 => { - let array1117 : Array[Bool] = []; - for index1118 = 0; index1118 < (mbt_ffi_load32((iter_base) + 12)); index1118 = index1118 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1118 * 1) + let array1397 : Array[Bool] = []; + for index1398 = 0; index1398 < (mbt_ffi_load32((iter_base) + 12)); index1398 = index1398 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1398 * 1) - array1117.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1397.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1117) + @types.SchemaValueNode::FlagsValue(array1397) } 17 => { - let array1119 : Array[Int] = []; - for index1120 = 0; index1120 < (mbt_ffi_load32((iter_base) + 12)); index1120 = index1120 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1120 * 4) + let array1399 : Array[Int] = []; + for index1400 = 0; index1400 < (mbt_ffi_load32((iter_base) + 12)); index1400 = index1400 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1400 * 4) - array1119.push(mbt_ffi_load32((iter_base) + 0)) + array1399.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1119) + @types.SchemaValueNode::TupleValue(array1399) } 18 => { - let array1121 : Array[Int] = []; - for index1122 = 0; index1122 < (mbt_ffi_load32((iter_base) + 12)); index1122 = index1122 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1122 * 4) + let array1401 : Array[Int] = []; + for index1402 = 0; index1402 < (mbt_ffi_load32((iter_base) + 12)); index1402 = index1402 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1402 * 4) - array1121.push(mbt_ffi_load32((iter_base) + 0)) + array1401.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1121) + @types.SchemaValueNode::ListValue(array1401) } 19 => { - let array1123 : Array[Int] = []; - for index1124 = 0; index1124 < (mbt_ffi_load32((iter_base) + 12)); index1124 = index1124 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1124 * 4) + let array1403 : Array[Int] = []; + for index1404 = 0; index1404 < (mbt_ffi_load32((iter_base) + 12)); index1404 = index1404 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1404 * 4) - array1123.push(mbt_ffi_load32((iter_base) + 0)) + array1403.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1123) + @types.SchemaValueNode::FixedListValue(array1403) } 20 => { - let array1125 : Array[@types.MapEntry] = []; - for index1126 = 0; index1126 < (mbt_ffi_load32((iter_base) + 12)); index1126 = index1126 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1126 * 8) + let array1405 : Array[@types.MapEntry] = []; + for index1406 = 0; index1406 < (mbt_ffi_load32((iter_base) + 12)); index1406 = index1406 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1406 * 8) - array1125.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1405.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1125) + @types.SchemaValueNode::MapValue(array1405) } 21 => { - let lifted1127 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1407 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -8004,14 +10804,14 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1127) + @types.SchemaValueNode::OptionValue(lifted1407) } 22 => { - let lifted1130 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1410 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1128 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1408 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -8020,11 +10820,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::OkValue(lifted1128) + @types.ResultValuePayload::OkValue(lifted1408) } 1 => { - let lifted1129 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1409 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -8033,58 +10833,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1129) + @types.ResultValuePayload::ErrValue(lifted1409) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1130) + @types.SchemaValueNode::ResultValue(lifted1410) } 23 => { - let result1131 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1411 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1133 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1413 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1412 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1132) + Option::Some(result1412) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1131, language : lifted1133}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1411, language : lifted1413}) } 24 => { - let result1134 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1414 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1136 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1416 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1135) + Option::Some(result1415) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1134, mime_type : lifted1136}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1414, mime_type : lifted1416}) } 25 => { - let result1137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1417 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1137) + @types.SchemaValueNode::PathValue(result1417) } 26 => { - let result1138 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1418 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1138) + @types.SchemaValueNode::UrlValue(result1418) } 27 => { @@ -8096,21 +10896,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 29 => { - let result1139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1419 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1139}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1419}) } 30 => { - let result1140 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1140, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1420, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1141}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1421}) } 32 => { @@ -8119,29 +10919,29 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array1143.push(lifted1142) + array1423.push(lifted1422) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1106, defs : array1111, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array1143, root : mbt_ffi_load32((iter_base) + 64)}}) + Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1386, defs : array1391, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array1423, root : mbt_ffi_load32((iter_base) + 64)}}) } _ => panic() } - PublicOplogEntry::Cancelled(CancelledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), partial : lifted1145}) + PublicOplogEntry::Cancelled(CancelledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), partial : lifted1425}) } 4 => { - let lifted1520 = match (mbt_ffi_load8_u((iter_base) + 24)) { + let lifted1940 = match (mbt_ffi_load8_u((iter_base) + 24)) { 0 => { - let result1146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result1426 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let array1273 : Array[@types.SchemaTypeNode] = []; - for index1274 = 0; index1274 < (mbt_ffi_load32((iter_base) + 44)); index1274 = index1274 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index1274 * 144) + let array1623 : Array[@types.SchemaTypeNode] = []; + for index1624 = 0; index1624 < (mbt_ffi_load32((iter_base) + 44)); index1624 = index1624 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index1624 * 144) - let lifted1259 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1609 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -8152,148 +10952,848 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted1433 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted1428 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted1427 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted1427) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted1430 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted1429 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array1161 : Array[@types.NamedFieldType] = []; - for index1162 = 0; index1162 < (mbt_ffi_load32((iter_base) + 12)); index1162 = index1162 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1162 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result1147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted1429) + } + _ => panic() + } - let lifted1149 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted1432 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result1148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1431 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1148) + Option::Some(result1431) + } + _ => panic() } - _ => panic() - } - let array1151 : Array[String] = []; - for index1152 = 0; index1152 < (mbt_ffi_load32((iter_base) + 28)); index1152 = index1152 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1152 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted1428, max : lifted1430, unit : lifted1432}) + } + _ => panic() + } - let result1150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted1433) + } + 3 => { - array1151.push(result1150) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted1440 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array1154 : Array[String] = []; - for index1155 = 0; index1155 < (mbt_ffi_load32((iter_base) + 36)); index1155 = index1155 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1155 * 8) + let lifted1435 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result1153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted1434 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array1154.push(result1153) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted1157 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result1156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result1156) + Option::Some(lifted1434) + } + _ => panic() } - _ => panic() - } - let lifted1160 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted1437 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted1159 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted1436 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - - let result1158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1158) - } - _ => panic() + Option::Some(lifted1436) } - - Option::Some(lifted1159) + _ => panic() } - _ => panic() - } - array1161.push(@types.NamedFieldType::{name : result1147, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1149, aliases : array1151, examples : array1154, deprecated : lifted1157, role : lifted1160}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::RecordType(array1161) - } - 15 => { - - let array1178 : Array[@types.VariantCaseType] = []; - for index1179 = 0; index1179 < (mbt_ffi_load32((iter_base) + 12)); index1179 = index1179 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1179 * 72) + let lifted1439 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result1163 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1438 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted1164 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + Option::Some(result1438) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1435, max : lifted1437, unit : lifted1439}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1440) + } + 4 => { + + let lifted1447 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1442 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1441 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1441) + } + _ => panic() + } + + let lifted1444 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1443 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1443) + } + _ => panic() + } + + let lifted1446 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1445 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1445) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1442, max : lifted1444, unit : lifted1446}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1447) + } + 5 => { + + let lifted1454 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1449 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1448 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1448) + } + _ => panic() + } + + let lifted1451 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1450 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1450) + } + _ => panic() + } + + let lifted1453 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1452) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1449, max : lifted1451, unit : lifted1453}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1454) + } + 6 => { + + let lifted1461 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1456 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1455 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1455) + } + _ => panic() + } + + let lifted1458 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1457 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1457) + } + _ => panic() + } + + let lifted1460 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1459 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1459) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1456, max : lifted1458, unit : lifted1460}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1461) + } + 7 => { + + let lifted1468 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1463 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1462 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1462) + } + _ => panic() + } + + let lifted1465 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1464 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1464) + } + _ => panic() + } + + let lifted1467 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1466) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1463, max : lifted1465, unit : lifted1467}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1468) + } + 8 => { + + let lifted1475 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1470 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1469 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1469) + } + _ => panic() + } + + let lifted1472 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1471 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1471) + } + _ => panic() + } + + let lifted1474 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1473 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1473) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1470, max : lifted1472, unit : lifted1474}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1475) + } + 9 => { + + let lifted1482 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1477 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1476 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1476) + } + _ => panic() + } + + let lifted1479 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1478 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1478) + } + _ => panic() + } + + let lifted1481 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1480 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1480) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1477, max : lifted1479, unit : lifted1481}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1482) + } + 10 => { + + let lifted1489 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1484 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1483 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1483) + } + _ => panic() + } + + let lifted1486 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1485 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1485) + } + _ => panic() + } + + let lifted1488 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1487 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1487) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1484, max : lifted1486, unit : lifted1488}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1489) + } + 11 => { + + let lifted1496 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1491 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1490 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1490) + } + _ => panic() + } + + let lifted1493 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1492 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1492) + } + _ => panic() + } + + let lifted1495 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1494 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1494) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1491, max : lifted1493, unit : lifted1495}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1496) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array1511 : Array[@types.NamedFieldType] = []; + for index1512 = 0; index1512 < (mbt_ffi_load32((iter_base) + 12)); index1512 = index1512 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1512 * 68) + + let result1497 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1499 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result1498 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result1498) + } + _ => panic() + } + + let array1501 : Array[String] = []; + for index1502 = 0; index1502 < (mbt_ffi_load32((iter_base) + 28)); index1502 = index1502 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1502 * 8) + + let result1500 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1501.push(result1500) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array1504 : Array[String] = []; + for index1505 = 0; index1505 < (mbt_ffi_load32((iter_base) + 36)); index1505 = index1505 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1505 * 8) + + let result1503 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1504.push(result1503) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted1507 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result1506 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result1506) + } + _ => panic() + } + + let lifted1510 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted1509 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result1508 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result1508) + } + _ => panic() + } + + Option::Some(lifted1509) + } + _ => panic() + } + + array1511.push(@types.NamedFieldType::{name : result1497, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1499, aliases : array1501, examples : array1504, deprecated : lifted1507, role : lifted1510}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array1511) + } + 15 => { + + let array1528 : Array[@types.VariantCaseType] = []; + for index1529 = 0; index1529 < (mbt_ffi_load32((iter_base) + 12)); index1529 = index1529 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1529 * 72) + + let result1513 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1514 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -8302,53 +11802,53 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1166 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1516 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1515 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1165) + Option::Some(result1515) } _ => panic() } - let array1168 : Array[String] = []; - for index1169 = 0; index1169 < (mbt_ffi_load32((iter_base) + 32)); index1169 = index1169 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1169 * 8) + let array1518 : Array[String] = []; + for index1519 = 0; index1519 < (mbt_ffi_load32((iter_base) + 32)); index1519 = index1519 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1519 * 8) - let result1167 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1517 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1168.push(result1167) + array1518.push(result1517) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1171 : Array[String] = []; - for index1172 = 0; index1172 < (mbt_ffi_load32((iter_base) + 40)); index1172 = index1172 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1172 * 8) + let array1521 : Array[String] = []; + for index1522 = 0; index1522 < (mbt_ffi_load32((iter_base) + 40)); index1522 = index1522 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1522 * 8) - let result1170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1520 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1171.push(result1170) + array1521.push(result1520) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1174 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1524 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1523 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1173) + Option::Some(result1523) } _ => panic() } - let lifted1177 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1527 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1176 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1526 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -8363,63 +11863,63 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1525 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1175) + @types.Role::Other(result1525) } _ => panic() } - Option::Some(lifted1176) + Option::Some(lifted1526) } _ => panic() } - array1178.push(@types.VariantCaseType::{name : result1163, payload : lifted1164, metadata : @types.MetadataEnvelope::{doc : lifted1166, aliases : array1168, examples : array1171, deprecated : lifted1174, role : lifted1177}}) + array1528.push(@types.VariantCaseType::{name : result1513, payload : lifted1514, metadata : @types.MetadataEnvelope::{doc : lifted1516, aliases : array1518, examples : array1521, deprecated : lifted1524, role : lifted1527}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1178) + @types.SchemaTypeBody::VariantType(array1528) } 16 => { - let array1181 : Array[String] = []; - for index1182 = 0; index1182 < (mbt_ffi_load32((iter_base) + 12)); index1182 = index1182 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1182 * 8) + let array1531 : Array[String] = []; + for index1532 = 0; index1532 < (mbt_ffi_load32((iter_base) + 12)); index1532 = index1532 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1532 * 8) - let result1180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1530 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1181.push(result1180) + array1531.push(result1530) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1181) + @types.SchemaTypeBody::EnumType(array1531) } 17 => { - let array1184 : Array[String] = []; - for index1185 = 0; index1185 < (mbt_ffi_load32((iter_base) + 12)); index1185 = index1185 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1185 * 8) + let array1534 : Array[String] = []; + for index1535 = 0; index1535 < (mbt_ffi_load32((iter_base) + 12)); index1535 = index1535 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1535 * 8) - let result1183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1184.push(result1183) + array1534.push(result1533) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1184) + @types.SchemaTypeBody::FlagsType(array1534) } 18 => { - let array1186 : Array[Int] = []; - for index1187 = 0; index1187 < (mbt_ffi_load32((iter_base) + 12)); index1187 = index1187 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1187 * 4) + let array1536 : Array[Int] = []; + for index1537 = 0; index1537 < (mbt_ffi_load32((iter_base) + 12)); index1537 = index1537 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1537 * 4) - array1186.push(mbt_ffi_load32((iter_base) + 0)) + array1536.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1186) + @types.SchemaTypeBody::TupleType(array1536) } 19 => { @@ -8439,7 +11939,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 23 => { - let lifted1188 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1538 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -8448,7 +11948,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1189 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1539 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -8457,30 +11957,30 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1188, err : lifted1189}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1538, err : lifted1539}) } 24 => { - let lifted1193 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1543 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1191 : Array[String] = []; - for index1192 = 0; index1192 < (mbt_ffi_load32((iter_base) + 16)); index1192 = index1192 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1192 * 8) + let array1541 : Array[String] = []; + for index1542 = 0; index1542 < (mbt_ffi_load32((iter_base) + 16)); index1542 = index1542 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1542 * 8) - let result1190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1540 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1191.push(result1190) + array1541.push(result1540) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1191) + Option::Some(array1541) } _ => panic() } - let lifted1194 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1544 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -8489,7 +11989,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1195 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1545 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -8498,41 +11998,41 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1197 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1547 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1546 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1196) + Option::Some(result1546) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1193, min_length : lifted1194, max_length : lifted1195, regex : lifted1197}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1543, min_length : lifted1544, max_length : lifted1545, regex : lifted1547}) } 25 => { - let lifted1201 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1551 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1199 : Array[String] = []; - for index1200 = 0; index1200 < (mbt_ffi_load32((iter_base) + 16)); index1200 = index1200 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1200 * 8) + let array1549 : Array[String] = []; + for index1550 = 0; index1550 < (mbt_ffi_load32((iter_base) + 16)); index1550 = index1550 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1550 * 8) - let result1198 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1548 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1199.push(result1198) + array1549.push(result1548) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1199) + Option::Some(array1549) } _ => panic() } - let lifted1202 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1552 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -8541,7 +12041,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1203 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1553 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -8550,91 +12050,91 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1201, min_bytes : lifted1202, max_bytes : lifted1203}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1551, min_bytes : lifted1552, max_bytes : lifted1553}) } 26 => { - let lifted1207 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1557 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1205 : Array[String] = []; - for index1206 = 0; index1206 < (mbt_ffi_load32((iter_base) + 20)); index1206 = index1206 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1206 * 8) + let array1555 : Array[String] = []; + for index1556 = 0; index1556 < (mbt_ffi_load32((iter_base) + 20)); index1556 = index1556 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1556 * 8) - let result1204 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1554 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1205.push(result1204) + array1555.push(result1554) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1205) + Option::Some(array1555) } _ => panic() } - let lifted1211 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1561 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1209 : Array[String] = []; - for index1210 = 0; index1210 < (mbt_ffi_load32((iter_base) + 32)); index1210 = index1210 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1210 * 8) + let array1559 : Array[String] = []; + for index1560 = 0; index1560 < (mbt_ffi_load32((iter_base) + 32)); index1560 = index1560 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1560 * 8) - let result1208 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1558 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1209.push(result1208) + array1559.push(result1558) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1209) + Option::Some(array1559) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1207, allowed_extensions : lifted1211}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1557, allowed_extensions : lifted1561}) } 27 => { - let lifted1215 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1565 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1213 : Array[String] = []; - for index1214 = 0; index1214 < (mbt_ffi_load32((iter_base) + 16)); index1214 = index1214 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1214 * 8) + let array1563 : Array[String] = []; + for index1564 = 0; index1564 < (mbt_ffi_load32((iter_base) + 16)); index1564 = index1564 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1564 * 8) - let result1212 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1213.push(result1212) + array1563.push(result1562) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1213) + Option::Some(array1563) } _ => panic() } - let lifted1219 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1569 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1217 : Array[String] = []; - for index1218 = 0; index1218 < (mbt_ffi_load32((iter_base) + 28)); index1218 = index1218 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1218 * 8) + let array1567 : Array[String] = []; + for index1568 = 0; index1568 < (mbt_ffi_load32((iter_base) + 28)); index1568 = index1568 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1568 * 8) - let result1216 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1217.push(result1216) + array1567.push(result1566) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1217) + Option::Some(array1567) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1215, allowed_hosts : lifted1219}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1565, allowed_hosts : lifted1569}) } 28 => { @@ -8646,148 +12146,148 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 30 => { - let result1220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1570 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1222 : Array[String] = []; - for index1223 = 0; index1223 < (mbt_ffi_load32((iter_base) + 20)); index1223 = index1223 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1223 * 8) + let array1572 : Array[String] = []; + for index1573 = 0; index1573 < (mbt_ffi_load32((iter_base) + 20)); index1573 = index1573 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1573 * 8) - let result1221 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1571 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1222.push(result1221) + array1572.push(result1571) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1225 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1575 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1224 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1574 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1224}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1574}) } _ => panic() } - let lifted1227 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1577 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1576 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1226}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1576}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1220, allowed_suffixes : array1222, min : lifted1225, max : lifted1227}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1570, allowed_suffixes : array1572, min : lifted1575, max : lifted1577}) } 31 => { - let array1251 : Array[@types.UnionBranch] = []; - for index1252 = 0; index1252 < (mbt_ffi_load32((iter_base) + 12)); index1252 = index1252 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1252 * 92) + let array1601 : Array[@types.UnionBranch] = []; + for index1602 = 0; index1602 < (mbt_ffi_load32((iter_base) + 12)); index1602 = index1602 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1602 * 92) - let result1228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1578 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1237 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1587 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1229 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1579 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1229) + @types.DiscriminatorRule::Prefix(result1579) } 1 => { - let result1230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1580 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1230) + @types.DiscriminatorRule::Suffix(result1580) } 2 => { - let result1231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1581 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1231) + @types.DiscriminatorRule::Contains(result1581) } 3 => { - let result1232 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1582 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1232) + @types.DiscriminatorRule::Regex(result1582) } 4 => { - let result1233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1235 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1585 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1234 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1584 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1234) + Option::Some(result1584) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1233, literal : lifted1235}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1583, literal : lifted1585}) } 5 => { - let result1236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1586 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1236) + @types.DiscriminatorRule::FieldAbsent(result1586) } _ => panic() } - let lifted1239 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1589 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1238 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1588 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1238) + Option::Some(result1588) } _ => panic() } - let array1241 : Array[String] = []; - for index1242 = 0; index1242 < (mbt_ffi_load32((iter_base) + 52)); index1242 = index1242 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1242 * 8) + let array1591 : Array[String] = []; + for index1592 = 0; index1592 < (mbt_ffi_load32((iter_base) + 52)); index1592 = index1592 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1592 * 8) - let result1240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1590 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1241.push(result1240) + array1591.push(result1590) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1244 : Array[String] = []; - for index1245 = 0; index1245 < (mbt_ffi_load32((iter_base) + 60)); index1245 = index1245 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1245 * 8) + let array1594 : Array[String] = []; + for index1595 = 0; index1595 < (mbt_ffi_load32((iter_base) + 60)); index1595 = index1595 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1595 * 8) - let result1243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1593 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1244.push(result1243) + array1594.push(result1593) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1247 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1597 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1246 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1596 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1246) + Option::Some(result1596) } _ => panic() } - let lifted1250 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1600 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1249 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1599 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -8802,57 +12302,57 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1248 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1598 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1248) + @types.Role::Other(result1598) } _ => panic() } - Option::Some(lifted1249) + Option::Some(lifted1599) } _ => panic() } - array1251.push(@types.UnionBranch::{tag : result1228, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1237, metadata : @types.MetadataEnvelope::{doc : lifted1239, aliases : array1241, examples : array1244, deprecated : lifted1247, role : lifted1250}}) + array1601.push(@types.UnionBranch::{tag : result1578, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1587, metadata : @types.MetadataEnvelope::{doc : lifted1589, aliases : array1591, examples : array1594, deprecated : lifted1597, role : lifted1600}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1251}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1601}) } 32 => { - let lifted1254 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1604 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1603 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1253) + Option::Some(result1603) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1254}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1604}) } 33 => { - let lifted1256 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1606 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1255 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1605 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1255) + Option::Some(result1605) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1256}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1606}) } 34 => { - let lifted1257 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1607 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -8861,11 +12361,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1257) + @types.SchemaTypeBody::FutureType(lifted1607) } 35 => { - let lifted1258 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1608 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -8874,58 +12374,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1258) + @types.SchemaTypeBody::StreamType(lifted1608) } _ => panic() } - let lifted1261 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1611 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1260 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1610 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1260) + Option::Some(result1610) } _ => panic() } - let array1263 : Array[String] = []; - for index1264 = 0; index1264 < (mbt_ffi_load32((iter_base) + 104)); index1264 = index1264 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1264 * 8) + let array1613 : Array[String] = []; + for index1614 = 0; index1614 < (mbt_ffi_load32((iter_base) + 104)); index1614 = index1614 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1614 * 8) - let result1262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1612 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1263.push(result1262) + array1613.push(result1612) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1266 : Array[String] = []; - for index1267 = 0; index1267 < (mbt_ffi_load32((iter_base) + 112)); index1267 = index1267 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1267 * 8) + let array1616 : Array[String] = []; + for index1617 = 0; index1617 < (mbt_ffi_load32((iter_base) + 112)); index1617 = index1617 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1617 * 8) - let result1265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1615 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1266.push(result1265) + array1616.push(result1615) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1269 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1619 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1618 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1268) + Option::Some(result1618) } _ => panic() } - let lifted1272 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1622 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1271 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1621 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -8940,48 +12440,48 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1270 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1620 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1270) + @types.Role::Other(result1620) } _ => panic() } - Option::Some(lifted1271) + Option::Some(lifted1621) } _ => panic() } - array1273.push(@types.SchemaTypeNode::{body : lifted1259, metadata : @types.MetadataEnvelope::{doc : lifted1261, aliases : array1263, examples : array1266, deprecated : lifted1269, role : lifted1272}}) + array1623.push(@types.SchemaTypeNode::{body : lifted1609, metadata : @types.MetadataEnvelope::{doc : lifted1611, aliases : array1613, examples : array1616, deprecated : lifted1619, role : lifted1622}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let array1278 : Array[@types.SchemaTypeDef] = []; - for index1279 = 0; index1279 < (mbt_ffi_load32((iter_base) + 52)); index1279 = index1279 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1279 * 24) + let array1628 : Array[@types.SchemaTypeDef] = []; + for index1629 = 0; index1629 < (mbt_ffi_load32((iter_base) + 52)); index1629 = index1629 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1629 * 24) - let result1275 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1625 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1277 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1627 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1276 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1626 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1276) + Option::Some(result1626) } _ => panic() } - array1278.push(@types.SchemaTypeDef::{id : result1275, name : lifted1277, body : mbt_ffi_load32((iter_base) + 20)}) + array1628.push(@types.SchemaTypeDef::{id : result1625, name : lifted1627, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1310 : Array[@types.SchemaValueNode] = []; - for index1311 = 0; index1311 < (mbt_ffi_load32((iter_base) + 64)); index1311 = index1311 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index1311 * 32) + let array1660 : Array[@types.SchemaValueNode] = []; + for index1661 = 0; index1661 < (mbt_ffi_load32((iter_base) + 64)); index1661 = index1661 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index1661 * 32) - let lifted1309 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1659 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -9032,25 +12532,25 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 12 => { - let result1280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1630 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1280) + @types.SchemaValueNode::StringValue(result1630) } 13 => { - let array1281 : Array[Int] = []; - for index1282 = 0; index1282 < (mbt_ffi_load32((iter_base) + 12)); index1282 = index1282 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1282 * 4) + let array1631 : Array[Int] = []; + for index1632 = 0; index1632 < (mbt_ffi_load32((iter_base) + 12)); index1632 = index1632 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1632 * 4) - array1281.push(mbt_ffi_load32((iter_base) + 0)) + array1631.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1281) + @types.SchemaValueNode::RecordValue(array1631) } 14 => { - let lifted1283 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1633 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -9059,7 +12559,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1283}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1633}) } 15 => { @@ -9067,67 +12567,67 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 16 => { - let array1284 : Array[Bool] = []; - for index1285 = 0; index1285 < (mbt_ffi_load32((iter_base) + 12)); index1285 = index1285 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1285 * 1) + let array1634 : Array[Bool] = []; + for index1635 = 0; index1635 < (mbt_ffi_load32((iter_base) + 12)); index1635 = index1635 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1635 * 1) - array1284.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1634.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1284) + @types.SchemaValueNode::FlagsValue(array1634) } 17 => { - let array1286 : Array[Int] = []; - for index1287 = 0; index1287 < (mbt_ffi_load32((iter_base) + 12)); index1287 = index1287 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1287 * 4) + let array1636 : Array[Int] = []; + for index1637 = 0; index1637 < (mbt_ffi_load32((iter_base) + 12)); index1637 = index1637 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1637 * 4) - array1286.push(mbt_ffi_load32((iter_base) + 0)) + array1636.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1286) + @types.SchemaValueNode::TupleValue(array1636) } 18 => { - let array1288 : Array[Int] = []; - for index1289 = 0; index1289 < (mbt_ffi_load32((iter_base) + 12)); index1289 = index1289 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1289 * 4) + let array1638 : Array[Int] = []; + for index1639 = 0; index1639 < (mbt_ffi_load32((iter_base) + 12)); index1639 = index1639 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1639 * 4) - array1288.push(mbt_ffi_load32((iter_base) + 0)) + array1638.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1288) + @types.SchemaValueNode::ListValue(array1638) } 19 => { - let array1290 : Array[Int] = []; - for index1291 = 0; index1291 < (mbt_ffi_load32((iter_base) + 12)); index1291 = index1291 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1291 * 4) + let array1640 : Array[Int] = []; + for index1641 = 0; index1641 < (mbt_ffi_load32((iter_base) + 12)); index1641 = index1641 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1641 * 4) - array1290.push(mbt_ffi_load32((iter_base) + 0)) + array1640.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1290) + @types.SchemaValueNode::FixedListValue(array1640) } 20 => { - let array1292 : Array[@types.MapEntry] = []; - for index1293 = 0; index1293 < (mbt_ffi_load32((iter_base) + 12)); index1293 = index1293 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1293 * 8) + let array1642 : Array[@types.MapEntry] = []; + for index1643 = 0; index1643 < (mbt_ffi_load32((iter_base) + 12)); index1643 = index1643 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1643 * 8) - array1292.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1642.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1292) + @types.SchemaValueNode::MapValue(array1642) } 21 => { - let lifted1294 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1644 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -9136,14 +12636,14 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1294) + @types.SchemaValueNode::OptionValue(lifted1644) } 22 => { - let lifted1297 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1647 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1295 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1645 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -9152,11 +12652,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::OkValue(lifted1295) + @types.ResultValuePayload::OkValue(lifted1645) } 1 => { - let lifted1296 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1646 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -9165,58 +12665,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1296) + @types.ResultValuePayload::ErrValue(lifted1646) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1297) + @types.SchemaValueNode::ResultValue(lifted1647) } 23 => { - let result1298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1648 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1300 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1650 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1299 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1649 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1299) + Option::Some(result1649) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1298, language : lifted1300}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1648, language : lifted1650}) } 24 => { - let result1301 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1651 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1303 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1653 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1652 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1302) + Option::Some(result1652) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1301, mime_type : lifted1303}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1651, mime_type : lifted1653}) } 25 => { - let result1304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1654 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1304) + @types.SchemaValueNode::PathValue(result1654) } 26 => { - let result1305 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1655 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1305) + @types.SchemaValueNode::UrlValue(result1655) } 27 => { @@ -9228,21 +12728,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 29 => { - let result1306 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1656 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1306}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1656}) } 30 => { - let result1307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1657 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1307, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1657, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1658 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1308}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1658}) } 32 => { @@ -9251,47 +12751,47 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array1310.push(lifted1309) + array1660.push(lifted1659) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - let result1312 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 72), mbt_ffi_load32((iter_base) + 76)) + let result1662 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 72), mbt_ffi_load32((iter_base) + 76)) - let array1314 : Array[String] = []; - for index1315 = 0; index1315 < (mbt_ffi_load32((iter_base) + 84)); index1315 = index1315 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index1315 * 8) + let array1664 : Array[String] = []; + for index1665 = 0; index1665 < (mbt_ffi_load32((iter_base) + 84)); index1665 = index1665 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index1665 * 8) - let result1313 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1663 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1314.push(result1313) + array1664.push(result1663) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) - let array1329 : Array[Array[SpanData]] = []; - for index1330 = 0; index1330 < (mbt_ffi_load32((iter_base) + 92)); index1330 = index1330 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index1330 * 8) + let array1679 : Array[Array[SpanData]] = []; + for index1680 = 0; index1680 < (mbt_ffi_load32((iter_base) + 92)); index1680 = index1680 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index1680 * 8) - let array1327 : Array[SpanData] = []; - for index1328 = 0; index1328 < (mbt_ffi_load32((iter_base) + 4)); index1328 = index1328 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1328 * 80) + let array1677 : Array[SpanData] = []; + for index1678 = 0; index1678 < (mbt_ffi_load32((iter_base) + 4)); index1678 = index1678 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1678 * 80) - let lifted1326 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1676 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1316 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1666 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1318 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted1668 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result1317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result1667 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result1317) + Option::Some(result1667) } _ => panic() } - let lifted1319 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted1669 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -9300,58 +12800,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let array1323 : Array[@context.Attribute] = []; - for index1324 = 0; index1324 < (mbt_ffi_load32((iter_base) + 68)); index1324 = index1324 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1324 * 20) + let array1673 : Array[@context.Attribute] = []; + for index1674 = 0; index1674 < (mbt_ffi_load32((iter_base) + 68)); index1674 = index1674 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1674 * 20) - let result1320 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1670 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1322 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1672 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result1321 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result1321) + @context.AttributeValue::String(result1671) } _ => panic() } - array1323.push(@context.Attribute::{key : result1320, value : lifted1322}) + array1673.push(@context.Attribute::{key : result1670, value : lifted1672}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result1316, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1318, linked_context : lifted1319, attributes : array1323, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result1666, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1668, linked_context : lifted1669, attributes : array1673, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result1325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1675 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result1325}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result1675}) } _ => panic() } - array1327.push(lifted1326) + array1677.push(lifted1676) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array1329.push(array1327) + array1679.push(array1677) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result1146, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1273, defs : array1278, root : mbt_ffi_load32((iter_base) + 56)}, value : @types.SchemaValueTree::{value_nodes : array1310, root : mbt_ffi_load32((iter_base) + 68)}}, trace_id : result1312, trace_states : array1314, invocation_context : array1329}) + AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result1426, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1623, defs : array1628, root : mbt_ffi_load32((iter_base) + 56)}, value : @types.SchemaValueTree::{value_nodes : array1660, root : mbt_ffi_load32((iter_base) + 68)}}, trace_id : result1662, trace_states : array1664, invocation_context : array1679}) } 1 => { - let result1331 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result1681 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result1332 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1682 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let array1459 : Array[@types.SchemaTypeNode] = []; - for index1460 = 0; index1460 < (mbt_ffi_load32((iter_base) + 52)); index1460 = index1460 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1460 * 144) + let array1879 : Array[@types.SchemaTypeNode] = []; + for index1880 = 0; index1880 < (mbt_ffi_load32((iter_base) + 52)); index1880 = index1880 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1880 * 144) - let lifted1445 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1865 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -9362,148 +12862,848 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted1689 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted1684 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted1683 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted1683) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted1686 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted1685 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array1347 : Array[@types.NamedFieldType] = []; - for index1348 = 0; index1348 < (mbt_ffi_load32((iter_base) + 12)); index1348 = index1348 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1348 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result1333 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted1685) + } + _ => panic() + } - let lifted1335 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted1688 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result1334 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1687 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1334) + Option::Some(result1687) + } + _ => panic() } - _ => panic() - } - let array1337 : Array[String] = []; - for index1338 = 0; index1338 < (mbt_ffi_load32((iter_base) + 28)); index1338 = index1338 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1338 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted1684, max : lifted1686, unit : lifted1688}) + } + _ => panic() + } - let result1336 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted1689) + } + 3 => { - array1337.push(result1336) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted1696 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array1340 : Array[String] = []; - for index1341 = 0; index1341 < (mbt_ffi_load32((iter_base) + 36)); index1341 = index1341 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1341 * 8) + let lifted1691 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result1339 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted1690 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array1340.push(result1339) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted1343 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result1342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result1342) + Option::Some(lifted1690) + } + _ => panic() } - _ => panic() - } - let lifted1346 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted1693 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted1345 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted1692 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - let result1344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result1344) - } - _ => panic() + Option::Some(lifted1692) } - - Option::Some(lifted1345) + _ => panic() } - _ => panic() - } - - array1347.push(@types.NamedFieldType::{name : result1333, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1335, aliases : array1337, examples : array1340, deprecated : lifted1343, role : lifted1346}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array1347) + let lifted1695 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1694 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1694) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1691, max : lifted1693, unit : lifted1695}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1696) + } + 4 => { + + let lifted1703 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1698 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1697 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1697) + } + _ => panic() + } + + let lifted1700 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1699 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1699) + } + _ => panic() + } + + let lifted1702 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1701 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1701) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1698, max : lifted1700, unit : lifted1702}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1703) + } + 5 => { + + let lifted1710 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1705 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1704 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1704) + } + _ => panic() + } + + let lifted1707 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1706 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1706) + } + _ => panic() + } + + let lifted1709 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1708 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1708) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1705, max : lifted1707, unit : lifted1709}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1710) + } + 6 => { + + let lifted1717 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1712 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1711 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1711) + } + _ => panic() + } + + let lifted1714 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1713 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1713) + } + _ => panic() + } + + let lifted1716 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1715 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1715) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1712, max : lifted1714, unit : lifted1716}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1717) + } + 7 => { + + let lifted1724 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1719 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1718 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1718) + } + _ => panic() + } + + let lifted1721 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1720 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1720) + } + _ => panic() + } + + let lifted1723 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1722 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1722) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1719, max : lifted1721, unit : lifted1723}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1724) + } + 8 => { + + let lifted1731 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1726 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1725 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1725) + } + _ => panic() + } + + let lifted1728 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1727 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1727) + } + _ => panic() + } + + let lifted1730 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1729 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1729) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1726, max : lifted1728, unit : lifted1730}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1731) + } + 9 => { + + let lifted1738 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1733 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1732 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1732) + } + _ => panic() + } + + let lifted1735 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1734 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1734) + } + _ => panic() + } + + let lifted1737 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1736 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1736) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1733, max : lifted1735, unit : lifted1737}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1738) + } + 10 => { + + let lifted1745 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1740 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1739 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1739) + } + _ => panic() + } + + let lifted1742 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1741 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1741) + } + _ => panic() + } + + let lifted1744 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1743 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1743) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1740, max : lifted1742, unit : lifted1744}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1745) + } + 11 => { + + let lifted1752 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1747 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1746 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1746) + } + _ => panic() + } + + let lifted1749 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1748 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1748) + } + _ => panic() + } + + let lifted1751 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1750 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1750) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1747, max : lifted1749, unit : lifted1751}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1752) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array1767 : Array[@types.NamedFieldType] = []; + for index1768 = 0; index1768 < (mbt_ffi_load32((iter_base) + 12)); index1768 = index1768 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1768 * 68) + + let result1753 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1755 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result1754 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result1754) + } + _ => panic() + } + + let array1757 : Array[String] = []; + for index1758 = 0; index1758 < (mbt_ffi_load32((iter_base) + 28)); index1758 = index1758 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1758 * 8) + + let result1756 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1757.push(result1756) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array1760 : Array[String] = []; + for index1761 = 0; index1761 < (mbt_ffi_load32((iter_base) + 36)); index1761 = index1761 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1761 * 8) + + let result1759 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1760.push(result1759) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted1763 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result1762 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result1762) + } + _ => panic() + } + + let lifted1766 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted1765 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result1764 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result1764) + } + _ => panic() + } + + Option::Some(lifted1765) + } + _ => panic() + } + + array1767.push(@types.NamedFieldType::{name : result1753, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1755, aliases : array1757, examples : array1760, deprecated : lifted1763, role : lifted1766}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array1767) } 15 => { - let array1364 : Array[@types.VariantCaseType] = []; - for index1365 = 0; index1365 < (mbt_ffi_load32((iter_base) + 12)); index1365 = index1365 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1365 * 72) + let array1784 : Array[@types.VariantCaseType] = []; + for index1785 = 0; index1785 < (mbt_ffi_load32((iter_base) + 12)); index1785 = index1785 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1785 * 72) - let result1349 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1769 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1350 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1770 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -9512,53 +13712,53 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1352 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1772 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1351 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1771 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1351) + Option::Some(result1771) } _ => panic() } - let array1354 : Array[String] = []; - for index1355 = 0; index1355 < (mbt_ffi_load32((iter_base) + 32)); index1355 = index1355 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1355 * 8) + let array1774 : Array[String] = []; + for index1775 = 0; index1775 < (mbt_ffi_load32((iter_base) + 32)); index1775 = index1775 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1775 * 8) - let result1353 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1773 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1354.push(result1353) + array1774.push(result1773) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1357 : Array[String] = []; - for index1358 = 0; index1358 < (mbt_ffi_load32((iter_base) + 40)); index1358 = index1358 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1358 * 8) + let array1777 : Array[String] = []; + for index1778 = 0; index1778 < (mbt_ffi_load32((iter_base) + 40)); index1778 = index1778 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1778 * 8) - let result1356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1776 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1357.push(result1356) + array1777.push(result1776) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1360 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1780 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1359 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1779 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1359) + Option::Some(result1779) } _ => panic() } - let lifted1363 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1783 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1362 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1782 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -9573,63 +13773,63 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1361 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1781 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1361) + @types.Role::Other(result1781) } _ => panic() } - Option::Some(lifted1362) + Option::Some(lifted1782) } _ => panic() } - array1364.push(@types.VariantCaseType::{name : result1349, payload : lifted1350, metadata : @types.MetadataEnvelope::{doc : lifted1352, aliases : array1354, examples : array1357, deprecated : lifted1360, role : lifted1363}}) + array1784.push(@types.VariantCaseType::{name : result1769, payload : lifted1770, metadata : @types.MetadataEnvelope::{doc : lifted1772, aliases : array1774, examples : array1777, deprecated : lifted1780, role : lifted1783}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1364) + @types.SchemaTypeBody::VariantType(array1784) } 16 => { - let array1367 : Array[String] = []; - for index1368 = 0; index1368 < (mbt_ffi_load32((iter_base) + 12)); index1368 = index1368 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1368 * 8) + let array1787 : Array[String] = []; + for index1788 = 0; index1788 < (mbt_ffi_load32((iter_base) + 12)); index1788 = index1788 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1788 * 8) - let result1366 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1786 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1367.push(result1366) + array1787.push(result1786) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1367) + @types.SchemaTypeBody::EnumType(array1787) } 17 => { - let array1370 : Array[String] = []; - for index1371 = 0; index1371 < (mbt_ffi_load32((iter_base) + 12)); index1371 = index1371 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1371 * 8) + let array1790 : Array[String] = []; + for index1791 = 0; index1791 < (mbt_ffi_load32((iter_base) + 12)); index1791 = index1791 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1791 * 8) - let result1369 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1789 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1370.push(result1369) + array1790.push(result1789) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1370) + @types.SchemaTypeBody::FlagsType(array1790) } 18 => { - let array1372 : Array[Int] = []; - for index1373 = 0; index1373 < (mbt_ffi_load32((iter_base) + 12)); index1373 = index1373 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1373 * 4) + let array1792 : Array[Int] = []; + for index1793 = 0; index1793 < (mbt_ffi_load32((iter_base) + 12)); index1793 = index1793 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1793 * 4) - array1372.push(mbt_ffi_load32((iter_base) + 0)) + array1792.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1372) + @types.SchemaTypeBody::TupleType(array1792) } 19 => { @@ -9649,7 +13849,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 23 => { - let lifted1374 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1794 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -9658,7 +13858,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1375 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1795 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -9667,30 +13867,30 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1374, err : lifted1375}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1794, err : lifted1795}) } 24 => { - let lifted1379 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1799 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1377 : Array[String] = []; - for index1378 = 0; index1378 < (mbt_ffi_load32((iter_base) + 16)); index1378 = index1378 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1378 * 8) + let array1797 : Array[String] = []; + for index1798 = 0; index1798 < (mbt_ffi_load32((iter_base) + 16)); index1798 = index1798 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1798 * 8) - let result1376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1796 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1377.push(result1376) + array1797.push(result1796) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1377) + Option::Some(array1797) } _ => panic() } - let lifted1380 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1800 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -9699,7 +13899,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1381 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1801 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -9708,41 +13908,41 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1383 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1803 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1802 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1382) + Option::Some(result1802) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1379, min_length : lifted1380, max_length : lifted1381, regex : lifted1383}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1799, min_length : lifted1800, max_length : lifted1801, regex : lifted1803}) } 25 => { - let lifted1387 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1807 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1385 : Array[String] = []; - for index1386 = 0; index1386 < (mbt_ffi_load32((iter_base) + 16)); index1386 = index1386 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1386 * 8) + let array1805 : Array[String] = []; + for index1806 = 0; index1806 < (mbt_ffi_load32((iter_base) + 16)); index1806 = index1806 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1806 * 8) - let result1384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1804 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1385.push(result1384) + array1805.push(result1804) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1385) + Option::Some(array1805) } _ => panic() } - let lifted1388 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1808 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -9751,7 +13951,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1389 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1809 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -9760,91 +13960,91 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1387, min_bytes : lifted1388, max_bytes : lifted1389}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1807, min_bytes : lifted1808, max_bytes : lifted1809}) } 26 => { - let lifted1393 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1813 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1391 : Array[String] = []; - for index1392 = 0; index1392 < (mbt_ffi_load32((iter_base) + 20)); index1392 = index1392 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1392 * 8) + let array1811 : Array[String] = []; + for index1812 = 0; index1812 < (mbt_ffi_load32((iter_base) + 20)); index1812 = index1812 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1812 * 8) - let result1390 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1810 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1391.push(result1390) + array1811.push(result1810) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1391) + Option::Some(array1811) } _ => panic() } - let lifted1397 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1817 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1395 : Array[String] = []; - for index1396 = 0; index1396 < (mbt_ffi_load32((iter_base) + 32)); index1396 = index1396 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1396 * 8) + let array1815 : Array[String] = []; + for index1816 = 0; index1816 < (mbt_ffi_load32((iter_base) + 32)); index1816 = index1816 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1816 * 8) - let result1394 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1814 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1395.push(result1394) + array1815.push(result1814) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1395) + Option::Some(array1815) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1393, allowed_extensions : lifted1397}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1813, allowed_extensions : lifted1817}) } 27 => { - let lifted1401 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1821 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1399 : Array[String] = []; - for index1400 = 0; index1400 < (mbt_ffi_load32((iter_base) + 16)); index1400 = index1400 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1400 * 8) + let array1819 : Array[String] = []; + for index1820 = 0; index1820 < (mbt_ffi_load32((iter_base) + 16)); index1820 = index1820 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1820 * 8) - let result1398 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1818 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1399.push(result1398) + array1819.push(result1818) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1399) + Option::Some(array1819) } _ => panic() } - let lifted1405 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1825 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1403 : Array[String] = []; - for index1404 = 0; index1404 < (mbt_ffi_load32((iter_base) + 28)); index1404 = index1404 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1404 * 8) + let array1823 : Array[String] = []; + for index1824 = 0; index1824 < (mbt_ffi_load32((iter_base) + 28)); index1824 = index1824 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1824 * 8) - let result1402 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1822 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1403.push(result1402) + array1823.push(result1822) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1403) + Option::Some(array1823) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1401, allowed_hosts : lifted1405}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1821, allowed_hosts : lifted1825}) } 28 => { @@ -9856,148 +14056,148 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 30 => { - let result1406 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1826 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1408 : Array[String] = []; - for index1409 = 0; index1409 < (mbt_ffi_load32((iter_base) + 20)); index1409 = index1409 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1409 * 8) + let array1828 : Array[String] = []; + for index1829 = 0; index1829 < (mbt_ffi_load32((iter_base) + 20)); index1829 = index1829 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1829 * 8) - let result1407 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1827 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1408.push(result1407) + array1828.push(result1827) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1411 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1831 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1410 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1830 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1410}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1830}) } _ => panic() } - let lifted1413 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1833 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1412 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1832 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1412}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1832}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1406, allowed_suffixes : array1408, min : lifted1411, max : lifted1413}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1826, allowed_suffixes : array1828, min : lifted1831, max : lifted1833}) } 31 => { - let array1437 : Array[@types.UnionBranch] = []; - for index1438 = 0; index1438 < (mbt_ffi_load32((iter_base) + 12)); index1438 = index1438 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1438 * 92) + let array1857 : Array[@types.UnionBranch] = []; + for index1858 = 0; index1858 < (mbt_ffi_load32((iter_base) + 12)); index1858 = index1858 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1858 * 92) - let result1414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1834 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1423 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1843 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1835 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1415) + @types.DiscriminatorRule::Prefix(result1835) } 1 => { - let result1416 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1836 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1416) + @types.DiscriminatorRule::Suffix(result1836) } 2 => { - let result1417 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1837 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1417) + @types.DiscriminatorRule::Contains(result1837) } 3 => { - let result1418 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1838 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1418) + @types.DiscriminatorRule::Regex(result1838) } 4 => { - let result1419 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1839 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1421 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1841 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1840 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1420) + Option::Some(result1840) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1419, literal : lifted1421}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1839, literal : lifted1841}) } 5 => { - let result1422 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1842 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1422) + @types.DiscriminatorRule::FieldAbsent(result1842) } _ => panic() } - let lifted1425 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1845 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1424 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1844 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1424) + Option::Some(result1844) } _ => panic() } - let array1427 : Array[String] = []; - for index1428 = 0; index1428 < (mbt_ffi_load32((iter_base) + 52)); index1428 = index1428 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1428 * 8) + let array1847 : Array[String] = []; + for index1848 = 0; index1848 < (mbt_ffi_load32((iter_base) + 52)); index1848 = index1848 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1848 * 8) - let result1426 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1846 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1427.push(result1426) + array1847.push(result1846) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1430 : Array[String] = []; - for index1431 = 0; index1431 < (mbt_ffi_load32((iter_base) + 60)); index1431 = index1431 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1431 * 8) + let array1850 : Array[String] = []; + for index1851 = 0; index1851 < (mbt_ffi_load32((iter_base) + 60)); index1851 = index1851 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1851 * 8) - let result1429 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1849 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1430.push(result1429) + array1850.push(result1849) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1433 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1853 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1432 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1852 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1432) + Option::Some(result1852) } _ => panic() } - let lifted1436 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1856 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1435 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1855 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -10012,57 +14212,57 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1434 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1854 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1434) + @types.Role::Other(result1854) } _ => panic() } - Option::Some(lifted1435) + Option::Some(lifted1855) } _ => panic() } - array1437.push(@types.UnionBranch::{tag : result1414, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1423, metadata : @types.MetadataEnvelope::{doc : lifted1425, aliases : array1427, examples : array1430, deprecated : lifted1433, role : lifted1436}}) + array1857.push(@types.UnionBranch::{tag : result1834, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1843, metadata : @types.MetadataEnvelope::{doc : lifted1845, aliases : array1847, examples : array1850, deprecated : lifted1853, role : lifted1856}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1437}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1857}) } 32 => { - let lifted1440 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1860 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1439 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1859 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1439) + Option::Some(result1859) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1440}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1860}) } 33 => { - let lifted1442 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1862 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1441 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1861 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1441) + Option::Some(result1861) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1442}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1862}) } 34 => { - let lifted1443 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1863 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -10071,11 +14271,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1443) + @types.SchemaTypeBody::FutureType(lifted1863) } 35 => { - let lifted1444 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1864 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -10084,58 +14284,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1444) + @types.SchemaTypeBody::StreamType(lifted1864) } _ => panic() } - let lifted1447 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1867 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1446 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1866 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1446) + Option::Some(result1866) } _ => panic() } - let array1449 : Array[String] = []; - for index1450 = 0; index1450 < (mbt_ffi_load32((iter_base) + 104)); index1450 = index1450 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1450 * 8) + let array1869 : Array[String] = []; + for index1870 = 0; index1870 < (mbt_ffi_load32((iter_base) + 104)); index1870 = index1870 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1870 * 8) - let result1448 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1868 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1449.push(result1448) + array1869.push(result1868) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1452 : Array[String] = []; - for index1453 = 0; index1453 < (mbt_ffi_load32((iter_base) + 112)); index1453 = index1453 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1453 * 8) + let array1872 : Array[String] = []; + for index1873 = 0; index1873 < (mbt_ffi_load32((iter_base) + 112)); index1873 = index1873 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1873 * 8) - let result1451 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1871 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1452.push(result1451) + array1872.push(result1871) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1455 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1875 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1454 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1874 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1454) + Option::Some(result1874) } _ => panic() } - let lifted1458 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1878 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1457 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1877 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -10150,48 +14350,48 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1456 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1876 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1456) + @types.Role::Other(result1876) } _ => panic() } - Option::Some(lifted1457) + Option::Some(lifted1877) } _ => panic() } - array1459.push(@types.SchemaTypeNode::{body : lifted1445, metadata : @types.MetadataEnvelope::{doc : lifted1447, aliases : array1449, examples : array1452, deprecated : lifted1455, role : lifted1458}}) + array1879.push(@types.SchemaTypeNode::{body : lifted1865, metadata : @types.MetadataEnvelope::{doc : lifted1867, aliases : array1869, examples : array1872, deprecated : lifted1875, role : lifted1878}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1464 : Array[@types.SchemaTypeDef] = []; - for index1465 = 0; index1465 < (mbt_ffi_load32((iter_base) + 60)); index1465 = index1465 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1465 * 24) + let array1884 : Array[@types.SchemaTypeDef] = []; + for index1885 = 0; index1885 < (mbt_ffi_load32((iter_base) + 60)); index1885 = index1885 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1885 * 24) - let result1461 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1881 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1463 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1883 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1462 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1882 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1462) + Option::Some(result1882) } _ => panic() } - array1464.push(@types.SchemaTypeDef::{id : result1461, name : lifted1463, body : mbt_ffi_load32((iter_base) + 20)}) + array1884.push(@types.SchemaTypeDef::{id : result1881, name : lifted1883, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let array1496 : Array[@types.SchemaValueNode] = []; - for index1497 = 0; index1497 < (mbt_ffi_load32((iter_base) + 72)); index1497 = index1497 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index1497 * 32) + let array1916 : Array[@types.SchemaValueNode] = []; + for index1917 = 0; index1917 < (mbt_ffi_load32((iter_base) + 72)); index1917 = index1917 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index1917 * 32) - let lifted1495 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1915 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -10242,25 +14442,25 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 12 => { - let result1466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1886 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1466) + @types.SchemaValueNode::StringValue(result1886) } 13 => { - let array1467 : Array[Int] = []; - for index1468 = 0; index1468 < (mbt_ffi_load32((iter_base) + 12)); index1468 = index1468 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1468 * 4) + let array1887 : Array[Int] = []; + for index1888 = 0; index1888 < (mbt_ffi_load32((iter_base) + 12)); index1888 = index1888 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1888 * 4) - array1467.push(mbt_ffi_load32((iter_base) + 0)) + array1887.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1467) + @types.SchemaValueNode::RecordValue(array1887) } 14 => { - let lifted1469 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1889 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -10269,7 +14469,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1469}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1889}) } 15 => { @@ -10277,67 +14477,67 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 16 => { - let array1470 : Array[Bool] = []; - for index1471 = 0; index1471 < (mbt_ffi_load32((iter_base) + 12)); index1471 = index1471 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1471 * 1) + let array1890 : Array[Bool] = []; + for index1891 = 0; index1891 < (mbt_ffi_load32((iter_base) + 12)); index1891 = index1891 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1891 * 1) - array1470.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1890.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1470) + @types.SchemaValueNode::FlagsValue(array1890) } 17 => { - let array1472 : Array[Int] = []; - for index1473 = 0; index1473 < (mbt_ffi_load32((iter_base) + 12)); index1473 = index1473 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1473 * 4) + let array1892 : Array[Int] = []; + for index1893 = 0; index1893 < (mbt_ffi_load32((iter_base) + 12)); index1893 = index1893 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1893 * 4) - array1472.push(mbt_ffi_load32((iter_base) + 0)) + array1892.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1472) + @types.SchemaValueNode::TupleValue(array1892) } 18 => { - let array1474 : Array[Int] = []; - for index1475 = 0; index1475 < (mbt_ffi_load32((iter_base) + 12)); index1475 = index1475 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1475 * 4) + let array1894 : Array[Int] = []; + for index1895 = 0; index1895 < (mbt_ffi_load32((iter_base) + 12)); index1895 = index1895 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1895 * 4) - array1474.push(mbt_ffi_load32((iter_base) + 0)) + array1894.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1474) + @types.SchemaValueNode::ListValue(array1894) } 19 => { - let array1476 : Array[Int] = []; - for index1477 = 0; index1477 < (mbt_ffi_load32((iter_base) + 12)); index1477 = index1477 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1477 * 4) + let array1896 : Array[Int] = []; + for index1897 = 0; index1897 < (mbt_ffi_load32((iter_base) + 12)); index1897 = index1897 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1897 * 4) - array1476.push(mbt_ffi_load32((iter_base) + 0)) + array1896.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1476) + @types.SchemaValueNode::FixedListValue(array1896) } 20 => { - let array1478 : Array[@types.MapEntry] = []; - for index1479 = 0; index1479 < (mbt_ffi_load32((iter_base) + 12)); index1479 = index1479 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1479 * 8) + let array1898 : Array[@types.MapEntry] = []; + for index1899 = 0; index1899 < (mbt_ffi_load32((iter_base) + 12)); index1899 = index1899 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1899 * 8) - array1478.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1898.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1478) + @types.SchemaValueNode::MapValue(array1898) } 21 => { - let lifted1480 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1900 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -10346,14 +14546,14 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1480) + @types.SchemaValueNode::OptionValue(lifted1900) } 22 => { - let lifted1483 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1903 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1481 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1901 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -10362,11 +14562,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::OkValue(lifted1481) + @types.ResultValuePayload::OkValue(lifted1901) } 1 => { - let lifted1482 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1902 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -10375,58 +14575,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1482) + @types.ResultValuePayload::ErrValue(lifted1902) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1483) + @types.SchemaValueNode::ResultValue(lifted1903) } 23 => { - let result1484 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1904 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1486 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1906 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1485 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1905 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1485) + Option::Some(result1905) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1484, language : lifted1486}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1904, language : lifted1906}) } 24 => { - let result1487 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1907 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1489 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1909 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1488 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1908 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1488) + Option::Some(result1908) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1487, mime_type : lifted1489}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1907, mime_type : lifted1909}) } 25 => { - let result1490 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1910 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1490) + @types.SchemaValueNode::PathValue(result1910) } 26 => { - let result1491 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1911 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1491) + @types.SchemaValueNode::UrlValue(result1911) } 27 => { @@ -10438,21 +14638,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 29 => { - let result1492 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1912 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1492}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1912}) } 30 => { - let result1493 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1913 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1493, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1913, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1494 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1914 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1494}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1914}) } 32 => { @@ -10461,47 +14661,47 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array1496.push(lifted1495) + array1916.push(lifted1915) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - let result1498 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) + let result1918 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) - let array1500 : Array[String] = []; - for index1501 = 0; index1501 < (mbt_ffi_load32((iter_base) + 92)); index1501 = index1501 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index1501 * 8) + let array1920 : Array[String] = []; + for index1921 = 0; index1921 < (mbt_ffi_load32((iter_base) + 92)); index1921 = index1921 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index1921 * 8) - let result1499 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1919 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1500.push(result1499) + array1920.push(result1919) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - let array1515 : Array[Array[SpanData]] = []; - for index1516 = 0; index1516 < (mbt_ffi_load32((iter_base) + 100)); index1516 = index1516 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index1516 * 8) + let array1935 : Array[Array[SpanData]] = []; + for index1936 = 0; index1936 < (mbt_ffi_load32((iter_base) + 100)); index1936 = index1936 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index1936 * 8) - let array1513 : Array[SpanData] = []; - for index1514 = 0; index1514 < (mbt_ffi_load32((iter_base) + 4)); index1514 = index1514 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1514 * 80) + let array1933 : Array[SpanData] = []; + for index1934 = 0; index1934 < (mbt_ffi_load32((iter_base) + 4)); index1934 = index1934 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1934 * 80) - let lifted1512 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1932 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1502 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1922 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1504 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted1924 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result1503 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result1923 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result1503) + Option::Some(result1923) } _ => panic() } - let lifted1505 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted1925 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -10510,46 +14710,46 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let array1509 : Array[@context.Attribute] = []; - for index1510 = 0; index1510 < (mbt_ffi_load32((iter_base) + 68)); index1510 = index1510 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1510 * 20) + let array1929 : Array[@context.Attribute] = []; + for index1930 = 0; index1930 < (mbt_ffi_load32((iter_base) + 68)); index1930 = index1930 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1930 * 20) - let result1506 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1926 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1508 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1928 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result1507 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1927 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result1507) + @context.AttributeValue::String(result1927) } _ => panic() } - array1509.push(@context.Attribute::{key : result1506, value : lifted1508}) + array1929.push(@context.Attribute::{key : result1926, value : lifted1928}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result1502, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1504, linked_context : lifted1505, attributes : array1509, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result1922, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1924, linked_context : lifted1925, attributes : array1929, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result1511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1931 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result1511}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result1931}) } _ => panic() } - array1513.push(lifted1512) + array1933.push(lifted1932) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array1515.push(array1513) + array1935.push(array1933) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 96)) - AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result1331, method_name : result1332, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1459, defs : array1464, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array1496, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result1498, trace_states : array1500, invocation_context : array1515}) + AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result1681, method_name : result1682, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1879, defs : array1884, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array1916, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result1918, trace_states : array1920, invocation_context : array1935}) } 2 => { @@ -10557,17 +14757,17 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1517 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result1937 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result1518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1938 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result1517, mime_type : result1518}}) + AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result1937, mime_type : result1938}}) } 4 => { - let result1519 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result1939 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result1519}) + AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result1939}) } 5 => { @@ -10576,18 +14776,18 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - PublicOplogEntry::AgentInvocationStarted(AgentInvocationStartedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, invocation : lifted1520}) + PublicOplogEntry::AgentInvocationStarted(AgentInvocationStartedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, invocation : lifted1940}) } 5 => { - let lifted1857 = match (mbt_ffi_load8_u((iter_base) + 24)) { + let lifted2417 = match (mbt_ffi_load8_u((iter_base) + 24)) { 0 => { - let array1647 : Array[@types.SchemaTypeNode] = []; - for index1648 = 0; index1648 < (mbt_ffi_load32((iter_base) + 32)); index1648 = index1648 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1648 * 144) + let array2137 : Array[@types.SchemaTypeNode] = []; + for index2138 = 0; index2138 < (mbt_ffi_load32((iter_base) + 32)); index2138 = index2138 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2138 * 144) - let lifted1633 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2123 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -10598,148 +14798,848 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted1947 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted1942 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted1941 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted1941) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted1944 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted1943 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array1535 : Array[@types.NamedFieldType] = []; - for index1536 = 0; index1536 < (mbt_ffi_load32((iter_base) + 12)); index1536 = index1536 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1536 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result1521 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted1943) + } + _ => panic() + } - let lifted1523 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted1946 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result1522 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1945 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1522) + Option::Some(result1945) + } + _ => panic() } - _ => panic() - } - let array1525 : Array[String] = []; - for index1526 = 0; index1526 < (mbt_ffi_load32((iter_base) + 28)); index1526 = index1526 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1526 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted1942, max : lifted1944, unit : lifted1946}) + } + _ => panic() + } - let result1524 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted1947) + } + 3 => { - array1525.push(result1524) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted1954 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array1528 : Array[String] = []; - for index1529 = 0; index1529 < (mbt_ffi_load32((iter_base) + 36)); index1529 = index1529 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1529 * 8) + let lifted1949 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result1527 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted1948 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array1528.push(result1527) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted1531 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result1530 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result1530) + Option::Some(lifted1948) + } + _ => panic() } - _ => panic() - } - let lifted1534 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted1951 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted1533 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted1950 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 2 => { + + Option::Some(lifted1950) + } + _ => panic() + } + + let lifted1953 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1952 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1952) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1949, max : lifted1951, unit : lifted1953}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1954) + } + 4 => { + + let lifted1961 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1956 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1955 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1955) + } + _ => panic() + } + + let lifted1958 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1957 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1957) + } + _ => panic() + } + + let lifted1960 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1959 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1959) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1956, max : lifted1958, unit : lifted1960}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1961) + } + 5 => { + + let lifted1968 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1963 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1962 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1962) + } + _ => panic() + } + + let lifted1965 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1964 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1964) + } + _ => panic() + } + + let lifted1967 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1966 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1966) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1963, max : lifted1965, unit : lifted1967}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1968) + } + 6 => { + + let lifted1975 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1970 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1969 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1969) + } + _ => panic() + } + + let lifted1972 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1971 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1971) + } + _ => panic() + } + + let lifted1974 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1973 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1973) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1970, max : lifted1972, unit : lifted1974}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1975) + } + 7 => { + + let lifted1982 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1977 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1976 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1976) + } + _ => panic() + } + + let lifted1979 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1978 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1978) + } + _ => panic() + } + + let lifted1981 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1980 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1980) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1977, max : lifted1979, unit : lifted1981}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1982) + } + 8 => { + + let lifted1989 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1984 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1983 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1983) + } + _ => panic() + } + + let lifted1986 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1985 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1985) + } + _ => panic() + } + + let lifted1988 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1987 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1987) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1984, max : lifted1986, unit : lifted1988}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1989) + } + 9 => { + + let lifted1996 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1991 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1990 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1990) + } + _ => panic() + } + + let lifted1993 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1992 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1992) + } + _ => panic() + } + + let lifted1995 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1994 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1994) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1991, max : lifted1993, unit : lifted1995}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1996) + } + 10 => { + + let lifted2003 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1998 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1997 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1997) + } + _ => panic() + } + + let lifted2000 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1999 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1999) + } + _ => panic() + } + + let lifted2002 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2001 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2001) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1998, max : lifted2000, unit : lifted2002}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2003) + } + 11 => { + + let lifted2010 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2005 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2004 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2004) + } + _ => panic() + } + + let lifted2007 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2006 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2006) + } + _ => panic() + } + + let lifted2009 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2008 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2008) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2005, max : lifted2007, unit : lifted2009}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2010) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array2025 : Array[@types.NamedFieldType] = []; + for index2026 = 0; index2026 < (mbt_ffi_load32((iter_base) + 12)); index2026 = index2026 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2026 * 68) + + let result2011 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted2013 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result2012 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result2012) + } + _ => panic() + } + + let array2015 : Array[String] = []; + for index2016 = 0; index2016 < (mbt_ffi_load32((iter_base) + 28)); index2016 = index2016 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2016 * 8) + + let result2014 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array2015.push(result2014) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array2018 : Array[String] = []; + for index2019 = 0; index2019 < (mbt_ffi_load32((iter_base) + 36)); index2019 = index2019 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index2019 * 8) + + let result2017 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array2018.push(result2017) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted2021 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result2020 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result2020) + } + _ => panic() + } + + let lifted2024 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted2023 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { @types.Role::UnstructuredBinary } 3 => { - let result1532 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result2022 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1532) + @types.Role::Other(result2022) } _ => panic() } - Option::Some(lifted1533) + Option::Some(lifted2023) } _ => panic() } - array1535.push(@types.NamedFieldType::{name : result1521, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1523, aliases : array1525, examples : array1528, deprecated : lifted1531, role : lifted1534}}) + array2025.push(@types.NamedFieldType::{name : result2011, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted2013, aliases : array2015, examples : array2018, deprecated : lifted2021, role : lifted2024}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array1535) + @types.SchemaTypeBody::RecordType(array2025) } 15 => { - let array1552 : Array[@types.VariantCaseType] = []; - for index1553 = 0; index1553 < (mbt_ffi_load32((iter_base) + 12)); index1553 = index1553 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1553 * 72) + let array2042 : Array[@types.VariantCaseType] = []; + for index2043 = 0; index2043 < (mbt_ffi_load32((iter_base) + 12)); index2043 = index2043 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2043 * 72) - let result1537 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2027 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1538 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2028 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -10748,53 +15648,53 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1540 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2030 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1539 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2029 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1539) + Option::Some(result2029) } _ => panic() } - let array1542 : Array[String] = []; - for index1543 = 0; index1543 < (mbt_ffi_load32((iter_base) + 32)); index1543 = index1543 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1543 * 8) + let array2032 : Array[String] = []; + for index2033 = 0; index2033 < (mbt_ffi_load32((iter_base) + 32)); index2033 = index2033 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2033 * 8) - let result1541 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2031 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1542.push(result1541) + array2032.push(result2031) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1545 : Array[String] = []; - for index1546 = 0; index1546 < (mbt_ffi_load32((iter_base) + 40)); index1546 = index1546 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1546 * 8) + let array2035 : Array[String] = []; + for index2036 = 0; index2036 < (mbt_ffi_load32((iter_base) + 40)); index2036 = index2036 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2036 * 8) - let result1544 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2034 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1545.push(result1544) + array2035.push(result2034) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1548 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted2038 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1547 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2037 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1547) + Option::Some(result2037) } _ => panic() } - let lifted1551 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2041 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1550 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted2040 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -10809,63 +15709,63 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1549 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result2039 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1549) + @types.Role::Other(result2039) } _ => panic() } - Option::Some(lifted1550) + Option::Some(lifted2040) } _ => panic() } - array1552.push(@types.VariantCaseType::{name : result1537, payload : lifted1538, metadata : @types.MetadataEnvelope::{doc : lifted1540, aliases : array1542, examples : array1545, deprecated : lifted1548, role : lifted1551}}) + array2042.push(@types.VariantCaseType::{name : result2027, payload : lifted2028, metadata : @types.MetadataEnvelope::{doc : lifted2030, aliases : array2032, examples : array2035, deprecated : lifted2038, role : lifted2041}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1552) + @types.SchemaTypeBody::VariantType(array2042) } 16 => { - let array1555 : Array[String] = []; - for index1556 = 0; index1556 < (mbt_ffi_load32((iter_base) + 12)); index1556 = index1556 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1556 * 8) + let array2045 : Array[String] = []; + for index2046 = 0; index2046 < (mbt_ffi_load32((iter_base) + 12)); index2046 = index2046 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2046 * 8) - let result1554 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2044 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1555.push(result1554) + array2045.push(result2044) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1555) + @types.SchemaTypeBody::EnumType(array2045) } 17 => { - let array1558 : Array[String] = []; - for index1559 = 0; index1559 < (mbt_ffi_load32((iter_base) + 12)); index1559 = index1559 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1559 * 8) + let array2048 : Array[String] = []; + for index2049 = 0; index2049 < (mbt_ffi_load32((iter_base) + 12)); index2049 = index2049 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2049 * 8) - let result1557 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2047 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1558.push(result1557) + array2048.push(result2047) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1558) + @types.SchemaTypeBody::FlagsType(array2048) } 18 => { - let array1560 : Array[Int] = []; - for index1561 = 0; index1561 < (mbt_ffi_load32((iter_base) + 12)); index1561 = index1561 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1561 * 4) + let array2050 : Array[Int] = []; + for index2051 = 0; index2051 < (mbt_ffi_load32((iter_base) + 12)); index2051 = index2051 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2051 * 4) - array1560.push(mbt_ffi_load32((iter_base) + 0)) + array2050.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1560) + @types.SchemaTypeBody::TupleType(array2050) } 19 => { @@ -10885,7 +15785,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 23 => { - let lifted1562 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2052 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -10894,7 +15794,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1563 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2053 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -10903,30 +15803,30 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1562, err : lifted1563}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted2052, err : lifted2053}) } 24 => { - let lifted1567 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2057 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1565 : Array[String] = []; - for index1566 = 0; index1566 < (mbt_ffi_load32((iter_base) + 16)); index1566 = index1566 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1566 * 8) + let array2055 : Array[String] = []; + for index2056 = 0; index2056 < (mbt_ffi_load32((iter_base) + 16)); index2056 = index2056 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2056 * 8) - let result1564 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2054 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1565.push(result1564) + array2055.push(result2054) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1565) + Option::Some(array2055) } _ => panic() } - let lifted1568 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2058 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -10935,7 +15835,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1569 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2059 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -10944,41 +15844,41 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1571 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2061 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1570 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2060 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1570) + Option::Some(result2060) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1567, min_length : lifted1568, max_length : lifted1569, regex : lifted1571}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted2057, min_length : lifted2058, max_length : lifted2059, regex : lifted2061}) } 25 => { - let lifted1575 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2065 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1573 : Array[String] = []; - for index1574 = 0; index1574 < (mbt_ffi_load32((iter_base) + 16)); index1574 = index1574 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1574 * 8) + let array2063 : Array[String] = []; + for index2064 = 0; index2064 < (mbt_ffi_load32((iter_base) + 16)); index2064 = index2064 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2064 * 8) - let result1572 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2062 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1573.push(result1572) + array2063.push(result2062) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1573) + Option::Some(array2063) } _ => panic() } - let lifted1576 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2066 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -10987,7 +15887,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1577 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2067 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -10996,91 +15896,91 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1575, min_bytes : lifted1576, max_bytes : lifted1577}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted2065, min_bytes : lifted2066, max_bytes : lifted2067}) } 26 => { - let lifted1581 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2071 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1579 : Array[String] = []; - for index1580 = 0; index1580 < (mbt_ffi_load32((iter_base) + 20)); index1580 = index1580 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1580 * 8) + let array2069 : Array[String] = []; + for index2070 = 0; index2070 < (mbt_ffi_load32((iter_base) + 20)); index2070 = index2070 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2070 * 8) - let result1578 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2068 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1579.push(result1578) + array2069.push(result2068) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1579) + Option::Some(array2069) } _ => panic() } - let lifted1585 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2075 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1583 : Array[String] = []; - for index1584 = 0; index1584 < (mbt_ffi_load32((iter_base) + 32)); index1584 = index1584 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1584 * 8) + let array2073 : Array[String] = []; + for index2074 = 0; index2074 < (mbt_ffi_load32((iter_base) + 32)); index2074 = index2074 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2074 * 8) - let result1582 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2072 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1583.push(result1582) + array2073.push(result2072) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1583) + Option::Some(array2073) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1581, allowed_extensions : lifted1585}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted2071, allowed_extensions : lifted2075}) } 27 => { - let lifted1589 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2079 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1587 : Array[String] = []; - for index1588 = 0; index1588 < (mbt_ffi_load32((iter_base) + 16)); index1588 = index1588 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1588 * 8) + let array2077 : Array[String] = []; + for index2078 = 0; index2078 < (mbt_ffi_load32((iter_base) + 16)); index2078 = index2078 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2078 * 8) - let result1586 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2076 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1587.push(result1586) + array2077.push(result2076) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1587) + Option::Some(array2077) } _ => panic() } - let lifted1593 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2083 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1591 : Array[String] = []; - for index1592 = 0; index1592 < (mbt_ffi_load32((iter_base) + 28)); index1592 = index1592 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1592 * 8) + let array2081 : Array[String] = []; + for index2082 = 0; index2082 < (mbt_ffi_load32((iter_base) + 28)); index2082 = index2082 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2082 * 8) - let result1590 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2080 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1591.push(result1590) + array2081.push(result2080) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1591) + Option::Some(array2081) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1589, allowed_hosts : lifted1593}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted2079, allowed_hosts : lifted2083}) } 28 => { @@ -11092,148 +15992,148 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 30 => { - let result1594 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2084 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1596 : Array[String] = []; - for index1597 = 0; index1597 < (mbt_ffi_load32((iter_base) + 20)); index1597 = index1597 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1597 * 8) + let array2086 : Array[String] = []; + for index2087 = 0; index2087 < (mbt_ffi_load32((iter_base) + 20)); index2087 = index2087 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2087 * 8) - let result1595 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2085 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1596.push(result1595) + array2086.push(result2085) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1599 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2089 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1598 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2088 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1598}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result2088}) } _ => panic() } - let lifted1601 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2091 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1600 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result2090 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1600}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result2090}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1594, allowed_suffixes : array1596, min : lifted1599, max : lifted1601}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result2084, allowed_suffixes : array2086, min : lifted2089, max : lifted2091}) } 31 => { - let array1625 : Array[@types.UnionBranch] = []; - for index1626 = 0; index1626 < (mbt_ffi_load32((iter_base) + 12)); index1626 = index1626 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1626 * 92) + let array2115 : Array[@types.UnionBranch] = []; + for index2116 = 0; index2116 < (mbt_ffi_load32((iter_base) + 12)); index2116 = index2116 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2116 * 92) - let result1602 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2092 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1611 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted2101 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1603 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2093 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1603) + @types.DiscriminatorRule::Prefix(result2093) } 1 => { - let result1604 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2094 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1604) + @types.DiscriminatorRule::Suffix(result2094) } 2 => { - let result1605 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2095 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1605) + @types.DiscriminatorRule::Contains(result2095) } 3 => { - let result1606 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2096 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1606) + @types.DiscriminatorRule::Regex(result2096) } 4 => { - let result1607 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2097 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1609 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2099 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1608 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2098 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1608) + Option::Some(result2098) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1607, literal : lifted1609}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result2097, literal : lifted2099}) } 5 => { - let result1610 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1610) + @types.DiscriminatorRule::FieldAbsent(result2100) } _ => panic() } - let lifted1613 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2103 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1612 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2102 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1612) + Option::Some(result2102) } _ => panic() } - let array1615 : Array[String] = []; - for index1616 = 0; index1616 < (mbt_ffi_load32((iter_base) + 52)); index1616 = index1616 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1616 * 8) + let array2105 : Array[String] = []; + for index2106 = 0; index2106 < (mbt_ffi_load32((iter_base) + 52)); index2106 = index2106 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2106 * 8) - let result1614 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2104 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1615.push(result1614) + array2105.push(result2104) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1618 : Array[String] = []; - for index1619 = 0; index1619 < (mbt_ffi_load32((iter_base) + 60)); index1619 = index1619 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1619 * 8) + let array2108 : Array[String] = []; + for index2109 = 0; index2109 < (mbt_ffi_load32((iter_base) + 60)); index2109 = index2109 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2109 * 8) - let result1617 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1618.push(result1617) + array2108.push(result2107) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1621 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted2111 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1620 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result2110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1620) + Option::Some(result2110) } _ => panic() } - let lifted1624 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted2114 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1623 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted2113 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -11248,57 +16148,57 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1622 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result2112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1622) + @types.Role::Other(result2112) } _ => panic() } - Option::Some(lifted1623) + Option::Some(lifted2113) } _ => panic() } - array1625.push(@types.UnionBranch::{tag : result1602, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1611, metadata : @types.MetadataEnvelope::{doc : lifted1613, aliases : array1615, examples : array1618, deprecated : lifted1621, role : lifted1624}}) + array2115.push(@types.UnionBranch::{tag : result2092, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted2101, metadata : @types.MetadataEnvelope::{doc : lifted2103, aliases : array2105, examples : array2108, deprecated : lifted2111, role : lifted2114}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1625}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array2115}) } 32 => { - let lifted1628 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2118 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1627 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1627) + Option::Some(result2117) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1628}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted2118}) } 33 => { - let lifted1630 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2120 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1629 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2119 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1629) + Option::Some(result2119) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1630}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted2120}) } 34 => { - let lifted1631 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2121 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -11307,11 +16207,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1631) + @types.SchemaTypeBody::FutureType(lifted2121) } 35 => { - let lifted1632 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2122 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -11320,58 +16220,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1632) + @types.SchemaTypeBody::StreamType(lifted2122) } _ => panic() } - let lifted1635 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted2125 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result2124 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1634) + Option::Some(result2124) } _ => panic() } - let array1637 : Array[String] = []; - for index1638 = 0; index1638 < (mbt_ffi_load32((iter_base) + 104)); index1638 = index1638 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1638 * 8) + let array2127 : Array[String] = []; + for index2128 = 0; index2128 < (mbt_ffi_load32((iter_base) + 104)); index2128 = index2128 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index2128 * 8) - let result1636 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1637.push(result1636) + array2127.push(result2126) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1640 : Array[String] = []; - for index1641 = 0; index1641 < (mbt_ffi_load32((iter_base) + 112)); index1641 = index1641 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1641 * 8) + let array2130 : Array[String] = []; + for index2131 = 0; index2131 < (mbt_ffi_load32((iter_base) + 112)); index2131 = index2131 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index2131 * 8) - let result1639 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1640.push(result1639) + array2130.push(result2129) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1643 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted2133 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1642 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result2132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1642) + Option::Some(result2132) } _ => panic() } - let lifted1646 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted2136 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1645 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted2135 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -11386,48 +16286,48 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1644 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result2134 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1644) + @types.Role::Other(result2134) } _ => panic() } - Option::Some(lifted1645) + Option::Some(lifted2135) } _ => panic() } - array1647.push(@types.SchemaTypeNode::{body : lifted1633, metadata : @types.MetadataEnvelope::{doc : lifted1635, aliases : array1637, examples : array1640, deprecated : lifted1643, role : lifted1646}}) + array2137.push(@types.SchemaTypeNode::{body : lifted2123, metadata : @types.MetadataEnvelope::{doc : lifted2125, aliases : array2127, examples : array2130, deprecated : lifted2133, role : lifted2136}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1652 : Array[@types.SchemaTypeDef] = []; - for index1653 = 0; index1653 < (mbt_ffi_load32((iter_base) + 40)); index1653 = index1653 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1653 * 24) + let array2142 : Array[@types.SchemaTypeDef] = []; + for index2143 = 0; index2143 < (mbt_ffi_load32((iter_base) + 40)); index2143 = index2143 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2143 * 24) - let result1649 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1651 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2141 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1650 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2140 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1650) + Option::Some(result2140) } _ => panic() } - array1652.push(@types.SchemaTypeDef::{id : result1649, name : lifted1651, body : mbt_ffi_load32((iter_base) + 20)}) + array2142.push(@types.SchemaTypeDef::{id : result2139, name : lifted2141, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array1684 : Array[@types.SchemaValueNode] = []; - for index1685 = 0; index1685 < (mbt_ffi_load32((iter_base) + 52)); index1685 = index1685 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1685 * 32) + let array2174 : Array[@types.SchemaValueNode] = []; + for index2175 = 0; index2175 < (mbt_ffi_load32((iter_base) + 52)); index2175 = index2175 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2175 * 32) - let lifted1683 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2173 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -11478,25 +16378,25 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 12 => { - let result1654 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1654) + @types.SchemaValueNode::StringValue(result2144) } 13 => { - let array1655 : Array[Int] = []; - for index1656 = 0; index1656 < (mbt_ffi_load32((iter_base) + 12)); index1656 = index1656 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1656 * 4) + let array2145 : Array[Int] = []; + for index2146 = 0; index2146 < (mbt_ffi_load32((iter_base) + 12)); index2146 = index2146 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2146 * 4) - array1655.push(mbt_ffi_load32((iter_base) + 0)) + array2145.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1655) + @types.SchemaValueNode::RecordValue(array2145) } 14 => { - let lifted1657 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2147 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -11505,7 +16405,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1657}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted2147}) } 15 => { @@ -11513,67 +16413,67 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 16 => { - let array1658 : Array[Bool] = []; - for index1659 = 0; index1659 < (mbt_ffi_load32((iter_base) + 12)); index1659 = index1659 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1659 * 1) + let array2148 : Array[Bool] = []; + for index2149 = 0; index2149 < (mbt_ffi_load32((iter_base) + 12)); index2149 = index2149 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2149 * 1) - array1658.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array2148.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1658) + @types.SchemaValueNode::FlagsValue(array2148) } 17 => { - let array1660 : Array[Int] = []; - for index1661 = 0; index1661 < (mbt_ffi_load32((iter_base) + 12)); index1661 = index1661 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1661 * 4) + let array2150 : Array[Int] = []; + for index2151 = 0; index2151 < (mbt_ffi_load32((iter_base) + 12)); index2151 = index2151 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2151 * 4) - array1660.push(mbt_ffi_load32((iter_base) + 0)) + array2150.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1660) + @types.SchemaValueNode::TupleValue(array2150) } 18 => { - let array1662 : Array[Int] = []; - for index1663 = 0; index1663 < (mbt_ffi_load32((iter_base) + 12)); index1663 = index1663 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1663 * 4) + let array2152 : Array[Int] = []; + for index2153 = 0; index2153 < (mbt_ffi_load32((iter_base) + 12)); index2153 = index2153 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2153 * 4) - array1662.push(mbt_ffi_load32((iter_base) + 0)) + array2152.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1662) + @types.SchemaValueNode::ListValue(array2152) } 19 => { - let array1664 : Array[Int] = []; - for index1665 = 0; index1665 < (mbt_ffi_load32((iter_base) + 12)); index1665 = index1665 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1665 * 4) + let array2154 : Array[Int] = []; + for index2155 = 0; index2155 < (mbt_ffi_load32((iter_base) + 12)); index2155 = index2155 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2155 * 4) - array1664.push(mbt_ffi_load32((iter_base) + 0)) + array2154.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1664) + @types.SchemaValueNode::FixedListValue(array2154) } 20 => { - let array1666 : Array[@types.MapEntry] = []; - for index1667 = 0; index1667 < (mbt_ffi_load32((iter_base) + 12)); index1667 = index1667 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1667 * 8) + let array2156 : Array[@types.MapEntry] = []; + for index2157 = 0; index2157 < (mbt_ffi_load32((iter_base) + 12)); index2157 = index2157 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2157 * 8) - array1666.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array2156.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1666) + @types.SchemaValueNode::MapValue(array2156) } 21 => { - let lifted1668 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2158 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -11582,14 +16482,14 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1668) + @types.SchemaValueNode::OptionValue(lifted2158) } 22 => { - let lifted1671 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2161 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1669 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2159 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -11598,11 +16498,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::OkValue(lifted1669) + @types.ResultValuePayload::OkValue(lifted2159) } 1 => { - let lifted1670 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2160 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -11611,58 +16511,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1670) + @types.ResultValuePayload::ErrValue(lifted2160) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1671) + @types.SchemaValueNode::ResultValue(lifted2161) } 23 => { - let result1672 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2162 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1674 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2164 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1673 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2163 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1673) + Option::Some(result2163) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1672, language : lifted1674}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result2162, language : lifted2164}) } 24 => { - let result1675 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2165 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1677 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2167 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1676 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1676) + Option::Some(result2166) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1675, mime_type : lifted1677}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result2165, mime_type : lifted2167}) } 25 => { - let result1678 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1678) + @types.SchemaValueNode::PathValue(result2168) } 26 => { - let result1679 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1679) + @types.SchemaValueNode::UrlValue(result2169) } 27 => { @@ -11674,21 +16574,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 29 => { - let result1680 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1680}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result2170}) } 30 => { - let result1681 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2171 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1681, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result2171, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1682 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2172 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1682}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result2172}) } 32 => { @@ -11697,19 +16597,19 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array1684.push(lifted1683) + array2174.push(lifted2173) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - AgentInvocationResult::AgentInitialization(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1647, defs : array1652, root : mbt_ffi_load32((iter_base) + 44)}, value : @types.SchemaValueTree::{value_nodes : array1684, root : mbt_ffi_load32((iter_base) + 56)}}}) + AgentInvocationResult::AgentInitialization(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array2137, defs : array2142, root : mbt_ffi_load32((iter_base) + 44)}, value : @types.SchemaValueTree::{value_nodes : array2174, root : mbt_ffi_load32((iter_base) + 56)}}}) } 1 => { - let array1812 : Array[@types.SchemaTypeNode] = []; - for index1813 = 0; index1813 < (mbt_ffi_load32((iter_base) + 32)); index1813 = index1813 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1813 * 144) + let array2372 : Array[@types.SchemaTypeNode] = []; + for index2373 = 0; index2373 < (mbt_ffi_load32((iter_base) + 32)); index2373 = index2373 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2373 * 144) - let lifted1798 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2358 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -11720,148 +16620,848 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted2182 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted2177 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted2176 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted2176) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted2179 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted2178 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array1700 : Array[@types.NamedFieldType] = []; - for index1701 = 0; index1701 < (mbt_ffi_load32((iter_base) + 12)); index1701 = index1701 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1701 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result1686 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted2178) + } + _ => panic() + } - let lifted1688 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted2181 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result1687 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1687) + Option::Some(result2180) + } + _ => panic() } - _ => panic() - } - let array1690 : Array[String] = []; - for index1691 = 0; index1691 < (mbt_ffi_load32((iter_base) + 28)); index1691 = index1691 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1691 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted2177, max : lifted2179, unit : lifted2181}) + } + _ => panic() + } - let result1689 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted2182) + } + 3 => { - array1690.push(result1689) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted2189 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array1693 : Array[String] = []; - for index1694 = 0; index1694 < (mbt_ffi_load32((iter_base) + 36)); index1694 = index1694 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1694 * 8) + let lifted2184 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result1692 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted2183 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array1693.push(result1692) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted1696 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result1695 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result1695) + Option::Some(lifted2183) + } + _ => panic() } - _ => panic() - } - let lifted1699 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted2186 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted1698 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted2185 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - - let result1697 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1697) - } - _ => panic() + Option::Some(lifted2185) } + _ => panic() + } - Option::Some(lifted1698) + let lifted2188 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2187) + } + _ => panic() } - _ => panic() - } - array1700.push(@types.NamedFieldType::{name : result1686, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1688, aliases : array1690, examples : array1693, deprecated : lifted1696, role : lifted1699}}) + Option::Some(@types.NumericRestrictions::{min : lifted2184, max : lifted2186, unit : lifted2188}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array1700) + @types.SchemaTypeBody::S16Type(lifted2189) } - 15 => { - - let array1717 : Array[@types.VariantCaseType] = []; - for index1718 = 0; index1718 < (mbt_ffi_load32((iter_base) + 12)); index1718 = index1718 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1718 * 72) + 4 => { - let result1702 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted2196 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let lifted1703 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2191 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2190 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2190) + } + _ => panic() + } + + let lifted2193 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2192 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2192) + } + _ => panic() + } + + let lifted2195 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2194) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2191, max : lifted2193, unit : lifted2195}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted2196) + } + 5 => { + + let lifted2203 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2198 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2197 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2197) + } + _ => panic() + } + + let lifted2200 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2199 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2199) + } + _ => panic() + } + + let lifted2202 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2201 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2201) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2198, max : lifted2200, unit : lifted2202}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted2203) + } + 6 => { + + let lifted2210 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2205 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2204 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2204) + } + _ => panic() + } + + let lifted2207 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2206 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2206) + } + _ => panic() + } + + let lifted2209 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2208 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2208) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2205, max : lifted2207, unit : lifted2209}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted2210) + } + 7 => { + + let lifted2217 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2212 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2211 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2211) + } + _ => panic() + } + + let lifted2214 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2213 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2213) + } + _ => panic() + } + + let lifted2216 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2215 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2215) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2212, max : lifted2214, unit : lifted2216}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted2217) + } + 8 => { + + let lifted2224 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2219 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2218 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2218) + } + _ => panic() + } + + let lifted2221 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2220 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2220) + } + _ => panic() + } + + let lifted2223 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2222 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2222) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2219, max : lifted2221, unit : lifted2223}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2224) + } + 9 => { + + let lifted2231 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2226 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2225 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2225) + } + _ => panic() + } + + let lifted2228 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2227 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2227) + } + _ => panic() + } + + let lifted2230 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2229 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2229) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2226, max : lifted2228, unit : lifted2230}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2231) + } + 10 => { + + let lifted2238 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2233 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2232 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2232) + } + _ => panic() + } + + let lifted2235 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2234 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2234) + } + _ => panic() + } + + let lifted2237 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2236) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2233, max : lifted2235, unit : lifted2237}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2238) + } + 11 => { + + let lifted2245 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2240 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2239 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2239) + } + _ => panic() + } + + let lifted2242 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2241 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2241) + } + _ => panic() + } + + let lifted2244 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2243) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2240, max : lifted2242, unit : lifted2244}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2245) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array2260 : Array[@types.NamedFieldType] = []; + for index2261 = 0; index2261 < (mbt_ffi_load32((iter_base) + 12)); index2261 = index2261 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2261 * 68) + + let result2246 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted2248 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result2247 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result2247) + } + _ => panic() + } + + let array2250 : Array[String] = []; + for index2251 = 0; index2251 < (mbt_ffi_load32((iter_base) + 28)); index2251 = index2251 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2251 * 8) + + let result2249 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array2250.push(result2249) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array2253 : Array[String] = []; + for index2254 = 0; index2254 < (mbt_ffi_load32((iter_base) + 36)); index2254 = index2254 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index2254 * 8) + + let result2252 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array2253.push(result2252) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted2256 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result2255 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result2255) + } + _ => panic() + } + + let lifted2259 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted2258 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result2257 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result2257) + } + _ => panic() + } + + Option::Some(lifted2258) + } + _ => panic() + } + + array2260.push(@types.NamedFieldType::{name : result2246, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted2248, aliases : array2250, examples : array2253, deprecated : lifted2256, role : lifted2259}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array2260) + } + 15 => { + + let array2277 : Array[@types.VariantCaseType] = []; + for index2278 = 0; index2278 < (mbt_ffi_load32((iter_base) + 12)); index2278 = index2278 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2278 * 72) + + let result2262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted2263 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -11870,53 +17470,53 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1705 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2265 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1704 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2264 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1704) + Option::Some(result2264) } _ => panic() } - let array1707 : Array[String] = []; - for index1708 = 0; index1708 < (mbt_ffi_load32((iter_base) + 32)); index1708 = index1708 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1708 * 8) + let array2267 : Array[String] = []; + for index2268 = 0; index2268 < (mbt_ffi_load32((iter_base) + 32)); index2268 = index2268 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2268 * 8) - let result1706 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2266 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1707.push(result1706) + array2267.push(result2266) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1710 : Array[String] = []; - for index1711 = 0; index1711 < (mbt_ffi_load32((iter_base) + 40)); index1711 = index1711 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1711 * 8) + let array2270 : Array[String] = []; + for index2271 = 0; index2271 < (mbt_ffi_load32((iter_base) + 40)); index2271 = index2271 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2271 * 8) - let result1709 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2269 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1710.push(result1709) + array2270.push(result2269) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1713 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted2273 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1712 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2272 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1712) + Option::Some(result2272) } _ => panic() } - let lifted1716 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2276 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1715 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted2275 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -11931,63 +17531,63 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result2274 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1714) + @types.Role::Other(result2274) } _ => panic() } - Option::Some(lifted1715) + Option::Some(lifted2275) } _ => panic() } - array1717.push(@types.VariantCaseType::{name : result1702, payload : lifted1703, metadata : @types.MetadataEnvelope::{doc : lifted1705, aliases : array1707, examples : array1710, deprecated : lifted1713, role : lifted1716}}) + array2277.push(@types.VariantCaseType::{name : result2262, payload : lifted2263, metadata : @types.MetadataEnvelope::{doc : lifted2265, aliases : array2267, examples : array2270, deprecated : lifted2273, role : lifted2276}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1717) + @types.SchemaTypeBody::VariantType(array2277) } 16 => { - let array1720 : Array[String] = []; - for index1721 = 0; index1721 < (mbt_ffi_load32((iter_base) + 12)); index1721 = index1721 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1721 * 8) + let array2280 : Array[String] = []; + for index2281 = 0; index2281 < (mbt_ffi_load32((iter_base) + 12)); index2281 = index2281 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2281 * 8) - let result1719 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2279 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1720.push(result1719) + array2280.push(result2279) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1720) + @types.SchemaTypeBody::EnumType(array2280) } 17 => { - let array1723 : Array[String] = []; - for index1724 = 0; index1724 < (mbt_ffi_load32((iter_base) + 12)); index1724 = index1724 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1724 * 8) + let array2283 : Array[String] = []; + for index2284 = 0; index2284 < (mbt_ffi_load32((iter_base) + 12)); index2284 = index2284 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2284 * 8) - let result1722 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2282 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1723.push(result1722) + array2283.push(result2282) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1723) + @types.SchemaTypeBody::FlagsType(array2283) } 18 => { - let array1725 : Array[Int] = []; - for index1726 = 0; index1726 < (mbt_ffi_load32((iter_base) + 12)); index1726 = index1726 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1726 * 4) + let array2285 : Array[Int] = []; + for index2286 = 0; index2286 < (mbt_ffi_load32((iter_base) + 12)); index2286 = index2286 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2286 * 4) - array1725.push(mbt_ffi_load32((iter_base) + 0)) + array2285.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1725) + @types.SchemaTypeBody::TupleType(array2285) } 19 => { @@ -12007,7 +17607,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 23 => { - let lifted1727 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2287 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -12016,7 +17616,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1728 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2288 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -12025,30 +17625,30 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1727, err : lifted1728}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted2287, err : lifted2288}) } 24 => { - let lifted1732 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2292 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1730 : Array[String] = []; - for index1731 = 0; index1731 < (mbt_ffi_load32((iter_base) + 16)); index1731 = index1731 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1731 * 8) + let array2290 : Array[String] = []; + for index2291 = 0; index2291 < (mbt_ffi_load32((iter_base) + 16)); index2291 = index2291 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2291 * 8) - let result1729 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2289 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1730.push(result1729) + array2290.push(result2289) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1730) + Option::Some(array2290) } _ => panic() } - let lifted1733 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2293 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -12057,7 +17657,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1734 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2294 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -12066,41 +17666,41 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1736 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2296 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1735 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2295 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1735) + Option::Some(result2295) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1732, min_length : lifted1733, max_length : lifted1734, regex : lifted1736}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted2292, min_length : lifted2293, max_length : lifted2294, regex : lifted2296}) } 25 => { - let lifted1740 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2300 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1738 : Array[String] = []; - for index1739 = 0; index1739 < (mbt_ffi_load32((iter_base) + 16)); index1739 = index1739 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1739 * 8) + let array2298 : Array[String] = []; + for index2299 = 0; index2299 < (mbt_ffi_load32((iter_base) + 16)); index2299 = index2299 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2299 * 8) - let result1737 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2297 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1738.push(result1737) + array2298.push(result2297) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1738) + Option::Some(array2298) } _ => panic() } - let lifted1741 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2301 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -12109,7 +17709,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1742 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2302 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -12118,91 +17718,91 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1740, min_bytes : lifted1741, max_bytes : lifted1742}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted2300, min_bytes : lifted2301, max_bytes : lifted2302}) } 26 => { - let lifted1746 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2306 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1744 : Array[String] = []; - for index1745 = 0; index1745 < (mbt_ffi_load32((iter_base) + 20)); index1745 = index1745 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1745 * 8) + let array2304 : Array[String] = []; + for index2305 = 0; index2305 < (mbt_ffi_load32((iter_base) + 20)); index2305 = index2305 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2305 * 8) - let result1743 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2303 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1744.push(result1743) + array2304.push(result2303) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1744) + Option::Some(array2304) } _ => panic() } - let lifted1750 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2310 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1748 : Array[String] = []; - for index1749 = 0; index1749 < (mbt_ffi_load32((iter_base) + 32)); index1749 = index1749 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1749 * 8) + let array2308 : Array[String] = []; + for index2309 = 0; index2309 < (mbt_ffi_load32((iter_base) + 32)); index2309 = index2309 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2309 * 8) - let result1747 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1748.push(result1747) + array2308.push(result2307) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1748) + Option::Some(array2308) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1746, allowed_extensions : lifted1750}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted2306, allowed_extensions : lifted2310}) } 27 => { - let lifted1754 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2314 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1752 : Array[String] = []; - for index1753 = 0; index1753 < (mbt_ffi_load32((iter_base) + 16)); index1753 = index1753 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1753 * 8) + let array2312 : Array[String] = []; + for index2313 = 0; index2313 < (mbt_ffi_load32((iter_base) + 16)); index2313 = index2313 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2313 * 8) - let result1751 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2311 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1752.push(result1751) + array2312.push(result2311) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1752) + Option::Some(array2312) } _ => panic() } - let lifted1758 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2318 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1756 : Array[String] = []; - for index1757 = 0; index1757 < (mbt_ffi_load32((iter_base) + 28)); index1757 = index1757 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1757 * 8) + let array2316 : Array[String] = []; + for index2317 = 0; index2317 < (mbt_ffi_load32((iter_base) + 28)); index2317 = index2317 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2317 * 8) - let result1755 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2315 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1756.push(result1755) + array2316.push(result2315) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1756) + Option::Some(array2316) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1754, allowed_hosts : lifted1758}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted2314, allowed_hosts : lifted2318}) } 28 => { @@ -12214,148 +17814,148 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 30 => { - let result1759 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2319 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1761 : Array[String] = []; - for index1762 = 0; index1762 < (mbt_ffi_load32((iter_base) + 20)); index1762 = index1762 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1762 * 8) + let array2321 : Array[String] = []; + for index2322 = 0; index2322 < (mbt_ffi_load32((iter_base) + 20)); index2322 = index2322 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2322 * 8) - let result1760 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2320 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1761.push(result1760) + array2321.push(result2320) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1764 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2324 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1763 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2323 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1763}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result2323}) } _ => panic() } - let lifted1766 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2326 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1765 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result2325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1765}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result2325}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1759, allowed_suffixes : array1761, min : lifted1764, max : lifted1766}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result2319, allowed_suffixes : array2321, min : lifted2324, max : lifted2326}) } 31 => { - let array1790 : Array[@types.UnionBranch] = []; - for index1791 = 0; index1791 < (mbt_ffi_load32((iter_base) + 12)); index1791 = index1791 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1791 * 92) + let array2350 : Array[@types.UnionBranch] = []; + for index2351 = 0; index2351 < (mbt_ffi_load32((iter_base) + 12)); index2351 = index2351 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2351 * 92) - let result1767 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2327 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1776 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted2336 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1768 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2328 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1768) + @types.DiscriminatorRule::Prefix(result2328) } 1 => { - let result1769 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2329 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1769) + @types.DiscriminatorRule::Suffix(result2329) } 2 => { - let result1770 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2330 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1770) + @types.DiscriminatorRule::Contains(result2330) } 3 => { - let result1771 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2331 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1771) + @types.DiscriminatorRule::Regex(result2331) } 4 => { - let result1772 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2332 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1774 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2334 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1773 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2333 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1773) + Option::Some(result2333) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1772, literal : lifted1774}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result2332, literal : lifted2334}) } 5 => { - let result1775 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1775) + @types.DiscriminatorRule::FieldAbsent(result2335) } _ => panic() } - let lifted1778 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2338 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1777 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2337 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1777) + Option::Some(result2337) } _ => panic() } - let array1780 : Array[String] = []; - for index1781 = 0; index1781 < (mbt_ffi_load32((iter_base) + 52)); index1781 = index1781 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1781 * 8) + let array2340 : Array[String] = []; + for index2341 = 0; index2341 < (mbt_ffi_load32((iter_base) + 52)); index2341 = index2341 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2341 * 8) - let result1779 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2339 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1780.push(result1779) + array2340.push(result2339) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1783 : Array[String] = []; - for index1784 = 0; index1784 < (mbt_ffi_load32((iter_base) + 60)); index1784 = index1784 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1784 * 8) + let array2343 : Array[String] = []; + for index2344 = 0; index2344 < (mbt_ffi_load32((iter_base) + 60)); index2344 = index2344 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2344 * 8) - let result1782 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1783.push(result1782) + array2343.push(result2342) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1786 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted2346 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1785 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result2345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1785) + Option::Some(result2345) } _ => panic() } - let lifted1789 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted2349 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1788 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted2348 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -12370,57 +17970,57 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1787 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result2347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1787) + @types.Role::Other(result2347) } _ => panic() } - Option::Some(lifted1788) + Option::Some(lifted2348) } _ => panic() } - array1790.push(@types.UnionBranch::{tag : result1767, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1776, metadata : @types.MetadataEnvelope::{doc : lifted1778, aliases : array1780, examples : array1783, deprecated : lifted1786, role : lifted1789}}) + array2350.push(@types.UnionBranch::{tag : result2327, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted2336, metadata : @types.MetadataEnvelope::{doc : lifted2338, aliases : array2340, examples : array2343, deprecated : lifted2346, role : lifted2349}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1790}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array2350}) } 32 => { - let lifted1793 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2353 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1792 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2352 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1792) + Option::Some(result2352) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1793}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted2353}) } 33 => { - let lifted1795 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2355 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1794 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2354 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1794) + Option::Some(result2354) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1795}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted2355}) } 34 => { - let lifted1796 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2356 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -12429,11 +18029,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1796) + @types.SchemaTypeBody::FutureType(lifted2356) } 35 => { - let lifted1797 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2357 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -12442,58 +18042,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1797) + @types.SchemaTypeBody::StreamType(lifted2357) } _ => panic() } - let lifted1800 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted2360 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1799 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result2359 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1799) + Option::Some(result2359) } _ => panic() } - let array1802 : Array[String] = []; - for index1803 = 0; index1803 < (mbt_ffi_load32((iter_base) + 104)); index1803 = index1803 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1803 * 8) + let array2362 : Array[String] = []; + for index2363 = 0; index2363 < (mbt_ffi_load32((iter_base) + 104)); index2363 = index2363 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index2363 * 8) - let result1801 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2361 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1802.push(result1801) + array2362.push(result2361) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1805 : Array[String] = []; - for index1806 = 0; index1806 < (mbt_ffi_load32((iter_base) + 112)); index1806 = index1806 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1806 * 8) + let array2365 : Array[String] = []; + for index2366 = 0; index2366 < (mbt_ffi_load32((iter_base) + 112)); index2366 = index2366 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index2366 * 8) - let result1804 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2364 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1805.push(result1804) + array2365.push(result2364) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1808 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted2368 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1807 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result2367 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1807) + Option::Some(result2367) } _ => panic() } - let lifted1811 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted2371 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1810 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted2370 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -12508,48 +18108,48 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1809 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result2369 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1809) + @types.Role::Other(result2369) } _ => panic() } - Option::Some(lifted1810) + Option::Some(lifted2370) } _ => panic() } - array1812.push(@types.SchemaTypeNode::{body : lifted1798, metadata : @types.MetadataEnvelope::{doc : lifted1800, aliases : array1802, examples : array1805, deprecated : lifted1808, role : lifted1811}}) + array2372.push(@types.SchemaTypeNode::{body : lifted2358, metadata : @types.MetadataEnvelope::{doc : lifted2360, aliases : array2362, examples : array2365, deprecated : lifted2368, role : lifted2371}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1817 : Array[@types.SchemaTypeDef] = []; - for index1818 = 0; index1818 < (mbt_ffi_load32((iter_base) + 40)); index1818 = index1818 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1818 * 24) + let array2377 : Array[@types.SchemaTypeDef] = []; + for index2378 = 0; index2378 < (mbt_ffi_load32((iter_base) + 40)); index2378 = index2378 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2378 * 24) - let result1814 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2374 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1816 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2376 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1815 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1815) + Option::Some(result2375) } _ => panic() } - array1817.push(@types.SchemaTypeDef::{id : result1814, name : lifted1816, body : mbt_ffi_load32((iter_base) + 20)}) + array2377.push(@types.SchemaTypeDef::{id : result2374, name : lifted2376, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array1849 : Array[@types.SchemaValueNode] = []; - for index1850 = 0; index1850 < (mbt_ffi_load32((iter_base) + 52)); index1850 = index1850 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1850 * 32) + let array2409 : Array[@types.SchemaValueNode] = []; + for index2410 = 0; index2410 < (mbt_ffi_load32((iter_base) + 52)); index2410 = index2410 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2410 * 32) - let lifted1848 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2408 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -12600,25 +18200,25 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 12 => { - let result1819 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2379 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1819) + @types.SchemaValueNode::StringValue(result2379) } 13 => { - let array1820 : Array[Int] = []; - for index1821 = 0; index1821 < (mbt_ffi_load32((iter_base) + 12)); index1821 = index1821 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1821 * 4) + let array2380 : Array[Int] = []; + for index2381 = 0; index2381 < (mbt_ffi_load32((iter_base) + 12)); index2381 = index2381 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2381 * 4) - array1820.push(mbt_ffi_load32((iter_base) + 0)) + array2380.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1820) + @types.SchemaValueNode::RecordValue(array2380) } 14 => { - let lifted1822 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2382 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -12627,7 +18227,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1822}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted2382}) } 15 => { @@ -12635,67 +18235,67 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 16 => { - let array1823 : Array[Bool] = []; - for index1824 = 0; index1824 < (mbt_ffi_load32((iter_base) + 12)); index1824 = index1824 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1824 * 1) + let array2383 : Array[Bool] = []; + for index2384 = 0; index2384 < (mbt_ffi_load32((iter_base) + 12)); index2384 = index2384 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2384 * 1) - array1823.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array2383.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1823) + @types.SchemaValueNode::FlagsValue(array2383) } 17 => { - let array1825 : Array[Int] = []; - for index1826 = 0; index1826 < (mbt_ffi_load32((iter_base) + 12)); index1826 = index1826 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1826 * 4) + let array2385 : Array[Int] = []; + for index2386 = 0; index2386 < (mbt_ffi_load32((iter_base) + 12)); index2386 = index2386 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2386 * 4) - array1825.push(mbt_ffi_load32((iter_base) + 0)) + array2385.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1825) + @types.SchemaValueNode::TupleValue(array2385) } 18 => { - let array1827 : Array[Int] = []; - for index1828 = 0; index1828 < (mbt_ffi_load32((iter_base) + 12)); index1828 = index1828 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1828 * 4) + let array2387 : Array[Int] = []; + for index2388 = 0; index2388 < (mbt_ffi_load32((iter_base) + 12)); index2388 = index2388 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2388 * 4) - array1827.push(mbt_ffi_load32((iter_base) + 0)) + array2387.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1827) + @types.SchemaValueNode::ListValue(array2387) } 19 => { - let array1829 : Array[Int] = []; - for index1830 = 0; index1830 < (mbt_ffi_load32((iter_base) + 12)); index1830 = index1830 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1830 * 4) + let array2389 : Array[Int] = []; + for index2390 = 0; index2390 < (mbt_ffi_load32((iter_base) + 12)); index2390 = index2390 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2390 * 4) - array1829.push(mbt_ffi_load32((iter_base) + 0)) + array2389.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1829) + @types.SchemaValueNode::FixedListValue(array2389) } 20 => { - let array1831 : Array[@types.MapEntry] = []; - for index1832 = 0; index1832 < (mbt_ffi_load32((iter_base) + 12)); index1832 = index1832 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1832 * 8) + let array2391 : Array[@types.MapEntry] = []; + for index2392 = 0; index2392 < (mbt_ffi_load32((iter_base) + 12)); index2392 = index2392 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2392 * 8) - array1831.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array2391.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1831) + @types.SchemaValueNode::MapValue(array2391) } 21 => { - let lifted1833 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2393 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -12704,14 +18304,14 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1833) + @types.SchemaValueNode::OptionValue(lifted2393) } 22 => { - let lifted1836 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2396 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1834 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2394 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -12720,11 +18320,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::OkValue(lifted1834) + @types.ResultValuePayload::OkValue(lifted2394) } 1 => { - let lifted1835 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2395 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -12733,58 +18333,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1835) + @types.ResultValuePayload::ErrValue(lifted2395) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1836) + @types.SchemaValueNode::ResultValue(lifted2396) } 23 => { - let result1837 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2397 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1839 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2399 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1838 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2398 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1838) + Option::Some(result2398) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1837, language : lifted1839}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result2397, language : lifted2399}) } 24 => { - let result1840 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2400 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1842 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2402 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1841 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2401 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1841) + Option::Some(result2401) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1840, mime_type : lifted1842}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result2400, mime_type : lifted2402}) } 25 => { - let result1843 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2403 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1843) + @types.SchemaValueNode::PathValue(result2403) } 26 => { - let result1844 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2404 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1844) + @types.SchemaValueNode::UrlValue(result2404) } 27 => { @@ -12796,21 +18396,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 29 => { - let result1845 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2405 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1845}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result2405}) } 30 => { - let result1846 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2406 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1846, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result2406, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1847 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2407 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1847}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result2407}) } 32 => { @@ -12819,11 +18419,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array1849.push(lifted1848) + array2409.push(lifted2408) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - AgentInvocationResult::AgentMethod(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1812, defs : array1817, root : mbt_ffi_load32((iter_base) + 44)}, value : @types.SchemaValueTree::{value_nodes : array1849, root : mbt_ffi_load32((iter_base) + 56)}}}) + AgentInvocationResult::AgentMethod(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array2372, defs : array2377, root : mbt_ffi_load32((iter_base) + 44)}, value : @types.SchemaValueTree::{value_nodes : array2409, root : mbt_ffi_load32((iter_base) + 56)}}}) } 2 => { @@ -12831,57 +18431,57 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let lifted1852 : String? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2412 : String? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { - let result1851 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2411 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - Option::Some(result1851) + Option::Some(result2411) } _ => panic() } - AgentInvocationResult::LoadSnapshot(FallibleResultParameters::{error : lifted1852}) + AgentInvocationResult::LoadSnapshot(FallibleResultParameters::{error : lifted2412}) } 4 => { - let result1853 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2413 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - let result1854 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - AgentInvocationResult::SaveSnapshot(SaveSnapshotResultParameters::{snapshot : SnapshotData::{data : result1853, mime_type : result1854}}) + AgentInvocationResult::SaveSnapshot(SaveSnapshotResultParameters::{snapshot : SnapshotData::{data : result2413, mime_type : result2414}}) } 5 => { - let lifted1856 : String? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2416 : String? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { - let result1855 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - Option::Some(result1855) + Option::Some(result2415) } _ => panic() } - AgentInvocationResult::ProcessOplogEntries(FallibleResultParameters::{error : lifted1856}) + AgentInvocationResult::ProcessOplogEntries(FallibleResultParameters::{error : lifted2416}) } _ => panic() } - let lifted1859 : String? = match mbt_ffi_load8_u((iter_base) + 60) { + let lifted2419 : String? = match mbt_ffi_load8_u((iter_base) + 60) { 0 => Option::None 1 => { - let result1858 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result2418 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - Option::Some(result1858) + Option::Some(result2418) } _ => panic() } - PublicOplogEntry::AgentInvocationFinished(AgentInvocationFinishedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, result : lifted1857, method_name : lifted1859, consumed_fuel : mbt_ffi_load64((iter_base) + 72), component_revision : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}) + PublicOplogEntry::AgentInvocationFinished(AgentInvocationFinishedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, result : lifted2417, method_name : lifted2419, consumed_fuel : mbt_ffi_load64((iter_base) + 72), component_revision : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}) } 6 => { @@ -12889,17 +18489,17 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 7 => { - let result1860 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let lifted1864 : RetryPolicyState? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted2424 : RetryPolicyState? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let array1862 : Array[StateNode] = []; - for index1863 = 0; index1863 < (mbt_ffi_load32((iter_base) + 52)); index1863 = index1863 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1863 * 16) + let array2422 : Array[StateNode] = []; + for index2423 = 0; index2423 < (mbt_ffi_load32((iter_base) + 52)); index2423 = index2423 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2423 * 16) - let lifted1861 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2421 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { StateNode::Counter((mbt_ffi_load32((iter_base) + 4)).reinterpret_as_uint()) @@ -12927,16 +18527,16 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array1862.push(lifted1861) + array2422.push(lifted2421) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - Option::Some(RetryPolicyState::{nodes : array1862}) + Option::Some(RetryPolicyState::{nodes : array2422}) } _ => panic() } - PublicOplogEntry::Error(ErrorParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, error : result1860, retry_from : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), inside_atomic_region : (mbt_ffi_load8_u((iter_base) + 40) != 0), retry_policy_state : lifted1864}) + PublicOplogEntry::Error(ErrorParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, error : result2420, retry_from : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), inside_atomic_region : (mbt_ffi_load8_u((iter_base) + 40) != 0), retry_policy_state : lifted2424}) } 8 => { @@ -12964,16 +18564,16 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 14 => { - let lifted2239 = match (mbt_ffi_load8_u((iter_base) + 24)) { + let lifted2939 = match (mbt_ffi_load8_u((iter_base) + 24)) { 0 => { - let result1865 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2425 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let array1992 : Array[@types.SchemaTypeNode] = []; - for index1993 = 0; index1993 < (mbt_ffi_load32((iter_base) + 44)); index1993 = index1993 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index1993 * 144) + let array2622 : Array[@types.SchemaTypeNode] = []; + for index2623 = 0; index2623 < (mbt_ffi_load32((iter_base) + 44)); index2623 = index2623 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index2623 * 144) - let lifted1978 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2608 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -12984,43 +18584,743 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 2 => { - @types.SchemaTypeBody::S8Type + let lifted2432 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2427 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2426 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2426) + } + _ => panic() + } + + let lifted2429 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2428 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2428) + } + _ => panic() + } + + let lifted2431 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2430) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2427, max : lifted2429, unit : lifted2431}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted2432) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted2439 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2434 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2433 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2433) + } + _ => panic() + } + + let lifted2436 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2435 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2435) + } + _ => panic() + } + + let lifted2438 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2437 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2437) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2434, max : lifted2436, unit : lifted2438}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted2439) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted2446 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2441 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2440 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2440) + } + _ => panic() + } + + let lifted2443 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2442 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2442) + } + _ => panic() + } + + let lifted2445 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2444 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2444) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2441, max : lifted2443, unit : lifted2445}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted2446) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted2453 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2448 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2447 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2447) + } + _ => panic() + } + + let lifted2450 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2449 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2449) + } + _ => panic() + } + + let lifted2452 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2451 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2451) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2448, max : lifted2450, unit : lifted2452}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted2453) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted2460 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2455 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2454 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2454) + } + _ => panic() + } + + let lifted2457 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2456 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2456) + } + _ => panic() + } + + let lifted2459 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2458 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2458) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2455, max : lifted2457, unit : lifted2459}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted2460) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted2467 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2462 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2461 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2461) + } + _ => panic() + } + + let lifted2464 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2463 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2463) + } + _ => panic() + } + + let lifted2466 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2465 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2465) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2462, max : lifted2464, unit : lifted2466}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted2467) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted2474 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2469 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2468 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2468) + } + _ => panic() + } + + let lifted2471 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2470 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2470) + } + _ => panic() + } + + let lifted2473 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2472 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2472) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2469, max : lifted2471, unit : lifted2473}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2474) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted2481 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2476 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2475 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2475) + } + _ => panic() + } + + let lifted2478 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2477 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2477) + } + _ => panic() + } + + let lifted2480 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2479 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2479) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2476, max : lifted2478, unit : lifted2480}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2481) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted2488 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2483 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2482 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2482) + } + _ => panic() + } + + let lifted2485 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2484 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2484) + } + _ => panic() + } + + let lifted2487 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2486 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2486) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2483, max : lifted2485, unit : lifted2487}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2488) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted2495 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2490 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2489 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2489) + } + _ => panic() + } + + let lifted2492 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2491 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2491) + } + _ => panic() + } + + let lifted2494 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2493 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2493) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2490, max : lifted2492, unit : lifted2494}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2495) } 12 => { @@ -13032,59 +19332,59 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 14 => { - let array1880 : Array[@types.NamedFieldType] = []; - for index1881 = 0; index1881 < (mbt_ffi_load32((iter_base) + 12)); index1881 = index1881 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1881 * 68) + let array2510 : Array[@types.NamedFieldType] = []; + for index2511 = 0; index2511 < (mbt_ffi_load32((iter_base) + 12)); index2511 = index2511 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2511 * 68) - let result1866 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2496 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1868 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2498 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result1867 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2497 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result1867) + Option::Some(result2497) } _ => panic() } - let array1870 : Array[String] = []; - for index1871 = 0; index1871 < (mbt_ffi_load32((iter_base) + 28)); index1871 = index1871 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1871 * 8) + let array2500 : Array[String] = []; + for index2501 = 0; index2501 < (mbt_ffi_load32((iter_base) + 28)); index2501 = index2501 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2501 * 8) - let result1869 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2499 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1870.push(result1869) + array2500.push(result2499) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array1873 : Array[String] = []; - for index1874 = 0; index1874 < (mbt_ffi_load32((iter_base) + 36)); index1874 = index1874 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1874 * 8) + let array2503 : Array[String] = []; + for index2504 = 0; index2504 < (mbt_ffi_load32((iter_base) + 36)); index2504 = index2504 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index2504 * 8) - let result1872 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2502 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1873.push(result1872) + array2503.push(result2502) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted1876 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted2506 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result1875 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result1875) + Option::Some(result2505) } _ => panic() } - let lifted1879 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted2509 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted1878 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted2508 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -13099,33 +19399,33 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1877 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result2507 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1877) + @types.Role::Other(result2507) } _ => panic() } - Option::Some(lifted1878) + Option::Some(lifted2508) } _ => panic() } - array1880.push(@types.NamedFieldType::{name : result1866, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1868, aliases : array1870, examples : array1873, deprecated : lifted1876, role : lifted1879}}) + array2510.push(@types.NamedFieldType::{name : result2496, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted2498, aliases : array2500, examples : array2503, deprecated : lifted2506, role : lifted2509}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array1880) + @types.SchemaTypeBody::RecordType(array2510) } 15 => { - let array1897 : Array[@types.VariantCaseType] = []; - for index1898 = 0; index1898 < (mbt_ffi_load32((iter_base) + 12)); index1898 = index1898 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1898 * 72) + let array2527 : Array[@types.VariantCaseType] = []; + for index2528 = 0; index2528 < (mbt_ffi_load32((iter_base) + 12)); index2528 = index2528 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2528 * 72) - let result1882 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2512 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1883 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2513 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -13134,53 +19434,53 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1885 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2515 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1884 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2514 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1884) + Option::Some(result2514) } _ => panic() } - let array1887 : Array[String] = []; - for index1888 = 0; index1888 < (mbt_ffi_load32((iter_base) + 32)); index1888 = index1888 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1888 * 8) + let array2517 : Array[String] = []; + for index2518 = 0; index2518 < (mbt_ffi_load32((iter_base) + 32)); index2518 = index2518 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2518 * 8) - let result1886 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2516 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1887.push(result1886) + array2517.push(result2516) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1890 : Array[String] = []; - for index1891 = 0; index1891 < (mbt_ffi_load32((iter_base) + 40)); index1891 = index1891 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1891 * 8) + let array2520 : Array[String] = []; + for index2521 = 0; index2521 < (mbt_ffi_load32((iter_base) + 40)); index2521 = index2521 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2521 * 8) - let result1889 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2519 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1890.push(result1889) + array2520.push(result2519) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1893 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted2523 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1892 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2522 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1892) + Option::Some(result2522) } _ => panic() } - let lifted1896 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2526 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1895 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted2525 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -13195,63 +19495,63 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1894 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result2524 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1894) + @types.Role::Other(result2524) } _ => panic() } - Option::Some(lifted1895) + Option::Some(lifted2525) } _ => panic() } - array1897.push(@types.VariantCaseType::{name : result1882, payload : lifted1883, metadata : @types.MetadataEnvelope::{doc : lifted1885, aliases : array1887, examples : array1890, deprecated : lifted1893, role : lifted1896}}) + array2527.push(@types.VariantCaseType::{name : result2512, payload : lifted2513, metadata : @types.MetadataEnvelope::{doc : lifted2515, aliases : array2517, examples : array2520, deprecated : lifted2523, role : lifted2526}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1897) + @types.SchemaTypeBody::VariantType(array2527) } 16 => { - let array1900 : Array[String] = []; - for index1901 = 0; index1901 < (mbt_ffi_load32((iter_base) + 12)); index1901 = index1901 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1901 * 8) + let array2530 : Array[String] = []; + for index2531 = 0; index2531 < (mbt_ffi_load32((iter_base) + 12)); index2531 = index2531 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2531 * 8) - let result1899 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2529 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1900.push(result1899) + array2530.push(result2529) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1900) + @types.SchemaTypeBody::EnumType(array2530) } 17 => { - let array1903 : Array[String] = []; - for index1904 = 0; index1904 < (mbt_ffi_load32((iter_base) + 12)); index1904 = index1904 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1904 * 8) + let array2533 : Array[String] = []; + for index2534 = 0; index2534 < (mbt_ffi_load32((iter_base) + 12)); index2534 = index2534 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2534 * 8) - let result1902 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2532 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1903.push(result1902) + array2533.push(result2532) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1903) + @types.SchemaTypeBody::FlagsType(array2533) } 18 => { - let array1905 : Array[Int] = []; - for index1906 = 0; index1906 < (mbt_ffi_load32((iter_base) + 12)); index1906 = index1906 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1906 * 4) + let array2535 : Array[Int] = []; + for index2536 = 0; index2536 < (mbt_ffi_load32((iter_base) + 12)); index2536 = index2536 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2536 * 4) - array1905.push(mbt_ffi_load32((iter_base) + 0)) + array2535.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1905) + @types.SchemaTypeBody::TupleType(array2535) } 19 => { @@ -13271,7 +19571,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 23 => { - let lifted1907 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2537 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -13280,7 +19580,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1908 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2538 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -13289,30 +19589,30 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1907, err : lifted1908}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted2537, err : lifted2538}) } 24 => { - let lifted1912 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2542 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1910 : Array[String] = []; - for index1911 = 0; index1911 < (mbt_ffi_load32((iter_base) + 16)); index1911 = index1911 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1911 * 8) + let array2540 : Array[String] = []; + for index2541 = 0; index2541 < (mbt_ffi_load32((iter_base) + 16)); index2541 = index2541 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2541 * 8) - let result1909 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2539 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1910.push(result1909) + array2540.push(result2539) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1910) + Option::Some(array2540) } _ => panic() } - let lifted1913 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2543 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -13321,7 +19621,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1914 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2544 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -13330,41 +19630,41 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1916 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2546 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1915 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2545 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1915) + Option::Some(result2545) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1912, min_length : lifted1913, max_length : lifted1914, regex : lifted1916}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted2542, min_length : lifted2543, max_length : lifted2544, regex : lifted2546}) } 25 => { - let lifted1920 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2550 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1918 : Array[String] = []; - for index1919 = 0; index1919 < (mbt_ffi_load32((iter_base) + 16)); index1919 = index1919 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1919 * 8) + let array2548 : Array[String] = []; + for index2549 = 0; index2549 < (mbt_ffi_load32((iter_base) + 16)); index2549 = index2549 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2549 * 8) - let result1917 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2547 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1918.push(result1917) + array2548.push(result2547) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1918) + Option::Some(array2548) } _ => panic() } - let lifted1921 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2551 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -13373,7 +19673,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted1922 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2552 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -13382,91 +19682,91 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1920, min_bytes : lifted1921, max_bytes : lifted1922}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted2550, min_bytes : lifted2551, max_bytes : lifted2552}) } 26 => { - let lifted1926 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2556 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1924 : Array[String] = []; - for index1925 = 0; index1925 < (mbt_ffi_load32((iter_base) + 20)); index1925 = index1925 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1925 * 8) + let array2554 : Array[String] = []; + for index2555 = 0; index2555 < (mbt_ffi_load32((iter_base) + 20)); index2555 = index2555 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2555 * 8) - let result1923 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2553 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1924.push(result1923) + array2554.push(result2553) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1924) + Option::Some(array2554) } _ => panic() } - let lifted1930 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2560 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1928 : Array[String] = []; - for index1929 = 0; index1929 < (mbt_ffi_load32((iter_base) + 32)); index1929 = index1929 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1929 * 8) + let array2558 : Array[String] = []; + for index2559 = 0; index2559 < (mbt_ffi_load32((iter_base) + 32)); index2559 = index2559 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2559 * 8) - let result1927 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2557 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1928.push(result1927) + array2558.push(result2557) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1928) + Option::Some(array2558) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1926, allowed_extensions : lifted1930}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted2556, allowed_extensions : lifted2560}) } 27 => { - let lifted1934 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2564 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1932 : Array[String] = []; - for index1933 = 0; index1933 < (mbt_ffi_load32((iter_base) + 16)); index1933 = index1933 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1933 * 8) + let array2562 : Array[String] = []; + for index2563 = 0; index2563 < (mbt_ffi_load32((iter_base) + 16)); index2563 = index2563 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2563 * 8) - let result1931 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2561 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1932.push(result1931) + array2562.push(result2561) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1932) + Option::Some(array2562) } _ => panic() } - let lifted1938 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2568 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1936 : Array[String] = []; - for index1937 = 0; index1937 < (mbt_ffi_load32((iter_base) + 28)); index1937 = index1937 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1937 * 8) + let array2566 : Array[String] = []; + for index2567 = 0; index2567 < (mbt_ffi_load32((iter_base) + 28)); index2567 = index2567 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2567 * 8) - let result1935 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1936.push(result1935) + array2566.push(result2565) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1936) + Option::Some(array2566) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1934, allowed_hosts : lifted1938}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted2564, allowed_hosts : lifted2568}) } 28 => { @@ -13478,148 +19778,148 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 30 => { - let result1939 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2569 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1941 : Array[String] = []; - for index1942 = 0; index1942 < (mbt_ffi_load32((iter_base) + 20)); index1942 = index1942 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1942 * 8) + let array2571 : Array[String] = []; + for index2572 = 0; index2572 < (mbt_ffi_load32((iter_base) + 20)); index2572 = index2572 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2572 * 8) - let result1940 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2570 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1941.push(result1940) + array2571.push(result2570) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1944 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2574 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1943 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2573 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1943}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result2573}) } _ => panic() } - let lifted1946 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2576 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1945 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result2575 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1945}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result2575}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1939, allowed_suffixes : array1941, min : lifted1944, max : lifted1946}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result2569, allowed_suffixes : array2571, min : lifted2574, max : lifted2576}) } 31 => { - let array1970 : Array[@types.UnionBranch] = []; - for index1971 = 0; index1971 < (mbt_ffi_load32((iter_base) + 12)); index1971 = index1971 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1971 * 92) + let array2600 : Array[@types.UnionBranch] = []; + for index2601 = 0; index2601 < (mbt_ffi_load32((iter_base) + 12)); index2601 = index2601 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2601 * 92) - let result1947 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2577 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1956 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted2586 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1948 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2578 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1948) + @types.DiscriminatorRule::Prefix(result2578) } 1 => { - let result1949 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2579 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1949) + @types.DiscriminatorRule::Suffix(result2579) } 2 => { - let result1950 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2580 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1950) + @types.DiscriminatorRule::Contains(result2580) } 3 => { - let result1951 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2581 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1951) + @types.DiscriminatorRule::Regex(result2581) } 4 => { - let result1952 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2582 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1954 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2584 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1953 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1953) + Option::Some(result2583) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1952, literal : lifted1954}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result2582, literal : lifted2584}) } 5 => { - let result1955 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2585 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1955) + @types.DiscriminatorRule::FieldAbsent(result2585) } _ => panic() } - let lifted1958 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2588 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1957 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2587 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1957) + Option::Some(result2587) } _ => panic() } - let array1960 : Array[String] = []; - for index1961 = 0; index1961 < (mbt_ffi_load32((iter_base) + 52)); index1961 = index1961 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1961 * 8) + let array2590 : Array[String] = []; + for index2591 = 0; index2591 < (mbt_ffi_load32((iter_base) + 52)); index2591 = index2591 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2591 * 8) - let result1959 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2589 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1960.push(result1959) + array2590.push(result2589) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1963 : Array[String] = []; - for index1964 = 0; index1964 < (mbt_ffi_load32((iter_base) + 60)); index1964 = index1964 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1964 * 8) + let array2593 : Array[String] = []; + for index2594 = 0; index2594 < (mbt_ffi_load32((iter_base) + 60)); index2594 = index2594 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2594 * 8) - let result1962 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2592 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1963.push(result1962) + array2593.push(result2592) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1966 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted2596 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1965 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result2595 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1965) + Option::Some(result2595) } _ => panic() } - let lifted1969 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted2599 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1968 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted2598 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -13634,57 +19934,57 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1967 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result2597 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1967) + @types.Role::Other(result2597) } _ => panic() } - Option::Some(lifted1968) + Option::Some(lifted2598) } _ => panic() } - array1970.push(@types.UnionBranch::{tag : result1947, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1956, metadata : @types.MetadataEnvelope::{doc : lifted1958, aliases : array1960, examples : array1963, deprecated : lifted1966, role : lifted1969}}) + array2600.push(@types.UnionBranch::{tag : result2577, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted2586, metadata : @types.MetadataEnvelope::{doc : lifted2588, aliases : array2590, examples : array2593, deprecated : lifted2596, role : lifted2599}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1970}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array2600}) } 32 => { - let lifted1973 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2603 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1972 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2602 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1972) + Option::Some(result2602) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1973}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted2603}) } 33 => { - let lifted1975 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2605 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1974 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2604 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1974) + Option::Some(result2604) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1975}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted2605}) } 34 => { - let lifted1976 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2606 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -13693,11 +19993,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1976) + @types.SchemaTypeBody::FutureType(lifted2606) } 35 => { - let lifted1977 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2607 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -13706,58 +20006,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1977) + @types.SchemaTypeBody::StreamType(lifted2607) } _ => panic() } - let lifted1980 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted2610 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1979 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result2609 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1979) + Option::Some(result2609) } _ => panic() } - let array1982 : Array[String] = []; - for index1983 = 0; index1983 < (mbt_ffi_load32((iter_base) + 104)); index1983 = index1983 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1983 * 8) + let array2612 : Array[String] = []; + for index2613 = 0; index2613 < (mbt_ffi_load32((iter_base) + 104)); index2613 = index2613 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index2613 * 8) - let result1981 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2611 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1982.push(result1981) + array2612.push(result2611) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1985 : Array[String] = []; - for index1986 = 0; index1986 < (mbt_ffi_load32((iter_base) + 112)); index1986 = index1986 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1986 * 8) + let array2615 : Array[String] = []; + for index2616 = 0; index2616 < (mbt_ffi_load32((iter_base) + 112)); index2616 = index2616 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index2616 * 8) - let result1984 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2614 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1985.push(result1984) + array2615.push(result2614) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1988 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted2618 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1987 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result2617 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1987) + Option::Some(result2617) } _ => panic() } - let lifted1991 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted2621 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1990 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted2620 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -13772,48 +20072,48 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result1989 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result2619 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1989) + @types.Role::Other(result2619) } _ => panic() } - Option::Some(lifted1990) + Option::Some(lifted2620) } _ => panic() } - array1992.push(@types.SchemaTypeNode::{body : lifted1978, metadata : @types.MetadataEnvelope::{doc : lifted1980, aliases : array1982, examples : array1985, deprecated : lifted1988, role : lifted1991}}) + array2622.push(@types.SchemaTypeNode::{body : lifted2608, metadata : @types.MetadataEnvelope::{doc : lifted2610, aliases : array2612, examples : array2615, deprecated : lifted2618, role : lifted2621}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let array1997 : Array[@types.SchemaTypeDef] = []; - for index1998 = 0; index1998 < (mbt_ffi_load32((iter_base) + 52)); index1998 = index1998 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1998 * 24) + let array2627 : Array[@types.SchemaTypeDef] = []; + for index2628 = 0; index2628 < (mbt_ffi_load32((iter_base) + 52)); index2628 = index2628 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2628 * 24) - let result1994 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2624 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1996 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2626 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1995 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2625 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1995) + Option::Some(result2625) } _ => panic() } - array1997.push(@types.SchemaTypeDef::{id : result1994, name : lifted1996, body : mbt_ffi_load32((iter_base) + 20)}) + array2627.push(@types.SchemaTypeDef::{id : result2624, name : lifted2626, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array2029 : Array[@types.SchemaValueNode] = []; - for index2030 = 0; index2030 < (mbt_ffi_load32((iter_base) + 64)); index2030 = index2030 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2030 * 32) + let array2659 : Array[@types.SchemaValueNode] = []; + for index2660 = 0; index2660 < (mbt_ffi_load32((iter_base) + 64)); index2660 = index2660 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2660 * 32) - let lifted2028 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2658 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -13864,25 +20164,25 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 12 => { - let result1999 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2629 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1999) + @types.SchemaValueNode::StringValue(result2629) } 13 => { - let array2000 : Array[Int] = []; - for index2001 = 0; index2001 < (mbt_ffi_load32((iter_base) + 12)); index2001 = index2001 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2001 * 4) + let array2630 : Array[Int] = []; + for index2631 = 0; index2631 < (mbt_ffi_load32((iter_base) + 12)); index2631 = index2631 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2631 * 4) - array2000.push(mbt_ffi_load32((iter_base) + 0)) + array2630.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array2000) + @types.SchemaValueNode::RecordValue(array2630) } 14 => { - let lifted2002 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2632 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -13891,7 +20191,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted2002}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted2632}) } 15 => { @@ -13899,67 +20199,67 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 16 => { - let array2003 : Array[Bool] = []; - for index2004 = 0; index2004 < (mbt_ffi_load32((iter_base) + 12)); index2004 = index2004 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2004 * 1) + let array2633 : Array[Bool] = []; + for index2634 = 0; index2634 < (mbt_ffi_load32((iter_base) + 12)); index2634 = index2634 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2634 * 1) - array2003.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array2633.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array2003) + @types.SchemaValueNode::FlagsValue(array2633) } 17 => { - let array2005 : Array[Int] = []; - for index2006 = 0; index2006 < (mbt_ffi_load32((iter_base) + 12)); index2006 = index2006 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2006 * 4) + let array2635 : Array[Int] = []; + for index2636 = 0; index2636 < (mbt_ffi_load32((iter_base) + 12)); index2636 = index2636 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2636 * 4) - array2005.push(mbt_ffi_load32((iter_base) + 0)) + array2635.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array2005) + @types.SchemaValueNode::TupleValue(array2635) } 18 => { - let array2007 : Array[Int] = []; - for index2008 = 0; index2008 < (mbt_ffi_load32((iter_base) + 12)); index2008 = index2008 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2008 * 4) + let array2637 : Array[Int] = []; + for index2638 = 0; index2638 < (mbt_ffi_load32((iter_base) + 12)); index2638 = index2638 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2638 * 4) - array2007.push(mbt_ffi_load32((iter_base) + 0)) + array2637.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array2007) + @types.SchemaValueNode::ListValue(array2637) } 19 => { - let array2009 : Array[Int] = []; - for index2010 = 0; index2010 < (mbt_ffi_load32((iter_base) + 12)); index2010 = index2010 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2010 * 4) + let array2639 : Array[Int] = []; + for index2640 = 0; index2640 < (mbt_ffi_load32((iter_base) + 12)); index2640 = index2640 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2640 * 4) - array2009.push(mbt_ffi_load32((iter_base) + 0)) + array2639.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array2009) + @types.SchemaValueNode::FixedListValue(array2639) } 20 => { - let array2011 : Array[@types.MapEntry] = []; - for index2012 = 0; index2012 < (mbt_ffi_load32((iter_base) + 12)); index2012 = index2012 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2012 * 8) + let array2641 : Array[@types.MapEntry] = []; + for index2642 = 0; index2642 < (mbt_ffi_load32((iter_base) + 12)); index2642 = index2642 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2642 * 8) - array2011.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array2641.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array2011) + @types.SchemaValueNode::MapValue(array2641) } 21 => { - let lifted2013 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2643 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -13968,14 +20268,14 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::OptionValue(lifted2013) + @types.SchemaValueNode::OptionValue(lifted2643) } 22 => { - let lifted2016 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2646 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted2014 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2644 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -13984,11 +20284,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::OkValue(lifted2014) + @types.ResultValuePayload::OkValue(lifted2644) } 1 => { - let lifted2015 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2645 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -13997,58 +20297,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::ErrValue(lifted2015) + @types.ResultValuePayload::ErrValue(lifted2645) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted2016) + @types.SchemaValueNode::ResultValue(lifted2646) } 23 => { - let result2017 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2647 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2019 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2649 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result2018 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2648 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result2018) + Option::Some(result2648) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result2017, language : lifted2019}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result2647, language : lifted2649}) } 24 => { - let result2020 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2650 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2022 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2652 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result2021 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2651 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result2021) + Option::Some(result2651) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result2020, mime_type : lifted2022}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result2650, mime_type : lifted2652}) } 25 => { - let result2023 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2653 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result2023) + @types.SchemaValueNode::PathValue(result2653) } 26 => { - let result2024 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2654 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result2024) + @types.SchemaValueNode::UrlValue(result2654) } 27 => { @@ -14060,21 +20360,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 29 => { - let result2025 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2655 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result2025}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result2655}) } 30 => { - let result2026 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2656 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result2026, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result2656, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result2027 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2657 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result2027}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result2657}) } 32 => { @@ -14083,47 +20383,47 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array2029.push(lifted2028) + array2659.push(lifted2658) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - let result2031 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 72), mbt_ffi_load32((iter_base) + 76)) + let result2661 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 72), mbt_ffi_load32((iter_base) + 76)) - let array2033 : Array[String] = []; - for index2034 = 0; index2034 < (mbt_ffi_load32((iter_base) + 84)); index2034 = index2034 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index2034 * 8) + let array2663 : Array[String] = []; + for index2664 = 0; index2664 < (mbt_ffi_load32((iter_base) + 84)); index2664 = index2664 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index2664 * 8) - let result2032 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2662 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2033.push(result2032) + array2663.push(result2662) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) - let array2048 : Array[Array[SpanData]] = []; - for index2049 = 0; index2049 < (mbt_ffi_load32((iter_base) + 92)); index2049 = index2049 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index2049 * 8) + let array2678 : Array[Array[SpanData]] = []; + for index2679 = 0; index2679 < (mbt_ffi_load32((iter_base) + 92)); index2679 = index2679 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index2679 * 8) - let array2046 : Array[SpanData] = []; - for index2047 = 0; index2047 < (mbt_ffi_load32((iter_base) + 4)); index2047 = index2047 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index2047 * 80) + let array2676 : Array[SpanData] = []; + for index2677 = 0; index2677 < (mbt_ffi_load32((iter_base) + 4)); index2677 = index2677 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index2677 * 80) - let lifted2045 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2675 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result2035 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2665 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2037 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted2667 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result2036 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2666 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result2036) + Option::Some(result2666) } _ => panic() } - let lifted2038 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted2668 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -14132,58 +20432,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let array2042 : Array[@context.Attribute] = []; - for index2043 = 0; index2043 < (mbt_ffi_load32((iter_base) + 68)); index2043 = index2043 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index2043 * 20) + let array2672 : Array[@context.Attribute] = []; + for index2673 = 0; index2673 < (mbt_ffi_load32((iter_base) + 68)); index2673 = index2673 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index2673 * 20) - let result2039 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2669 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted2041 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2671 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result2040 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2670 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result2040) + @context.AttributeValue::String(result2670) } _ => panic() } - array2042.push(@context.Attribute::{key : result2039, value : lifted2041}) + array2672.push(@context.Attribute::{key : result2669, value : lifted2671}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result2035, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted2037, linked_context : lifted2038, attributes : array2042, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result2665, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted2667, linked_context : lifted2668, attributes : array2672, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result2044 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2674 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result2044}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result2674}) } _ => panic() } - array2046.push(lifted2045) + array2676.push(lifted2675) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array2048.push(array2046) + array2678.push(array2676) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result1865, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1992, defs : array1997, root : mbt_ffi_load32((iter_base) + 56)}, value : @types.SchemaValueTree::{value_nodes : array2029, root : mbt_ffi_load32((iter_base) + 68)}}, trace_id : result2031, trace_states : array2033, invocation_context : array2048}) + AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result2425, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array2622, defs : array2627, root : mbt_ffi_load32((iter_base) + 56)}, value : @types.SchemaValueTree::{value_nodes : array2659, root : mbt_ffi_load32((iter_base) + 68)}}, trace_id : result2661, trace_states : array2663, invocation_context : array2678}) } 1 => { - let result2050 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2680 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result2051 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2681 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let array2178 : Array[@types.SchemaTypeNode] = []; - for index2179 = 0; index2179 < (mbt_ffi_load32((iter_base) + 52)); index2179 = index2179 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2179 * 144) + let array2878 : Array[@types.SchemaTypeNode] = []; + for index2879 = 0; index2879 < (mbt_ffi_load32((iter_base) + 52)); index2879 = index2879 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2879 * 144) - let lifted2164 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2864 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -14194,43 +20494,743 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 2 => { - @types.SchemaTypeBody::S8Type + let lifted2688 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2683 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2682 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2682) + } + _ => panic() + } + + let lifted2685 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2684 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2684) + } + _ => panic() + } + + let lifted2687 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2686 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2686) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2683, max : lifted2685, unit : lifted2687}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted2688) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted2695 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2690 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2689 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2689) + } + _ => panic() + } + + let lifted2692 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2691 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2691) + } + _ => panic() + } + + let lifted2694 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2693 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2693) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2690, max : lifted2692, unit : lifted2694}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted2695) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted2702 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2697 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2696 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2696) + } + _ => panic() + } + + let lifted2699 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2698 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2698) + } + _ => panic() + } + + let lifted2701 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2700 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2700) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2697, max : lifted2699, unit : lifted2701}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted2702) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted2709 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2704 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2703 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2703) + } + _ => panic() + } + + let lifted2706 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2705 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2705) + } + _ => panic() + } + + let lifted2708 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2707 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2707) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2704, max : lifted2706, unit : lifted2708}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted2709) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted2716 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2711 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2710 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2710) + } + _ => panic() + } + + let lifted2713 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2712 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2712) + } + _ => panic() + } + + let lifted2715 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2714) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2711, max : lifted2713, unit : lifted2715}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted2716) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted2723 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2718 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2717 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2717) + } + _ => panic() + } + + let lifted2720 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2719 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2719) + } + _ => panic() + } + + let lifted2722 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2721 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2721) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2718, max : lifted2720, unit : lifted2722}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted2723) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted2730 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2725 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2724 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2724) + } + _ => panic() + } + + let lifted2727 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2726 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2726) + } + _ => panic() + } + + let lifted2729 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2728 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2728) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2725, max : lifted2727, unit : lifted2729}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2730) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted2737 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2732 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2731 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2731) + } + _ => panic() + } + + let lifted2734 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2733 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2733) + } + _ => panic() + } + + let lifted2736 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2735 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2735) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2732, max : lifted2734, unit : lifted2736}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2737) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted2744 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2739 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2738 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2738) + } + _ => panic() + } + + let lifted2741 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2740 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2740) + } + _ => panic() + } + + let lifted2743 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2742 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2742) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2739, max : lifted2741, unit : lifted2743}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2744) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted2751 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2746 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2745 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2745) + } + _ => panic() + } + + let lifted2748 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2747 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2747) + } + _ => panic() + } + + let lifted2750 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2749 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2749) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2746, max : lifted2748, unit : lifted2750}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2751) } 12 => { @@ -14242,59 +21242,59 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 14 => { - let array2066 : Array[@types.NamedFieldType] = []; - for index2067 = 0; index2067 < (mbt_ffi_load32((iter_base) + 12)); index2067 = index2067 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2067 * 68) + let array2766 : Array[@types.NamedFieldType] = []; + for index2767 = 0; index2767 < (mbt_ffi_load32((iter_base) + 12)); index2767 = index2767 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2767 * 68) - let result2052 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2752 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted2054 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2754 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result2053 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2753 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result2053) + Option::Some(result2753) } _ => panic() } - let array2056 : Array[String] = []; - for index2057 = 0; index2057 < (mbt_ffi_load32((iter_base) + 28)); index2057 = index2057 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2057 * 8) + let array2756 : Array[String] = []; + for index2757 = 0; index2757 < (mbt_ffi_load32((iter_base) + 28)); index2757 = index2757 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2757 * 8) - let result2055 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2755 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2056.push(result2055) + array2756.push(result2755) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array2059 : Array[String] = []; - for index2060 = 0; index2060 < (mbt_ffi_load32((iter_base) + 36)); index2060 = index2060 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index2060 * 8) + let array2759 : Array[String] = []; + for index2760 = 0; index2760 < (mbt_ffi_load32((iter_base) + 36)); index2760 = index2760 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index2760 * 8) - let result2058 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2758 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2059.push(result2058) + array2759.push(result2758) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted2062 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted2762 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result2061 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2761 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result2061) + Option::Some(result2761) } _ => panic() } - let lifted2065 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted2765 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted2064 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted2764 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -14309,33 +21309,33 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result2063 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result2763 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result2063) + @types.Role::Other(result2763) } _ => panic() } - Option::Some(lifted2064) + Option::Some(lifted2764) } _ => panic() } - array2066.push(@types.NamedFieldType::{name : result2052, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted2054, aliases : array2056, examples : array2059, deprecated : lifted2062, role : lifted2065}}) + array2766.push(@types.NamedFieldType::{name : result2752, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted2754, aliases : array2756, examples : array2759, deprecated : lifted2762, role : lifted2765}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array2066) + @types.SchemaTypeBody::RecordType(array2766) } 15 => { - let array2083 : Array[@types.VariantCaseType] = []; - for index2084 = 0; index2084 < (mbt_ffi_load32((iter_base) + 12)); index2084 = index2084 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2084 * 72) + let array2783 : Array[@types.VariantCaseType] = []; + for index2784 = 0; index2784 < (mbt_ffi_load32((iter_base) + 12)); index2784 = index2784 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2784 * 72) - let result2068 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2768 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted2069 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2769 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -14344,53 +21344,53 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted2071 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2771 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result2070 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2770 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result2070) + Option::Some(result2770) } _ => panic() } - let array2073 : Array[String] = []; - for index2074 = 0; index2074 < (mbt_ffi_load32((iter_base) + 32)); index2074 = index2074 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2074 * 8) + let array2773 : Array[String] = []; + for index2774 = 0; index2774 < (mbt_ffi_load32((iter_base) + 32)); index2774 = index2774 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2774 * 8) - let result2072 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2772 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2073.push(result2072) + array2773.push(result2772) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array2076 : Array[String] = []; - for index2077 = 0; index2077 < (mbt_ffi_load32((iter_base) + 40)); index2077 = index2077 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2077 * 8) + let array2776 : Array[String] = []; + for index2777 = 0; index2777 < (mbt_ffi_load32((iter_base) + 40)); index2777 = index2777 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2777 * 8) - let result2075 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2775 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2076.push(result2075) + array2776.push(result2775) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted2079 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted2779 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result2078 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2778 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result2078) + Option::Some(result2778) } _ => panic() } - let lifted2082 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2782 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted2081 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted2781 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -14405,63 +21405,63 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result2080 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result2780 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result2080) + @types.Role::Other(result2780) } _ => panic() } - Option::Some(lifted2081) + Option::Some(lifted2781) } _ => panic() } - array2083.push(@types.VariantCaseType::{name : result2068, payload : lifted2069, metadata : @types.MetadataEnvelope::{doc : lifted2071, aliases : array2073, examples : array2076, deprecated : lifted2079, role : lifted2082}}) + array2783.push(@types.VariantCaseType::{name : result2768, payload : lifted2769, metadata : @types.MetadataEnvelope::{doc : lifted2771, aliases : array2773, examples : array2776, deprecated : lifted2779, role : lifted2782}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array2083) + @types.SchemaTypeBody::VariantType(array2783) } 16 => { - let array2086 : Array[String] = []; - for index2087 = 0; index2087 < (mbt_ffi_load32((iter_base) + 12)); index2087 = index2087 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2087 * 8) + let array2786 : Array[String] = []; + for index2787 = 0; index2787 < (mbt_ffi_load32((iter_base) + 12)); index2787 = index2787 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2787 * 8) - let result2085 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2785 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2086.push(result2085) + array2786.push(result2785) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array2086) + @types.SchemaTypeBody::EnumType(array2786) } 17 => { - let array2089 : Array[String] = []; - for index2090 = 0; index2090 < (mbt_ffi_load32((iter_base) + 12)); index2090 = index2090 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2090 * 8) + let array2789 : Array[String] = []; + for index2790 = 0; index2790 < (mbt_ffi_load32((iter_base) + 12)); index2790 = index2790 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2790 * 8) - let result2088 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2788 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2089.push(result2088) + array2789.push(result2788) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array2089) + @types.SchemaTypeBody::FlagsType(array2789) } 18 => { - let array2091 : Array[Int] = []; - for index2092 = 0; index2092 < (mbt_ffi_load32((iter_base) + 12)); index2092 = index2092 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2092 * 4) + let array2791 : Array[Int] = []; + for index2792 = 0; index2792 < (mbt_ffi_load32((iter_base) + 12)); index2792 = index2792 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2792 * 4) - array2091.push(mbt_ffi_load32((iter_base) + 0)) + array2791.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array2091) + @types.SchemaTypeBody::TupleType(array2791) } 19 => { @@ -14481,7 +21481,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 23 => { - let lifted2093 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2793 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -14490,7 +21490,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted2094 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2794 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -14499,30 +21499,30 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted2093, err : lifted2094}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted2793, err : lifted2794}) } 24 => { - let lifted2098 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2798 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array2096 : Array[String] = []; - for index2097 = 0; index2097 < (mbt_ffi_load32((iter_base) + 16)); index2097 = index2097 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2097 * 8) + let array2796 : Array[String] = []; + for index2797 = 0; index2797 < (mbt_ffi_load32((iter_base) + 16)); index2797 = index2797 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2797 * 8) - let result2095 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2795 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2096.push(result2095) + array2796.push(result2795) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array2096) + Option::Some(array2796) } _ => panic() } - let lifted2099 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2799 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -14531,7 +21531,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted2100 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2800 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -14540,41 +21540,41 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted2102 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2802 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result2101 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2801 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result2101) + Option::Some(result2801) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted2098, min_length : lifted2099, max_length : lifted2100, regex : lifted2102}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted2798, min_length : lifted2799, max_length : lifted2800, regex : lifted2802}) } 25 => { - let lifted2106 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2806 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array2104 : Array[String] = []; - for index2105 = 0; index2105 < (mbt_ffi_load32((iter_base) + 16)); index2105 = index2105 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2105 * 8) + let array2804 : Array[String] = []; + for index2805 = 0; index2805 < (mbt_ffi_load32((iter_base) + 16)); index2805 = index2805 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2805 * 8) - let result2103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2803 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2104.push(result2103) + array2804.push(result2803) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array2104) + Option::Some(array2804) } _ => panic() } - let lifted2107 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2807 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -14583,7 +21583,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let lifted2108 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2808 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -14592,91 +21592,91 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted2106, min_bytes : lifted2107, max_bytes : lifted2108}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted2806, min_bytes : lifted2807, max_bytes : lifted2808}) } 26 => { - let lifted2112 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2812 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array2110 : Array[String] = []; - for index2111 = 0; index2111 < (mbt_ffi_load32((iter_base) + 20)); index2111 = index2111 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2111 * 8) + let array2810 : Array[String] = []; + for index2811 = 0; index2811 < (mbt_ffi_load32((iter_base) + 20)); index2811 = index2811 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2811 * 8) - let result2109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2809 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2110.push(result2109) + array2810.push(result2809) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array2110) + Option::Some(array2810) } _ => panic() } - let lifted2116 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2816 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array2114 : Array[String] = []; - for index2115 = 0; index2115 < (mbt_ffi_load32((iter_base) + 32)); index2115 = index2115 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2115 * 8) + let array2814 : Array[String] = []; + for index2815 = 0; index2815 < (mbt_ffi_load32((iter_base) + 32)); index2815 = index2815 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2815 * 8) - let result2113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2813 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2114.push(result2113) + array2814.push(result2813) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array2114) + Option::Some(array2814) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted2112, allowed_extensions : lifted2116}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted2812, allowed_extensions : lifted2816}) } 27 => { - let lifted2120 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2820 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array2118 : Array[String] = []; - for index2119 = 0; index2119 < (mbt_ffi_load32((iter_base) + 16)); index2119 = index2119 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2119 * 8) + let array2818 : Array[String] = []; + for index2819 = 0; index2819 < (mbt_ffi_load32((iter_base) + 16)); index2819 = index2819 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2819 * 8) - let result2117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2817 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2118.push(result2117) + array2818.push(result2817) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array2118) + Option::Some(array2818) } _ => panic() } - let lifted2124 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2824 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array2122 : Array[String] = []; - for index2123 = 0; index2123 < (mbt_ffi_load32((iter_base) + 28)); index2123 = index2123 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2123 * 8) + let array2822 : Array[String] = []; + for index2823 = 0; index2823 < (mbt_ffi_load32((iter_base) + 28)); index2823 = index2823 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2823 * 8) - let result2121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2821 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2122.push(result2121) + array2822.push(result2821) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array2122) + Option::Some(array2822) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted2120, allowed_hosts : lifted2124}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted2820, allowed_hosts : lifted2824}) } 28 => { @@ -14688,148 +21688,148 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 30 => { - let result2125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2825 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array2127 : Array[String] = []; - for index2128 = 0; index2128 < (mbt_ffi_load32((iter_base) + 20)); index2128 = index2128 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2128 * 8) + let array2827 : Array[String] = []; + for index2828 = 0; index2828 < (mbt_ffi_load32((iter_base) + 20)); index2828 = index2828 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2828 * 8) - let result2126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2826 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2127.push(result2126) + array2827.push(result2826) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted2130 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2830 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result2129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2829 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result2129}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result2829}) } _ => panic() } - let lifted2132 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2832 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result2131 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result2831 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result2131}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result2831}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result2125, allowed_suffixes : array2127, min : lifted2130, max : lifted2132}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result2825, allowed_suffixes : array2827, min : lifted2830, max : lifted2832}) } 31 => { - let array2156 : Array[@types.UnionBranch] = []; - for index2157 = 0; index2157 < (mbt_ffi_load32((iter_base) + 12)); index2157 = index2157 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2157 * 92) + let array2856 : Array[@types.UnionBranch] = []; + for index2857 = 0; index2857 < (mbt_ffi_load32((iter_base) + 12)); index2857 = index2857 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2857 * 92) - let result2133 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2833 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted2142 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted2842 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result2134 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2834 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result2134) + @types.DiscriminatorRule::Prefix(result2834) } 1 => { - let result2135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2835 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result2135) + @types.DiscriminatorRule::Suffix(result2835) } 2 => { - let result2136 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2836 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result2136) + @types.DiscriminatorRule::Contains(result2836) } 3 => { - let result2137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2837 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result2137) + @types.DiscriminatorRule::Regex(result2837) } 4 => { - let result2138 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2838 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted2140 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2840 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result2139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2839 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result2139) + Option::Some(result2839) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result2138, literal : lifted2140}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result2838, literal : lifted2840}) } 5 => { - let result2141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2841 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result2141) + @types.DiscriminatorRule::FieldAbsent(result2841) } _ => panic() } - let lifted2144 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2844 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result2143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2843 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result2143) + Option::Some(result2843) } _ => panic() } - let array2146 : Array[String] = []; - for index2147 = 0; index2147 < (mbt_ffi_load32((iter_base) + 52)); index2147 = index2147 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2147 * 8) + let array2846 : Array[String] = []; + for index2847 = 0; index2847 < (mbt_ffi_load32((iter_base) + 52)); index2847 = index2847 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2847 * 8) - let result2145 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2845 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2146.push(result2145) + array2846.push(result2845) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array2149 : Array[String] = []; - for index2150 = 0; index2150 < (mbt_ffi_load32((iter_base) + 60)); index2150 = index2150 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2150 * 8) + let array2849 : Array[String] = []; + for index2850 = 0; index2850 < (mbt_ffi_load32((iter_base) + 60)); index2850 = index2850 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2850 * 8) - let result2148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2848 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2149.push(result2148) + array2849.push(result2848) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted2152 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted2852 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result2151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result2851 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result2151) + Option::Some(result2851) } _ => panic() } - let lifted2155 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted2855 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted2154 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted2854 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -14844,57 +21844,57 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result2153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result2853 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result2153) + @types.Role::Other(result2853) } _ => panic() } - Option::Some(lifted2154) + Option::Some(lifted2854) } _ => panic() } - array2156.push(@types.UnionBranch::{tag : result2133, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted2142, metadata : @types.MetadataEnvelope::{doc : lifted2144, aliases : array2146, examples : array2149, deprecated : lifted2152, role : lifted2155}}) + array2856.push(@types.UnionBranch::{tag : result2833, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted2842, metadata : @types.MetadataEnvelope::{doc : lifted2844, aliases : array2846, examples : array2849, deprecated : lifted2852, role : lifted2855}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array2156}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array2856}) } 32 => { - let lifted2159 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2859 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result2158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2858 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result2158) + Option::Some(result2858) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted2159}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted2859}) } 33 => { - let lifted2161 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2861 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result2160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2860 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result2160) + Option::Some(result2860) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted2161}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted2861}) } 34 => { - let lifted2162 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2862 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -14903,11 +21903,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::FutureType(lifted2162) + @types.SchemaTypeBody::FutureType(lifted2862) } 35 => { - let lifted2163 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2863 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -14916,58 +21916,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaTypeBody::StreamType(lifted2163) + @types.SchemaTypeBody::StreamType(lifted2863) } _ => panic() } - let lifted2166 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted2866 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result2165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result2865 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result2165) + Option::Some(result2865) } _ => panic() } - let array2168 : Array[String] = []; - for index2169 = 0; index2169 < (mbt_ffi_load32((iter_base) + 104)); index2169 = index2169 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index2169 * 8) + let array2868 : Array[String] = []; + for index2869 = 0; index2869 < (mbt_ffi_load32((iter_base) + 104)); index2869 = index2869 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index2869 * 8) - let result2167 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2867 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2168.push(result2167) + array2868.push(result2867) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array2171 : Array[String] = []; - for index2172 = 0; index2172 < (mbt_ffi_load32((iter_base) + 112)); index2172 = index2172 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index2172 * 8) + let array2871 : Array[String] = []; + for index2872 = 0; index2872 < (mbt_ffi_load32((iter_base) + 112)); index2872 = index2872 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index2872 * 8) - let result2170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2870 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2171.push(result2170) + array2871.push(result2870) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted2174 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted2874 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result2173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result2873 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result2173) + Option::Some(result2873) } _ => panic() } - let lifted2177 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted2877 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted2176 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted2876 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -14982,48 +21982,48 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result2175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result2875 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result2175) + @types.Role::Other(result2875) } _ => panic() } - Option::Some(lifted2176) + Option::Some(lifted2876) } _ => panic() } - array2178.push(@types.SchemaTypeNode::{body : lifted2164, metadata : @types.MetadataEnvelope::{doc : lifted2166, aliases : array2168, examples : array2171, deprecated : lifted2174, role : lifted2177}}) + array2878.push(@types.SchemaTypeNode::{body : lifted2864, metadata : @types.MetadataEnvelope::{doc : lifted2866, aliases : array2868, examples : array2871, deprecated : lifted2874, role : lifted2877}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array2183 : Array[@types.SchemaTypeDef] = []; - for index2184 = 0; index2184 < (mbt_ffi_load32((iter_base) + 60)); index2184 = index2184 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2184 * 24) + let array2883 : Array[@types.SchemaTypeDef] = []; + for index2884 = 0; index2884 < (mbt_ffi_load32((iter_base) + 60)); index2884 = index2884 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2884 * 24) - let result2180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2880 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted2182 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2882 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result2181 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2881 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result2181) + Option::Some(result2881) } _ => panic() } - array2183.push(@types.SchemaTypeDef::{id : result2180, name : lifted2182, body : mbt_ffi_load32((iter_base) + 20)}) + array2883.push(@types.SchemaTypeDef::{id : result2880, name : lifted2882, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let array2215 : Array[@types.SchemaValueNode] = []; - for index2216 = 0; index2216 < (mbt_ffi_load32((iter_base) + 72)); index2216 = index2216 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index2216 * 32) + let array2915 : Array[@types.SchemaValueNode] = []; + for index2916 = 0; index2916 < (mbt_ffi_load32((iter_base) + 72)); index2916 = index2916 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index2916 * 32) - let lifted2214 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2914 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -15074,25 +22074,25 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 12 => { - let result2185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2885 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result2185) + @types.SchemaValueNode::StringValue(result2885) } 13 => { - let array2186 : Array[Int] = []; - for index2187 = 0; index2187 < (mbt_ffi_load32((iter_base) + 12)); index2187 = index2187 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2187 * 4) + let array2886 : Array[Int] = []; + for index2887 = 0; index2887 < (mbt_ffi_load32((iter_base) + 12)); index2887 = index2887 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2887 * 4) - array2186.push(mbt_ffi_load32((iter_base) + 0)) + array2886.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array2186) + @types.SchemaValueNode::RecordValue(array2886) } 14 => { - let lifted2188 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2888 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -15101,7 +22101,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted2188}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted2888}) } 15 => { @@ -15109,67 +22109,67 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 16 => { - let array2189 : Array[Bool] = []; - for index2190 = 0; index2190 < (mbt_ffi_load32((iter_base) + 12)); index2190 = index2190 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2190 * 1) + let array2889 : Array[Bool] = []; + for index2890 = 0; index2890 < (mbt_ffi_load32((iter_base) + 12)); index2890 = index2890 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2890 * 1) - array2189.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array2889.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array2189) + @types.SchemaValueNode::FlagsValue(array2889) } 17 => { - let array2191 : Array[Int] = []; - for index2192 = 0; index2192 < (mbt_ffi_load32((iter_base) + 12)); index2192 = index2192 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2192 * 4) + let array2891 : Array[Int] = []; + for index2892 = 0; index2892 < (mbt_ffi_load32((iter_base) + 12)); index2892 = index2892 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2892 * 4) - array2191.push(mbt_ffi_load32((iter_base) + 0)) + array2891.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array2191) + @types.SchemaValueNode::TupleValue(array2891) } 18 => { - let array2193 : Array[Int] = []; - for index2194 = 0; index2194 < (mbt_ffi_load32((iter_base) + 12)); index2194 = index2194 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2194 * 4) + let array2893 : Array[Int] = []; + for index2894 = 0; index2894 < (mbt_ffi_load32((iter_base) + 12)); index2894 = index2894 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2894 * 4) - array2193.push(mbt_ffi_load32((iter_base) + 0)) + array2893.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array2193) + @types.SchemaValueNode::ListValue(array2893) } 19 => { - let array2195 : Array[Int] = []; - for index2196 = 0; index2196 < (mbt_ffi_load32((iter_base) + 12)); index2196 = index2196 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2196 * 4) + let array2895 : Array[Int] = []; + for index2896 = 0; index2896 < (mbt_ffi_load32((iter_base) + 12)); index2896 = index2896 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2896 * 4) - array2195.push(mbt_ffi_load32((iter_base) + 0)) + array2895.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array2195) + @types.SchemaValueNode::FixedListValue(array2895) } 20 => { - let array2197 : Array[@types.MapEntry] = []; - for index2198 = 0; index2198 < (mbt_ffi_load32((iter_base) + 12)); index2198 = index2198 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2198 * 8) + let array2897 : Array[@types.MapEntry] = []; + for index2898 = 0; index2898 < (mbt_ffi_load32((iter_base) + 12)); index2898 = index2898 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2898 * 8) - array2197.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array2897.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array2197) + @types.SchemaValueNode::MapValue(array2897) } 21 => { - let lifted2199 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2899 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -15178,14 +22178,14 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.SchemaValueNode::OptionValue(lifted2199) + @types.SchemaValueNode::OptionValue(lifted2899) } 22 => { - let lifted2202 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2902 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted2200 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2900 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -15194,11 +22194,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::OkValue(lifted2200) + @types.ResultValuePayload::OkValue(lifted2900) } 1 => { - let lifted2201 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2901 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -15207,58 +22207,58 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @types.ResultValuePayload::ErrValue(lifted2201) + @types.ResultValuePayload::ErrValue(lifted2901) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted2202) + @types.SchemaValueNode::ResultValue(lifted2902) } 23 => { - let result2203 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2903 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2205 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2905 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result2204 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2904 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result2204) + Option::Some(result2904) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result2203, language : lifted2205}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result2903, language : lifted2905}) } 24 => { - let result2206 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2906 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2208 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2908 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result2207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2907 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result2207) + Option::Some(result2907) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result2206, mime_type : lifted2208}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result2906, mime_type : lifted2908}) } 25 => { - let result2209 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2909 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result2209) + @types.SchemaValueNode::PathValue(result2909) } 26 => { - let result2210 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2910 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result2210) + @types.SchemaValueNode::UrlValue(result2910) } 27 => { @@ -15270,21 +22270,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 29 => { - let result2211 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2911 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result2211}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result2911}) } 30 => { - let result2212 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2912 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result2212, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result2912, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result2213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2913 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result2213}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result2913}) } 32 => { @@ -15293,47 +22293,47 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array2215.push(lifted2214) + array2915.push(lifted2914) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - let result2217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) + let result2917 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) - let array2219 : Array[String] = []; - for index2220 = 0; index2220 < (mbt_ffi_load32((iter_base) + 92)); index2220 = index2220 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index2220 * 8) + let array2919 : Array[String] = []; + for index2920 = 0; index2920 < (mbt_ffi_load32((iter_base) + 92)); index2920 = index2920 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index2920 * 8) - let result2218 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2918 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array2219.push(result2218) + array2919.push(result2918) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - let array2234 : Array[Array[SpanData]] = []; - for index2235 = 0; index2235 < (mbt_ffi_load32((iter_base) + 100)); index2235 = index2235 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index2235 * 8) + let array2934 : Array[Array[SpanData]] = []; + for index2935 = 0; index2935 < (mbt_ffi_load32((iter_base) + 100)); index2935 = index2935 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index2935 * 8) - let array2232 : Array[SpanData] = []; - for index2233 = 0; index2233 < (mbt_ffi_load32((iter_base) + 4)); index2233 = index2233 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index2233 * 80) + let array2932 : Array[SpanData] = []; + for index2933 = 0; index2933 < (mbt_ffi_load32((iter_base) + 4)); index2933 = index2933 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index2933 * 80) - let lifted2231 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2931 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result2221 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2921 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2223 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted2923 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result2222 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2922 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result2222) + Option::Some(result2922) } _ => panic() } - let lifted2224 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted2924 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -15342,46 +22342,46 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - let array2228 : Array[@context.Attribute] = []; - for index2229 = 0; index2229 < (mbt_ffi_load32((iter_base) + 68)); index2229 = index2229 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index2229 * 20) + let array2928 : Array[@context.Attribute] = []; + for index2929 = 0; index2929 < (mbt_ffi_load32((iter_base) + 68)); index2929 = index2929 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index2929 * 20) - let result2225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2925 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted2227 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2927 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result2226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2926 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result2226) + @context.AttributeValue::String(result2926) } _ => panic() } - array2228.push(@context.Attribute::{key : result2225, value : lifted2227}) + array2928.push(@context.Attribute::{key : result2925, value : lifted2927}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result2221, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted2223, linked_context : lifted2224, attributes : array2228, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result2921, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted2923, linked_context : lifted2924, attributes : array2928, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result2230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2930 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result2230}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result2930}) } _ => panic() } - array2232.push(lifted2231) + array2932.push(lifted2931) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array2234.push(array2232) + array2934.push(array2932) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 96)) - AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result2050, method_name : result2051, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array2178, defs : array2183, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array2215, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result2217, trace_states : array2219, invocation_context : array2234}) + AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result2680, method_name : result2681, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array2878, defs : array2883, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array2915, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result2917, trace_states : array2919, invocation_context : array2934}) } 2 => { @@ -15389,17 +22389,17 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 3 => { - let result2236 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2936 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result2237 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2937 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result2236, mime_type : result2237}}) + AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result2936, mime_type : result2937}}) } 4 => { - let result2238 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2938 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result2238}) + AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result2938}) } 5 => { @@ -15408,70 +22408,70 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - PublicOplogEntry::PendingAgentInvocation(PendingAgentInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, invocation : lifted2239}) + PublicOplogEntry::PendingAgentInvocation(PendingAgentInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, invocation : lifted2939}) } 15 => { - let lifted2242 = match (mbt_ffi_load8_u((iter_base) + 32)) { + let lifted2942 = match (mbt_ffi_load8_u((iter_base) + 32)) { 0 => { UpdateDescription::AutoUpdate } 1 => { - let result2240 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2940 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - let result2241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2941 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - UpdateDescription::SnapshotBased(@host.Snapshot::{payload : result2240, mime_type : result2241}) + UpdateDescription::SnapshotBased(@host.Snapshot::{payload : result2940, mime_type : result2941}) } _ => panic() } - PublicOplogEntry::PendingUpdate(PendingUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), description : lifted2242}) + PublicOplogEntry::PendingUpdate(PendingUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), description : lifted2942}) } 16 => { - let array2249 : Array[PluginInstallationDescription] = []; - for index2250 = 0; index2250 < (mbt_ffi_load32((iter_base) + 44)); index2250 = index2250 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index2250 * 48) + let array2949 : Array[PluginInstallationDescription] = []; + for index2950 = 0; index2950 < (mbt_ffi_load32((iter_base) + 44)); index2950 = index2950 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index2950 * 48) - let result2243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2943 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - let result2244 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2944 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - let array2247 : Array[(String, String)] = []; - for index2248 = 0; index2248 < (mbt_ffi_load32((iter_base) + 40)); index2248 = index2248 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2248 * 16) + let array2947 : Array[(String, String)] = []; + for index2948 = 0; index2948 < (mbt_ffi_load32((iter_base) + 40)); index2948 = index2948 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2948 * 16) - let result2245 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2945 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result2246 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2946 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array2247.push((result2245, result2246)) + array2947.push((result2945, result2946)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - array2249.push(PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 0)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 16), plugin_name : result2243, plugin_version : result2244, parameters : array2247}) + array2949.push(PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 0)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 16), plugin_name : result2943, plugin_version : result2944, parameters : array2947}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - PublicOplogEntry::SuccessfulUpdate(SuccessfulUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), new_component_size : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), new_active_plugins : array2249}) + PublicOplogEntry::SuccessfulUpdate(SuccessfulUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), new_component_size : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), new_active_plugins : array2949}) } 17 => { - let lifted2252 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted2952 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result2251 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2951 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result2251) + Option::Some(result2951) } _ => panic() } - PublicOplogEntry::FailedUpdate(FailedUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), details : lifted2252}) + PublicOplogEntry::FailedUpdate(FailedUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), details : lifted2952}) } 18 => { @@ -15483,27 +22483,27 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 20 => { - let result2253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2953 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result2254 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2954 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - PublicOplogEntry::CreateResource(CreateResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), name : result2253, owner : result2254}) + PublicOplogEntry::CreateResource(CreateResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), name : result2953, owner : result2954}) } 21 => { - let result2255 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2955 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result2256 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2956 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - PublicOplogEntry::DropResource(DropResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), name : result2255, owner : result2256}) + PublicOplogEntry::DropResource(DropResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), name : result2955, owner : result2956}) } 22 => { - let result2257 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2957 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - let result2258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2958 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - PublicOplogEntry::Log(LogParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, level : LogLevel::from(mbt_ffi_load8_u((iter_base) + 24)), context : result2257, message : result2258}) + PublicOplogEntry::Log(LogParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, level : LogLevel::from(mbt_ffi_load8_u((iter_base) + 24)), context : result2957, message : result2958}) } 23 => { @@ -15511,43 +22511,43 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 24 => { - let result2259 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2959 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - let result2260 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result2960 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - let array2263 : Array[(String, String)] = []; - for index2264 = 0; index2264 < (mbt_ffi_load32((iter_base) + 64)); index2264 = index2264 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2264 * 16) + let array2963 : Array[(String, String)] = []; + for index2964 = 0; index2964 < (mbt_ffi_load32((iter_base) + 64)); index2964 = index2964 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2964 * 16) - let result2261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2961 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result2262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2962 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array2263.push((result2261, result2262)) + array2963.push((result2961, result2962)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - PublicOplogEntry::ActivatePlugin(ActivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result2259, plugin_version : result2260, parameters : array2263}}) + PublicOplogEntry::ActivatePlugin(ActivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result2959, plugin_version : result2960, parameters : array2963}}) } 25 => { - let result2265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2965 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - let result2266 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result2966 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - let array2269 : Array[(String, String)] = []; - for index2270 = 0; index2270 < (mbt_ffi_load32((iter_base) + 64)); index2270 = index2270 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2270 * 16) + let array2969 : Array[(String, String)] = []; + for index2970 = 0; index2970 < (mbt_ffi_load32((iter_base) + 64)); index2970 = index2970 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2970 * 16) - let result2267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2967 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result2268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2968 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array2269.push((result2267, result2268)) + array2969.push((result2967, result2968)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - PublicOplogEntry::DeactivatePlugin(DeactivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result2265, plugin_version : result2266, parameters : array2269}}) + PublicOplogEntry::DeactivatePlugin(DeactivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result2965, plugin_version : result2966, parameters : array2969}}) } 26 => { @@ -15555,85 +22555,85 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 27 => { - let result2271 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2971 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - PublicOplogEntry::CancelPendingInvocation(CancelPendingInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, idempotency_key : result2271}) + PublicOplogEntry::CancelPendingInvocation(CancelPendingInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, idempotency_key : result2971}) } 28 => { - let result2272 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2972 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let lifted2274 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted2974 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result2273 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2973 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result2273) + Option::Some(result2973) } _ => panic() } - let lifted2276 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted2976 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result2275 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2975 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result2275) + Option::Some(result2975) } _ => panic() } - let array2280 : Array[@context.Attribute] = []; - for index2281 = 0; index2281 < (mbt_ffi_load32((iter_base) + 60)); index2281 = index2281 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2281 * 20) + let array2980 : Array[@context.Attribute] = []; + for index2981 = 0; index2981 < (mbt_ffi_load32((iter_base) + 60)); index2981 = index2981 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2981 * 20) - let result2277 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2977 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted2279 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2979 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result2278 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2978 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result2278) + @context.AttributeValue::String(result2978) } _ => panic() } - array2280.push(@context.Attribute::{key : result2277, value : lifted2279}) + array2980.push(@context.Attribute::{key : result2977, value : lifted2979}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - PublicOplogEntry::StartSpan(StartSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result2272, parent : lifted2274, linked_context_id : lifted2276, attributes : array2280}) + PublicOplogEntry::StartSpan(StartSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result2972, parent : lifted2974, linked_context_id : lifted2976, attributes : array2980}) } 29 => { - let result2282 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2982 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - PublicOplogEntry::FinishSpan(FinishSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result2282}) + PublicOplogEntry::FinishSpan(FinishSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result2982}) } 30 => { - let result2283 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2983 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let result2284 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2984 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let lifted2286 = match (mbt_ffi_load8_u((iter_base) + 40)) { + let lifted2986 = match (mbt_ffi_load8_u((iter_base) + 40)) { 0 => { - let result2285 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2985 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - @context.AttributeValue::String(result2285) + @context.AttributeValue::String(result2985) } _ => panic() } - PublicOplogEntry::SetSpanAttribute(SetSpanAttributeParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result2283, key : result2284, value : lifted2286}) + PublicOplogEntry::SetSpanAttribute(SetSpanAttributeParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result2983, key : result2984, value : lifted2986}) } 31 => { - let lifted2287 = match (mbt_ffi_load8_u((iter_base) + 24)) { + let lifted2987 = match (mbt_ffi_load8_u((iter_base) + 24)) { 0 => { @host.PersistenceLevel::PersistNothing @@ -15649,13 +22649,13 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - PublicOplogEntry::ChangePersistenceLevel(ChangePersistenceLevelParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, persistence_level : lifted2287}) + PublicOplogEntry::ChangePersistenceLevel(ChangePersistenceLevelParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, persistence_level : lifted2987}) } 32 => { - let result2288 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2988 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - PublicOplogEntry::BeginRemoteTransaction(BeginRemoteTransactionParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, transaction_id : result2288}) + PublicOplogEntry::BeginRemoteTransaction(BeginRemoteTransactionParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, transaction_id : result2988}) } 33 => { @@ -15675,53 +22675,53 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 37 => { - let result2289 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2989 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let result2290 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2990 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - PublicOplogEntry::Snapshot(SnapshotParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, data : SnapshotData::{data : result2289, mime_type : result2290}}) + PublicOplogEntry::Snapshot(SnapshotParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, data : SnapshotData::{data : result2989, mime_type : result2990}}) } 38 => { - let result2291 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2991 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - let result2292 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result2992 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - let array2295 : Array[(String, String)] = []; - for index2296 = 0; index2296 < (mbt_ffi_load32((iter_base) + 64)); index2296 = index2296 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2296 * 16) + let array2995 : Array[(String, String)] = []; + for index2996 = 0; index2996 < (mbt_ffi_load32((iter_base) + 64)); index2996 = index2996 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2996 * 16) - let result2293 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2993 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result2294 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2994 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array2295.push((result2293, result2294)) + array2995.push((result2993, result2994)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - let result2297 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) + let result2997 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) - PublicOplogEntry::OplogProcessorCheckpoint(OplogProcessorCheckpointParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result2291, plugin_version : result2292, parameters : array2295}, target_agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}}, agent_id : result2297}, confirmed_up_to : (mbt_ffi_load64((iter_base) + 96)).reinterpret_as_uint64(), sending_up_to : (mbt_ffi_load64((iter_base) + 104)).reinterpret_as_uint64(), last_batch_start : (mbt_ffi_load64((iter_base) + 112)).reinterpret_as_uint64()}) + PublicOplogEntry::OplogProcessorCheckpoint(OplogProcessorCheckpointParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result2991, plugin_version : result2992, parameters : array2995}, target_agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}}, agent_id : result2997}, confirmed_up_to : (mbt_ffi_load64((iter_base) + 96)).reinterpret_as_uint64(), sending_up_to : (mbt_ffi_load64((iter_base) + 104)).reinterpret_as_uint64(), last_batch_start : (mbt_ffi_load64((iter_base) + 112)).reinterpret_as_uint64()}) } 39 => { - let result2298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2998 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let array2330 : Array[@retry.PredicateNode] = []; - for index2331 = 0; index2331 < (mbt_ffi_load32((iter_base) + 40)); index2331 = index2331 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2331 * 32) + let array3030 : Array[@retry.PredicateNode] = []; + for index3031 = 0; index3031 < (mbt_ffi_load32((iter_base) + 40)); index3031 = index3031 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index3031 * 32) - let lifted2329 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted3029 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result2299 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2999 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2301 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3001 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3000 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2300) + @retry.PredicateValue::Text(result3000) } 1 => { @@ -15734,18 +22734,18 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result2299, value : lifted2301}) + @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result2999, value : lifted3001}) } 1 => { - let result2302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3002 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2304 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3004 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2303 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3003 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2303) + @retry.PredicateValue::Text(result3003) } 1 => { @@ -15758,18 +22758,18 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result2302, value : lifted2304}) + @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result3002, value : lifted3004}) } 2 => { - let result2305 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3005 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2307 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3007 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2306 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3006 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2306) + @retry.PredicateValue::Text(result3006) } 1 => { @@ -15782,18 +22782,18 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result2305, value : lifted2307}) + @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result3005, value : lifted3007}) } 3 => { - let result2308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3008 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2310 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3010 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2309 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3009 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2309) + @retry.PredicateValue::Text(result3009) } 1 => { @@ -15806,18 +22806,18 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result2308, value : lifted2310}) + @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result3008, value : lifted3010}) } 4 => { - let result2311 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3011 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2313 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3013 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2312 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3012 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2312) + @retry.PredicateValue::Text(result3012) } 1 => { @@ -15830,18 +22830,18 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result2311, value : lifted2313}) + @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result3011, value : lifted3013}) } 5 => { - let result2314 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3014 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2316 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3016 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2315 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3015 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2315) + @retry.PredicateValue::Text(result3015) } 1 => { @@ -15854,28 +22854,28 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result2314, value : lifted2316}) + @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result3014, value : lifted3016}) } 6 => { - let result2317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3017 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateNode::PropExists(result2317) + @retry.PredicateNode::PropExists(result3017) } 7 => { - let result2318 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3018 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array2321 : Array[@retry.PredicateValue] = []; - for index2322 = 0; index2322 < (mbt_ffi_load32((iter_base) + 20)); index2322 = index2322 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2322 * 16) + let array3021 : Array[@retry.PredicateValue] = []; + for index3022 = 0; index3022 < (mbt_ffi_load32((iter_base) + 20)); index3022 = index3022 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index3022 * 16) - let lifted2320 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted3020 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result2319 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3019 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateValue::Text(result2319) + @retry.PredicateValue::Text(result3019) } 1 => { @@ -15888,35 +22888,35 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array2321.push(lifted2320) + array3021.push(lifted3020) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result2318, values : array2321}) + @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result3018, values : array3021}) } 8 => { - let result2323 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3023 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result2324 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result3024 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result2323, pattern : result2324}) + @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result3023, pattern : result3024}) } 9 => { - let result2325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3025 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result2326 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result3026 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result2325, pattern : result2326}) + @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result3025, pattern : result3026}) } 10 => { - let result2327 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3027 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result2328 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result3028 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result2327, pattern : result2328}) + @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result3027, pattern : result3028}) } 11 => { @@ -15941,15 +22941,15 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array2330.push(lifted2329) + array3030.push(lifted3029) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array2366 : Array[@retry.PolicyNode] = []; - for index2367 = 0; index2367 < (mbt_ffi_load32((iter_base) + 48)); index2367 = index2367 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index2367 * 32) + let array3066 : Array[@retry.PolicyNode] = []; + for index3067 = 0; index3067 < (mbt_ffi_load32((iter_base) + 48)); index3067 = index3067 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index3067 * 32) - let lifted2365 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted3065 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @retry.PolicyNode::Periodic((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) @@ -15992,21 +22992,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty } 10 => { - let array2363 : Array[@retry.PredicateNode] = []; - for index2364 = 0; index2364 < (mbt_ffi_load32((iter_base) + 12)); index2364 = index2364 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2364 * 32) + let array3063 : Array[@retry.PredicateNode] = []; + for index3064 = 0; index3064 < (mbt_ffi_load32((iter_base) + 12)); index3064 = index3064 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index3064 * 32) - let lifted2362 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted3062 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result2332 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3032 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2334 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3034 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2333 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3033 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2333) + @retry.PredicateValue::Text(result3033) } 1 => { @@ -16019,18 +23019,18 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result2332, value : lifted2334}) + @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result3032, value : lifted3034}) } 1 => { - let result2335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3035 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2337 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3037 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2336 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3036 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2336) + @retry.PredicateValue::Text(result3036) } 1 => { @@ -16043,18 +23043,18 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result2335, value : lifted2337}) + @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result3035, value : lifted3037}) } 2 => { - let result2338 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3038 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2340 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3040 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2339 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3039 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2339) + @retry.PredicateValue::Text(result3039) } 1 => { @@ -16067,18 +23067,18 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result2338, value : lifted2340}) + @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result3038, value : lifted3040}) } 3 => { - let result2341 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3041 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2343 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3043 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3042 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2342) + @retry.PredicateValue::Text(result3042) } 1 => { @@ -16091,18 +23091,18 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result2341, value : lifted2343}) + @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result3041, value : lifted3043}) } 4 => { - let result2344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3044 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2346 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3046 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3045 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2345) + @retry.PredicateValue::Text(result3045) } 1 => { @@ -16115,18 +23115,18 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result2344, value : lifted2346}) + @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result3044, value : lifted3046}) } 5 => { - let result2347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3047 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted2349 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted3049 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result2348 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3048 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result2348) + @retry.PredicateValue::Text(result3048) } 1 => { @@ -16139,28 +23139,28 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result2347, value : lifted2349}) + @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result3047, value : lifted3049}) } 6 => { - let result2350 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3050 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateNode::PropExists(result2350) + @retry.PredicateNode::PropExists(result3050) } 7 => { - let result2351 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3051 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array2354 : Array[@retry.PredicateValue] = []; - for index2355 = 0; index2355 < (mbt_ffi_load32((iter_base) + 20)); index2355 = index2355 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2355 * 16) + let array3054 : Array[@retry.PredicateValue] = []; + for index3055 = 0; index3055 < (mbt_ffi_load32((iter_base) + 20)); index3055 = index3055 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index3055 * 16) - let lifted2353 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted3053 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result2352 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3052 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateValue::Text(result2352) + @retry.PredicateValue::Text(result3052) } 1 => { @@ -16173,35 +23173,35 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array2354.push(lifted2353) + array3054.push(lifted3053) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result2351, values : array2354}) + @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result3051, values : array3054}) } 8 => { - let result2356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3056 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result2357 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result3057 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result2356, pattern : result2357}) + @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result3056, pattern : result3057}) } 9 => { - let result2358 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3058 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result2359 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result3059 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result2358, pattern : result2359}) + @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result3058, pattern : result3059}) } 10 => { - let result2360 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result3060 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result2361 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result3061 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result2360, pattern : result2361}) + @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result3060, pattern : result3061}) } 11 => { @@ -16226,11 +23226,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array2363.push(lifted2362) + array3063.push(lifted3062) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @retry.PolicyNode::FilteredOn(@retry.FilteredConfig::{predicate : @retry.RetryPredicate::{nodes : array2363}, inner : mbt_ffi_load32((iter_base) + 16)}) + @retry.PolicyNode::FilteredOn(@retry.FilteredConfig::{predicate : @retry.RetryPredicate::{nodes : array3063}, inner : mbt_ffi_load32((iter_base) + 16)}) } 11 => { @@ -16247,21 +23247,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array2366.push(lifted2365) + array3066.push(lifted3065) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) - PublicOplogEntry::SetRetryPolicy(SetRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, policy : @retry.NamedRetryPolicy::{name : result2298, priority : (mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint(), predicate : @retry.RetryPredicate::{nodes : array2330}, policy : @retry.RetryPolicy::{nodes : array2366}}}) + PublicOplogEntry::SetRetryPolicy(SetRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, policy : @retry.NamedRetryPolicy::{name : result2998, priority : (mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint(), predicate : @retry.RetryPredicate::{nodes : array3030}, policy : @retry.RetryPolicy::{nodes : array3066}}}) } 40 => { - let result2368 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result3068 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - PublicOplogEntry::RemoveRetryPolicy(RemoveRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, name : result2368}) + PublicOplogEntry::RemoveRetryPolicy(RemoveRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, name : result3068}) } 41 => { - let lifted2369 = match (mbt_ffi_load8_u((iter_base) + 24)) { + let lifted3069 = match (mbt_ffi_load8_u((iter_base) + 24)) { 0 => { PublicQueuedCardEvent::Install(PublicQueuedCardEventCard::{card_id : @types.CardId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64()}}}) @@ -16273,11 +23273,11 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - PublicOplogEntry::CardEventQueued(CardEventQueuedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, event : lifted2369}) + PublicOplogEntry::CardEventQueued(CardEventQueuedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, event : lifted3069}) } 42 => { - let lifted2370 : UInt64? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted3070 : UInt64? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { @@ -16286,7 +23286,7 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - PublicOplogEntry::CardInstalled(CardInstalledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, queued_event_index : lifted2370, card_id : @types.CardId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 48)).reinterpret_as_uint64()}}}) + PublicOplogEntry::CardInstalled(CardInstalledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, queued_event_index : lifted3070, card_id : @types.CardId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 48)).reinterpret_as_uint64()}}}) } 43 => { @@ -16299,21 +23299,21 @@ pub fn enrich_oplog_entries(environment_id : @host.EnvironmentId, agent_id : @ty _ => panic() } - array2372.push(lifted2371) + array3072.push(lifted3071) } mbt_ffi_free(mbt_ffi_load32((return_area) + 4)) - Result::Ok(array2372) + Result::Ok(array3072) } 1 => { - let result2374 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 4), mbt_ffi_load32((return_area) + 8)) + let result3074 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 4), mbt_ffi_load32((return_area) + 8)) - Result::Err(result2374) + Result::Err(result3074) } _ => panic() } - let ret = lifted2375 + let ret = lifted3075 mbt_ffi_free(ptr) mbt_ffi_free(address458) mbt_ffi_free(return_area) @@ -16339,15 +23339,15 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { let return_area = mbt_ffi_malloc(12) wasmImportMethodGetOplogGetNext(handle, return_area); - let lifted1913 : Array[PublicOplogEntry]? = match mbt_ffi_load8_u((return_area) + 0) { + let lifted2613 : Array[PublicOplogEntry]? = match mbt_ffi_load8_u((return_area) + 0) { 0 => Option::None 1 => { - let array1911 : Array[PublicOplogEntry] = []; - for index1912 = 0; index1912 < (mbt_ffi_load32((return_area) + 8)); index1912 = index1912 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 4)) + (index1912 * 208) + let array2611 : Array[PublicOplogEntry] = []; + for index2612 = 0; index2612 < (mbt_ffi_load32((return_area) + 8)); index2612 = index2612 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 4)) + (index2612 * 208) - let lifted1910 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2610 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) @@ -16399,9 +23399,9 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 152)) - let array179 : Array[LocalAgentConfigEntry] = []; - for index180 = 0; index180 < (mbt_ffi_load32((iter_base) + 164)); index180 = index180 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 160)) + (index180 * 40) + let array249 : Array[LocalAgentConfigEntry] = []; + for index250 = 0; index250 < (mbt_ffi_load32((iter_base) + 164)); index250 = index250 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 160)) + (index250 * 40) let array12 : Array[String] = []; for index13 = 0; index13 < (mbt_ffi_load32((iter_base) + 4)); index13 = index13 + 1 { @@ -16413,11 +23413,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - let array140 : Array[@types.SchemaTypeNode] = []; - for index141 = 0; index141 < (mbt_ffi_load32((iter_base) + 12)); index141 = index141 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index141 * 144) + let array210 : Array[@types.SchemaTypeNode] = []; + for index211 = 0; index211 < (mbt_ffi_load32((iter_base) + 12)); index211 = index211 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index211 * 144) - let lifted126 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted196 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -16428,642 +23428,1342 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted20 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted15 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted14 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted14) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted17 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted16 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array28 : Array[@types.NamedFieldType] = []; - for index29 = 0; index29 < (mbt_ffi_load32((iter_base) + 12)); index29 = index29 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index29 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result14 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted16) + } + _ => panic() + } - let lifted16 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted19 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result15 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result18 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result15) + Option::Some(result18) + } + _ => panic() } - _ => panic() - } - let array18 : Array[String] = []; - for index19 = 0; index19 < (mbt_ffi_load32((iter_base) + 28)); index19 = index19 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index19 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted15, max : lifted17, unit : lifted19}) + } + _ => panic() + } - let result17 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted20) + } + 3 => { - array18.push(result17) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted27 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array21 : Array[String] = []; - for index22 = 0; index22 < (mbt_ffi_load32((iter_base) + 36)); index22 = index22 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index22 * 8) + let lifted22 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result20 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted21 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array21.push(result20) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted24 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result23 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result23) + Option::Some(lifted21) + } + _ => panic() } - _ => panic() - } - let lifted27 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted24 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted26 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted23 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - let result25 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result25) - } - _ => panic() + Option::Some(lifted23) } + _ => panic() + } + + let lifted26 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some(lifted26) + let result25 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result25) + } + _ => panic() } - _ => panic() - } - array28.push(@types.NamedFieldType::{name : result14, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted16, aliases : array18, examples : array21, deprecated : lifted24, role : lifted27}}) + Option::Some(@types.NumericRestrictions::{min : lifted22, max : lifted24, unit : lifted26}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array28) + @types.SchemaTypeBody::S16Type(lifted27) } - 15 => { + 4 => { - let array45 : Array[@types.VariantCaseType] = []; - for index46 = 0; index46 < (mbt_ffi_load32((iter_base) + 12)); index46 = index46 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index46 * 72) + let lifted34 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result30 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted29 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted31 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted28 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted33 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result32 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result32) + Option::Some(lifted28) + } + _ => panic() } - _ => panic() - } - let array35 : Array[String] = []; - for index36 = 0; index36 < (mbt_ffi_load32((iter_base) + 32)); index36 = index36 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index36 * 8) + let lifted31 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result34 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted30 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - array35.push(result34) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let array38 : Array[String] = []; - for index39 = 0; index39 < (mbt_ffi_load32((iter_base) + 40)); index39 = index39 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index39 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result37 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array38.push(result37) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + Option::Some(lifted30) + } + _ => panic() + } - let lifted41 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + let lifted33 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result40 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result32 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result40) + Option::Some(result32) + } + _ => panic() } - _ => panic() + + Option::Some(@types.NumericRestrictions::{min : lifted29, max : lifted31, unit : lifted33}) } + _ => panic() + } - let lifted44 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::S32Type(lifted34) + } + 5 => { - let lifted43 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + let lifted41 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.Role::Multimodal - } - 1 => { + let lifted36 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredText - } - 2 => { + let lifted35 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.Role::UnstructuredBinary - } - 3 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result42 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::Other(result42) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() - } - Option::Some(lifted43) + Option::Some(lifted35) + } + _ => panic() } - _ => panic() - } - array45.push(@types.VariantCaseType::{name : result30, payload : lifted31, metadata : @types.MetadataEnvelope::{doc : lifted33, aliases : array35, examples : array38, deprecated : lifted41, role : lifted44}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted38 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::VariantType(array45) - } - 16 => { + let lifted37 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array48 : Array[String] = []; - for index49 = 0; index49 < (mbt_ffi_load32((iter_base) + 12)); index49 = index49 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index49 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result47 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - array48.push(result47) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::EnumType(array48) - } - 17 => { + Option::Some(lifted37) + } + _ => panic() + } + + let lifted40 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let array51 : Array[String] = []; - for index52 = 0; index52 < (mbt_ffi_load32((iter_base) + 12)); index52 = index52 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index52 * 8) + let result39 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result50 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(result39) + } + _ => panic() + } - array51.push(result50) + Option::Some(@types.NumericRestrictions::{min : lifted36, max : lifted38, unit : lifted40}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array51) + @types.SchemaTypeBody::S64Type(lifted41) } - 18 => { + 6 => { - let array53 : Array[Int] = []; - for index54 = 0; index54 < (mbt_ffi_load32((iter_base) + 12)); index54 = index54 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index54 * 4) + let lifted48 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array53.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted43 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::TupleType(array53) - } - 19 => { + let lifted42 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) - } - 23 => { + Option::Some(lifted42) + } + _ => panic() + } - let lifted55 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted45 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let lifted44 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted56 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 20)) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted55, err : lifted56}) - } - 24 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted60 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + Option::Some(lifted44) + } + _ => panic() + } - let array58 : Array[String] = []; - for index59 = 0; index59 < (mbt_ffi_load32((iter_base) + 16)); index59 = index59 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index59 * 8) + let lifted47 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result57 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result46 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array58.push(result57) + Option::Some(result46) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array58) + Option::Some(@types.NumericRestrictions::{min : lifted43, max : lifted45, unit : lifted47}) } _ => panic() } - let lifted61 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + @types.SchemaTypeBody::U8Type(lifted48) + } + 7 => { + + let lifted55 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let lifted50 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted62 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let lifted49 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted64 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result63 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result63) - } - _ => panic() - } + Option::Some(lifted49) + } + _ => panic() + } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted60, min_length : lifted61, max_length : lifted62, regex : lifted64}) - } - 25 => { + let lifted52 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted68 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted51 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array66 : Array[String] = []; - for index67 = 0; index67 < (mbt_ffi_load32((iter_base) + 16)); index67 = index67 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index67 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result65 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - array66.push(result65) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(array66) - } - _ => panic() - } + Option::Some(lifted51) + } + _ => panic() + } - let lifted69 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let lifted54 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let result53 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted70 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + Option::Some(result53) + } + _ => panic() + } - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + Option::Some(@types.NumericRestrictions::{min : lifted50, max : lifted52, unit : lifted54}) } _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted68, min_bytes : lifted69, max_bytes : lifted70}) + @types.SchemaTypeBody::U16Type(lifted55) } - 26 => { + 8 => { - let lifted74 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted62 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array72 : Array[String] = []; - for index73 = 0; index73 < (mbt_ffi_load32((iter_base) + 20)); index73 = index73 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index73 * 8) + let lifted57 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result71 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted56 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array72.push(result71) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - Option::Some(array72) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted78 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let array76 : Array[String] = []; - for index77 = 0; index77 < (mbt_ffi_load32((iter_base) + 32)); index77 = index77 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index77 * 8) + Option::Some(lifted56) + } + _ => panic() + } - let result75 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted59 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - array76.push(result75) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let lifted58 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - Option::Some(array76) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted74, allowed_extensions : lifted78}) - } - 27 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted82 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted58) + } + _ => panic() + } - let array80 : Array[String] = []; - for index81 = 0; index81 < (mbt_ffi_load32((iter_base) + 16)); index81 = index81 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index81 * 8) + let lifted61 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result60 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array80.push(result79) + Option::Some(result60) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array80) + Option::Some(@types.NumericRestrictions::{min : lifted57, max : lifted59, unit : lifted61}) } _ => panic() } - let lifted86 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + @types.SchemaTypeBody::U32Type(lifted62) + } + 9 => { + + let lifted69 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array84 : Array[String] = []; - for index85 = 0; index85 < (mbt_ffi_load32((iter_base) + 28)); index85 = index85 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index85 * 8) - - let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted64 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - array84.push(result83) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted63 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(array84) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted82, allowed_hosts : lifted86}) - } - 28 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::DatetimeType - } - 29 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::DurationType - } - 30 => { + Option::Some(lifted63) + } + _ => panic() + } - let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted66 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array89 : Array[String] = []; - for index90 = 0; index90 < (mbt_ffi_load32((iter_base) + 20)); index90 = index90 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index90 * 8) + let lifted65 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - array89.push(result88) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted92 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result91 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + Option::Some(lifted65) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result91}) - } - _ => panic() - } + let lifted68 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted94 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let result67 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + Option::Some(result67) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result93}) + Option::Some(@types.NumericRestrictions::{min : lifted64, max : lifted66, unit : lifted68}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result87, allowed_suffixes : array89, min : lifted92, max : lifted94}) + @types.SchemaTypeBody::U64Type(lifted69) } - 31 => { + 10 => { - let array118 : Array[@types.UnionBranch] = []; - for index119 = 0; index119 < (mbt_ffi_load32((iter_base) + 12)); index119 = index119 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index119 * 92) + let lifted76 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result95 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted71 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted104 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + let lifted70 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result96 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.DiscriminatorRule::Prefix(result96) - } - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result97 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.DiscriminatorRule::Suffix(result97) + Option::Some(lifted70) + } + _ => panic() } - 2 => { - let result98 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - @types.DiscriminatorRule::Contains(result98) - } - 3 => { + let lifted73 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result99 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted72 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.DiscriminatorRule::Regex(result99) - } - 4 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted102 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted72) + } + _ => panic() + } + + let lifted75 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result74 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result74) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted71, max : lifted73, unit : lifted75}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted76) + } + 11 => { + + let lifted83 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted78 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted77 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted77) + } + _ => panic() + } + + let lifted80 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted79 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted79) + } + _ => panic() + } + + let lifted82 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result81) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted78, max : lifted80, unit : lifted82}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted83) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array98 : Array[@types.NamedFieldType] = []; + for index99 = 0; index99 < (mbt_ffi_load32((iter_base) + 12)); index99 = index99 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index99 * 68) + + let result84 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted86 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result85) + } + _ => panic() + } + + let array88 : Array[String] = []; + for index89 = 0; index89 < (mbt_ffi_load32((iter_base) + 28)); index89 = index89 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index89 * 8) + + let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array88.push(result87) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array91 : Array[String] = []; + for index92 = 0; index92 < (mbt_ffi_load32((iter_base) + 36)); index92 = index92 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index92 * 8) + + let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array91.push(result90) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted94 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result93) + } + _ => panic() + } + + let lifted97 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted96 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } 1 => { - let result101 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result95 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - Option::Some(result101) + @types.Role::Other(result95) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result100, literal : lifted102}) + Option::Some(lifted96) } - 5 => { + _ => panic() + } + + array98.push(@types.NamedFieldType::{name : result84, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted86, aliases : array88, examples : array91, deprecated : lifted94, role : lifted97}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array98) + } + 15 => { + + let array115 : Array[@types.VariantCaseType] = []; + for index116 = 0; index116 < (mbt_ffi_load32((iter_base) + 12)); index116 = index116 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index116 * 72) + + let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted101 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.DiscriminatorRule::FieldAbsent(result103) + Option::Some(mbt_ffi_load32((iter_base) + 12)) } _ => panic() } - let lifted106 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted103 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result102 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result105) + Option::Some(result102) } _ => panic() } + let array105 : Array[String] = []; + for index106 = 0; index106 < (mbt_ffi_load32((iter_base) + 32)); index106 = index106 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index106 * 8) + + let result104 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array105.push(result104) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let array108 : Array[String] = []; - for index109 = 0; index109 < (mbt_ffi_load32((iter_base) + 52)); index109 = index109 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index109 * 8) + for index109 = 0; index109 < (mbt_ffi_load32((iter_base) + 40)); index109 = index109 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index109 * 8) let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) array108.push(result107) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + + let lifted111 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { + + let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + + Option::Some(result110) + } + _ => panic() + } + + let lifted114 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let lifted113 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + + @types.Role::Other(result112) + } + _ => panic() + } + + Option::Some(lifted113) + } + _ => panic() + } + + array115.push(@types.VariantCaseType::{name : result100, payload : lifted101, metadata : @types.MetadataEnvelope::{doc : lifted103, aliases : array105, examples : array108, deprecated : lifted111, role : lifted114}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::VariantType(array115) + } + 16 => { + + let array118 : Array[String] = []; + for index119 = 0; index119 < (mbt_ffi_load32((iter_base) + 12)); index119 = index119 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index119 * 8) + + let result117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array118.push(result117) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::EnumType(array118) + } + 17 => { + + let array121 : Array[String] = []; + for index122 = 0; index122 < (mbt_ffi_load32((iter_base) + 12)); index122 = index122 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index122 * 8) + + let result120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array121.push(result120) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::FlagsType(array121) + } + 18 => { + + let array123 : Array[Int] = []; + for index124 = 0; index124 < (mbt_ffi_load32((iter_base) + 12)); index124 = index124 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index124 * 4) + + array123.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::TupleType(array123) + } + 19 => { + + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { + + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { + + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { + + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { + + let lifted125 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + let lifted126 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } + + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted125, err : lifted126}) + } + 24 => { + + let lifted130 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array128 : Array[String] = []; + for index129 = 0; index129 < (mbt_ffi_load32((iter_base) + 16)); index129 = index129 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index129 * 8) + + let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array128.push(result127) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array128) + } + _ => panic() + } + + let lifted131 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted132 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted134 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result133 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result133) + } + _ => panic() + } + + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted130, min_length : lifted131, max_length : lifted132, regex : lifted134}) + } + 25 => { + + let lifted138 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array136 : Array[String] = []; + for index137 = 0; index137 < (mbt_ffi_load32((iter_base) + 16)); index137 = index137 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index137 * 8) + + let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array136.push(result135) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array136) + } + _ => panic() + } + + let lifted139 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted140 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted138, min_bytes : lifted139, max_bytes : lifted140}) + } + 26 => { + + let lifted144 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let array142 : Array[String] = []; + for index143 = 0; index143 < (mbt_ffi_load32((iter_base) + 20)); index143 = index143 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index143 * 8) + + let result141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array142.push(result141) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + Option::Some(array142) + } + _ => panic() + } + + let lifted148 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let array146 : Array[String] = []; + for index147 = 0; index147 < (mbt_ffi_load32((iter_base) + 32)); index147 = index147 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index147 * 8) + + let result145 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array146.push(result145) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + Option::Some(array146) + } + _ => panic() + } + + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted144, allowed_extensions : lifted148}) + } + 27 => { + + let lifted152 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array150 : Array[String] = []; + for index151 = 0; index151 < (mbt_ffi_load32((iter_base) + 16)); index151 = index151 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index151 * 8) + + let result149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array150.push(result149) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array150) + } + _ => panic() + } + + let lifted156 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + let array154 : Array[String] = []; + for index155 = 0; index155 < (mbt_ffi_load32((iter_base) + 28)); index155 = index155 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index155 * 8) + + let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array154.push(result153) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + Option::Some(array154) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted152, allowed_hosts : lifted156}) + } + 28 => { + + @types.SchemaTypeBody::DatetimeType + } + 29 => { + + @types.SchemaTypeBody::DurationType + } + 30 => { + + let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let array159 : Array[String] = []; + for index160 = 0; index160 < (mbt_ffi_load32((iter_base) + 20)); index160 = index160 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index160 * 8) + + let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array159.push(result158) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + let lifted162 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result161 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result161}) + } + _ => panic() + } + + let lifted164 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let result163 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result163}) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result157, allowed_suffixes : array159, min : lifted162, max : lifted164}) + } + 31 => { + + let array188 : Array[@types.UnionBranch] = []; + for index189 = 0; index189 < (mbt_ffi_load32((iter_base) + 12)); index189 = index189 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index189 * 92) + + let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted174 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { + + let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Prefix(result166) + } + 1 => { + + let result167 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Suffix(result167) + } + 2 => { + + let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Contains(result168) + } + 3 => { + + let result169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Regex(result169) + } + 4 => { + + let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + let lifted172 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result171 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + + Option::Some(result171) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result170, literal : lifted172}) + } + 5 => { + + let result173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::FieldAbsent(result173) + } + _ => panic() + } + + let lifted176 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result175) + } + _ => panic() + } + + let array178 : Array[String] = []; + for index179 = 0; index179 < (mbt_ffi_load32((iter_base) + 52)); index179 = index179 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index179 * 8) + + let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array178.push(result177) + } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array111 : Array[String] = []; - for index112 = 0; index112 < (mbt_ffi_load32((iter_base) + 60)); index112 = index112 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index112 * 8) + let array181 : Array[String] = []; + for index182 = 0; index182 < (mbt_ffi_load32((iter_base) + 60)); index182 = index182 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index182 * 8) - let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array111.push(result110) + array181.push(result180) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted114 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted184 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result113) + Option::Some(result183) } _ => panic() } - let lifted117 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted187 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted116 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted186 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -17078,57 +24778,57 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result115) + @types.Role::Other(result185) } _ => panic() } - Option::Some(lifted116) + Option::Some(lifted186) } _ => panic() } - array118.push(@types.UnionBranch::{tag : result95, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted104, metadata : @types.MetadataEnvelope::{doc : lifted106, aliases : array108, examples : array111, deprecated : lifted114, role : lifted117}}) + array188.push(@types.UnionBranch::{tag : result165, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted174, metadata : @types.MetadataEnvelope::{doc : lifted176, aliases : array178, examples : array181, deprecated : lifted184, role : lifted187}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array118}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array188}) } 32 => { - let lifted121 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted191 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result120) + Option::Some(result190) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted121}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted191}) } 33 => { - let lifted123 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted193 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result122 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result122) + Option::Some(result192) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted123}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted193}) } 34 => { - let lifted124 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted194 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -17137,11 +24837,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted124) + @types.SchemaTypeBody::FutureType(lifted194) } 35 => { - let lifted125 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted195 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -17150,58 +24850,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::StreamType(lifted125) + @types.SchemaTypeBody::StreamType(lifted195) } _ => panic() } - let lifted128 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted198 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result127) + Option::Some(result197) } _ => panic() } - let array130 : Array[String] = []; - for index131 = 0; index131 < (mbt_ffi_load32((iter_base) + 104)); index131 = index131 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index131 * 8) + let array200 : Array[String] = []; + for index201 = 0; index201 < (mbt_ffi_load32((iter_base) + 104)); index201 = index201 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index201 * 8) - let result129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result199 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array130.push(result129) + array200.push(result199) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array133 : Array[String] = []; - for index134 = 0; index134 < (mbt_ffi_load32((iter_base) + 112)); index134 = index134 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index134 * 8) + let array203 : Array[String] = []; + for index204 = 0; index204 < (mbt_ffi_load32((iter_base) + 112)); index204 = index204 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index204 * 8) - let result132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array133.push(result132) + array203.push(result202) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted136 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted206 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result135) + Option::Some(result205) } _ => panic() } - let lifted139 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted209 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted138 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted208 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -17216,48 +24916,48 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result137) + @types.Role::Other(result207) } _ => panic() } - Option::Some(lifted138) + Option::Some(lifted208) } _ => panic() } - array140.push(@types.SchemaTypeNode::{body : lifted126, metadata : @types.MetadataEnvelope::{doc : lifted128, aliases : array130, examples : array133, deprecated : lifted136, role : lifted139}}) + array210.push(@types.SchemaTypeNode::{body : lifted196, metadata : @types.MetadataEnvelope::{doc : lifted198, aliases : array200, examples : array203, deprecated : lifted206, role : lifted209}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array145 : Array[@types.SchemaTypeDef] = []; - for index146 = 0; index146 < (mbt_ffi_load32((iter_base) + 20)); index146 = index146 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index146 * 24) + let array215 : Array[@types.SchemaTypeDef] = []; + for index216 = 0; index216 < (mbt_ffi_load32((iter_base) + 20)); index216 = index216 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index216 * 24) - let result142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result212 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted144 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted214 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result143) + Option::Some(result213) } _ => panic() } - array145.push(@types.SchemaTypeDef::{id : result142, name : lifted144, body : mbt_ffi_load32((iter_base) + 20)}) + array215.push(@types.SchemaTypeDef::{id : result212, name : lifted214, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let array177 : Array[@types.SchemaValueNode] = []; - for index178 = 0; index178 < (mbt_ffi_load32((iter_base) + 32)); index178 = index178 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index178 * 32) + let array247 : Array[@types.SchemaValueNode] = []; + for index248 = 0; index248 < (mbt_ffi_load32((iter_base) + 32)); index248 = index248 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index248 * 32) - let lifted176 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted246 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -17308,25 +25008,25 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 12 => { - let result147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result147) + @types.SchemaValueNode::StringValue(result217) } 13 => { - let array148 : Array[Int] = []; - for index149 = 0; index149 < (mbt_ffi_load32((iter_base) + 12)); index149 = index149 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index149 * 4) + let array218 : Array[Int] = []; + for index219 = 0; index219 < (mbt_ffi_load32((iter_base) + 12)); index219 = index219 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index219 * 4) - array148.push(mbt_ffi_load32((iter_base) + 0)) + array218.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array148) + @types.SchemaValueNode::RecordValue(array218) } 14 => { - let lifted150 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted220 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -17335,7 +25035,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted150}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted220}) } 15 => { @@ -17343,67 +25043,67 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 16 => { - let array151 : Array[Bool] = []; - for index152 = 0; index152 < (mbt_ffi_load32((iter_base) + 12)); index152 = index152 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index152 * 1) + let array221 : Array[Bool] = []; + for index222 = 0; index222 < (mbt_ffi_load32((iter_base) + 12)); index222 = index222 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index222 * 1) - array151.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array221.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array151) + @types.SchemaValueNode::FlagsValue(array221) } 17 => { - let array153 : Array[Int] = []; - for index154 = 0; index154 < (mbt_ffi_load32((iter_base) + 12)); index154 = index154 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index154 * 4) + let array223 : Array[Int] = []; + for index224 = 0; index224 < (mbt_ffi_load32((iter_base) + 12)); index224 = index224 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index224 * 4) - array153.push(mbt_ffi_load32((iter_base) + 0)) + array223.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array153) + @types.SchemaValueNode::TupleValue(array223) } 18 => { - let array155 : Array[Int] = []; - for index156 = 0; index156 < (mbt_ffi_load32((iter_base) + 12)); index156 = index156 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index156 * 4) + let array225 : Array[Int] = []; + for index226 = 0; index226 < (mbt_ffi_load32((iter_base) + 12)); index226 = index226 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index226 * 4) - array155.push(mbt_ffi_load32((iter_base) + 0)) + array225.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array155) + @types.SchemaValueNode::ListValue(array225) } 19 => { - let array157 : Array[Int] = []; - for index158 = 0; index158 < (mbt_ffi_load32((iter_base) + 12)); index158 = index158 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index158 * 4) + let array227 : Array[Int] = []; + for index228 = 0; index228 < (mbt_ffi_load32((iter_base) + 12)); index228 = index228 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index228 * 4) - array157.push(mbt_ffi_load32((iter_base) + 0)) + array227.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array157) + @types.SchemaValueNode::FixedListValue(array227) } 20 => { - let array159 : Array[@types.MapEntry] = []; - for index160 = 0; index160 < (mbt_ffi_load32((iter_base) + 12)); index160 = index160 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index160 * 8) + let array229 : Array[@types.MapEntry] = []; + for index230 = 0; index230 < (mbt_ffi_load32((iter_base) + 12)); index230 = index230 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index230 * 8) - array159.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array229.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array159) + @types.SchemaValueNode::MapValue(array229) } 21 => { - let lifted161 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted231 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -17412,14 +25112,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted161) + @types.SchemaValueNode::OptionValue(lifted231) } 22 => { - let lifted164 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted234 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted162 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted232 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -17428,11 +25128,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted162) + @types.ResultValuePayload::OkValue(lifted232) } 1 => { - let lifted163 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted233 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -17441,58 +25141,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted163) + @types.ResultValuePayload::ErrValue(lifted233) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted164) + @types.SchemaValueNode::ResultValue(lifted234) } 23 => { - let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted167 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted237 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result166) + Option::Some(result236) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result165, language : lifted167}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result235, language : lifted237}) } 24 => { - let result168 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result238 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted170 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted240 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result239 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result169) + Option::Some(result239) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result168, mime_type : lifted170}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result238, mime_type : lifted240}) } 25 => { - let result171 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result171) + @types.SchemaValueNode::PathValue(result241) } 26 => { - let result172 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result242 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result172) + @types.SchemaValueNode::UrlValue(result242) } 27 => { @@ -17504,21 +25204,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 29 => { - let result173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result173}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result243}) } 30 => { - let result174 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result244 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result174, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result244, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result245 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result175}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result245}) } 32 => { @@ -17527,15 +25227,15 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array177.push(lifted176) + array247.push(lifted246) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - array179.push(LocalAgentConfigEntry::{path : array12, value : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array140, defs : array145, root : mbt_ffi_load32((iter_base) + 24)}, value : @types.SchemaValueTree::{value_nodes : array177, root : mbt_ffi_load32((iter_base) + 36)}}}) + array249.push(LocalAgentConfigEntry::{path : array12, value : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array210, defs : array215, root : mbt_ffi_load32((iter_base) + 24)}, value : @types.SchemaValueTree::{value_nodes : array247, root : mbt_ffi_load32((iter_base) + 36)}}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 160)) - let lifted181 : @types.Uuid? = match mbt_ffi_load8_u((iter_base) + 168) { + let lifted251 : @types.Uuid? = match mbt_ffi_load8_u((iter_base) + 168) { 0 => Option::None 1 => { @@ -17544,11 +25244,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - PublicOplogEntry::Create(CreateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, agent_id : result}, agent_mode : AgentMode::from(mbt_ffi_load8_u((iter_base) + 48)), component_revision : (mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64(), env : array, created_by : @types.AccountId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}}, environment_id : @host.EnvironmentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 88)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 96)).reinterpret_as_uint64()}}, parent : lifted, component_size : (mbt_ffi_load64((iter_base) + 136)).reinterpret_as_uint64(), initial_total_linear_memory_size : (mbt_ffi_load64((iter_base) + 144)).reinterpret_as_uint64(), initial_active_plugins : array9, local_agent_config : array179, original_phantom_id : lifted181, instance_id : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 192)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 200)).reinterpret_as_uint64()}}) + PublicOplogEntry::Create(CreateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, agent_id : result}, agent_mode : AgentMode::from(mbt_ffi_load8_u((iter_base) + 48)), component_revision : (mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64(), env : array, created_by : @types.AccountId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}}, environment_id : @host.EnvironmentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 88)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 96)).reinterpret_as_uint64()}}, parent : lifted, component_size : (mbt_ffi_load64((iter_base) + 136)).reinterpret_as_uint64(), initial_total_linear_memory_size : (mbt_ffi_load64((iter_base) + 144)).reinterpret_as_uint64(), initial_active_plugins : array9, local_agent_config : array249, original_phantom_id : lifted251, instance_id : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 192)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 200)).reinterpret_as_uint64()}}) } 1 => { - let lifted182 : UInt64? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted252 : UInt64? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { @@ -17557,17 +25257,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let lifted349 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted489 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { - let array310 : Array[@types.SchemaTypeNode] = []; - for index311 = 0; index311 < (mbt_ffi_load32((iter_base) + 56)); index311 = index311 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index311 * 144) + let array450 : Array[@types.SchemaTypeNode] = []; + for index451 = 0; index451 < (mbt_ffi_load32((iter_base) + 56)); index451 = index451 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index451 * 144) - let lifted296 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted436 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -17578,107 +25278,807 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted260 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted255 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted254 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted254) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted257 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted256 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array198 : Array[@types.NamedFieldType] = []; - for index199 = 0; index199 < (mbt_ffi_load32((iter_base) + 12)); index199 = index199 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index199 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result184 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted256) + } + _ => panic() + } - let lifted186 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted259 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result185) + Option::Some(result258) + } + _ => panic() } - _ => panic() - } - - let array188 : Array[String] = []; - for index189 = 0; index189 < (mbt_ffi_load32((iter_base) + 28)); index189 = index189 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index189 * 8) - let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array188.push(result187) + Option::Some(@types.NumericRestrictions::{min : lifted255, max : lifted257, unit : lifted259}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted260) + } + 3 => { + + let lifted267 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted262 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted261 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted261) + } + _ => panic() + } + + let lifted264 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted263 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted263) + } + _ => panic() + } + + let lifted266 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result265) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted262, max : lifted264, unit : lifted266}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted267) + } + 4 => { + + let lifted274 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted269 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted268 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted268) + } + _ => panic() + } + + let lifted271 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted270 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted270) + } + _ => panic() + } + + let lifted273 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result272 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result272) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted269, max : lifted271, unit : lifted273}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted274) + } + 5 => { + + let lifted281 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted276 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted275 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted275) + } + _ => panic() + } + + let lifted278 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted277 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted277) + } + _ => panic() + } + + let lifted280 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result279 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result279) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted276, max : lifted278, unit : lifted280}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted281) + } + 6 => { + + let lifted288 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted283 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted282 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted282) + } + _ => panic() + } + + let lifted285 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted284 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted284) + } + _ => panic() + } + + let lifted287 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result286 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result286) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted283, max : lifted285, unit : lifted287}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted288) + } + 7 => { + + let lifted295 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted290 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted289 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted289) + } + _ => panic() + } + + let lifted292 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted291 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted291) + } + _ => panic() + } + + let lifted294 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result293 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result293) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted290, max : lifted292, unit : lifted294}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted295) + } + 8 => { + + let lifted302 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted297 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted296 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted296) + } + _ => panic() + } + + let lifted299 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted298 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted298) + } + _ => panic() + } + + let lifted301 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result300) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted297, max : lifted299, unit : lifted301}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted302) + } + 9 => { + + let lifted309 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted304 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted303 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted303) + } + _ => panic() + } + + let lifted306 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted305 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted305) + } + _ => panic() + } + + let lifted308 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result307) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted304, max : lifted306, unit : lifted308}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted309) + } + 10 => { + + let lifted316 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted311 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted310 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted310) + } + _ => panic() + } + + let lifted313 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted312 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted312) + } + _ => panic() + } + + let lifted315 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result314 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result314) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted311, max : lifted313, unit : lifted315}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted316) + } + 11 => { + + let lifted323 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted318 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted317 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted317) + } + _ => panic() + } + + let lifted320 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted319 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted319) + } + _ => panic() + } + + let lifted322 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result321 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result321) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted318, max : lifted320, unit : lifted322}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted323) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array338 : Array[@types.NamedFieldType] = []; + for index339 = 0; index339 < (mbt_ffi_load32((iter_base) + 12)); index339 = index339 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index339 * 68) + + let result324 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted326 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result325) + } + _ => panic() + } + + let array328 : Array[String] = []; + for index329 = 0; index329 < (mbt_ffi_load32((iter_base) + 28)); index329 = index329 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index329 * 8) + + let result327 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array328.push(result327) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array191 : Array[String] = []; - for index192 = 0; index192 < (mbt_ffi_load32((iter_base) + 36)); index192 = index192 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index192 * 8) + let array331 : Array[String] = []; + for index332 = 0; index332 < (mbt_ffi_load32((iter_base) + 36)); index332 = index332 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index332 * 8) - let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result330 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array191.push(result190) + array331.push(result330) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted194 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted334 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result333 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result193) + Option::Some(result333) } _ => panic() } - let lifted197 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted337 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted196 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted336 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -17693,33 +26093,33 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result195) + @types.Role::Other(result335) } _ => panic() } - Option::Some(lifted196) + Option::Some(lifted336) } _ => panic() } - array198.push(@types.NamedFieldType::{name : result184, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted186, aliases : array188, examples : array191, deprecated : lifted194, role : lifted197}}) + array338.push(@types.NamedFieldType::{name : result324, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted326, aliases : array328, examples : array331, deprecated : lifted334, role : lifted337}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array198) + @types.SchemaTypeBody::RecordType(array338) } 15 => { - let array215 : Array[@types.VariantCaseType] = []; - for index216 = 0; index216 < (mbt_ffi_load32((iter_base) + 12)); index216 = index216 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index216 * 72) + let array355 : Array[@types.VariantCaseType] = []; + for index356 = 0; index356 < (mbt_ffi_load32((iter_base) + 12)); index356 = index356 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index356 * 72) - let result200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result340 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted201 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted341 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -17728,53 +26128,53 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted203 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted343 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result202) + Option::Some(result342) } _ => panic() } - let array205 : Array[String] = []; - for index206 = 0; index206 < (mbt_ffi_load32((iter_base) + 32)); index206 = index206 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index206 * 8) + let array345 : Array[String] = []; + for index346 = 0; index346 < (mbt_ffi_load32((iter_base) + 32)); index346 = index346 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index346 * 8) - let result204 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array205.push(result204) + array345.push(result344) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array208 : Array[String] = []; - for index209 = 0; index209 < (mbt_ffi_load32((iter_base) + 40)); index209 = index209 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index209 * 8) + let array348 : Array[String] = []; + for index349 = 0; index349 < (mbt_ffi_load32((iter_base) + 40)); index349 = index349 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index349 * 8) - let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array208.push(result207) + array348.push(result347) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted211 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted351 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result210 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result350 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result210) + Option::Some(result350) } _ => panic() } - let lifted214 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted354 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted213 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted353 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -17789,63 +26189,63 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result212 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result352 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result212) + @types.Role::Other(result352) } _ => panic() } - Option::Some(lifted213) + Option::Some(lifted353) } _ => panic() } - array215.push(@types.VariantCaseType::{name : result200, payload : lifted201, metadata : @types.MetadataEnvelope::{doc : lifted203, aliases : array205, examples : array208, deprecated : lifted211, role : lifted214}}) + array355.push(@types.VariantCaseType::{name : result340, payload : lifted341, metadata : @types.MetadataEnvelope::{doc : lifted343, aliases : array345, examples : array348, deprecated : lifted351, role : lifted354}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array215) + @types.SchemaTypeBody::VariantType(array355) } 16 => { - let array218 : Array[String] = []; - for index219 = 0; index219 < (mbt_ffi_load32((iter_base) + 12)); index219 = index219 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index219 * 8) + let array358 : Array[String] = []; + for index359 = 0; index359 < (mbt_ffi_load32((iter_base) + 12)); index359 = index359 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index359 * 8) - let result217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result357 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array218.push(result217) + array358.push(result357) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array218) + @types.SchemaTypeBody::EnumType(array358) } 17 => { - let array221 : Array[String] = []; - for index222 = 0; index222 < (mbt_ffi_load32((iter_base) + 12)); index222 = index222 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index222 * 8) + let array361 : Array[String] = []; + for index362 = 0; index362 < (mbt_ffi_load32((iter_base) + 12)); index362 = index362 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index362 * 8) - let result220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result360 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array221.push(result220) + array361.push(result360) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array221) + @types.SchemaTypeBody::FlagsType(array361) } 18 => { - let array223 : Array[Int] = []; - for index224 = 0; index224 < (mbt_ffi_load32((iter_base) + 12)); index224 = index224 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index224 * 4) + let array363 : Array[Int] = []; + for index364 = 0; index364 < (mbt_ffi_load32((iter_base) + 12)); index364 = index364 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index364 * 4) - array223.push(mbt_ffi_load32((iter_base) + 0)) + array363.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array223) + @types.SchemaTypeBody::TupleType(array363) } 19 => { @@ -17865,7 +26265,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 23 => { - let lifted225 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted365 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -17874,7 +26274,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted226 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted366 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -17883,30 +26283,30 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted225, err : lifted226}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted365, err : lifted366}) } 24 => { - let lifted230 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted370 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array228 : Array[String] = []; - for index229 = 0; index229 < (mbt_ffi_load32((iter_base) + 16)); index229 = index229 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index229 * 8) + let array368 : Array[String] = []; + for index369 = 0; index369 < (mbt_ffi_load32((iter_base) + 16)); index369 = index369 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index369 * 8) - let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result367 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array228.push(result227) + array368.push(result367) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array228) + Option::Some(array368) } _ => panic() } - let lifted231 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted371 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -17915,7 +26315,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted232 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted372 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -17924,41 +26324,41 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted234 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted374 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result233) + Option::Some(result373) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted230, min_length : lifted231, max_length : lifted232, regex : lifted234}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted370, min_length : lifted371, max_length : lifted372, regex : lifted374}) } 25 => { - let lifted238 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted378 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array236 : Array[String] = []; - for index237 = 0; index237 < (mbt_ffi_load32((iter_base) + 16)); index237 = index237 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index237 * 8) + let array376 : Array[String] = []; + for index377 = 0; index377 < (mbt_ffi_load32((iter_base) + 16)); index377 = index377 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index377 * 8) - let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array236.push(result235) + array376.push(result375) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array236) + Option::Some(array376) } _ => panic() } - let lifted239 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted379 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -17967,7 +26367,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted240 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted380 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -17976,91 +26376,91 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted238, min_bytes : lifted239, max_bytes : lifted240}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted378, min_bytes : lifted379, max_bytes : lifted380}) } 26 => { - let lifted244 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted384 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array242 : Array[String] = []; - for index243 = 0; index243 < (mbt_ffi_load32((iter_base) + 20)); index243 = index243 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index243 * 8) + let array382 : Array[String] = []; + for index383 = 0; index383 < (mbt_ffi_load32((iter_base) + 20)); index383 = index383 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index383 * 8) - let result241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result381 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array242.push(result241) + array382.push(result381) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array242) + Option::Some(array382) } _ => panic() } - let lifted248 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted388 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array246 : Array[String] = []; - for index247 = 0; index247 < (mbt_ffi_load32((iter_base) + 32)); index247 = index247 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index247 * 8) + let array386 : Array[String] = []; + for index387 = 0; index387 < (mbt_ffi_load32((iter_base) + 32)); index387 = index387 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index387 * 8) - let result245 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result385 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array246.push(result245) + array386.push(result385) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array246) + Option::Some(array386) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted244, allowed_extensions : lifted248}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted384, allowed_extensions : lifted388}) } 27 => { - let lifted252 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted392 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array250 : Array[String] = []; - for index251 = 0; index251 < (mbt_ffi_load32((iter_base) + 16)); index251 = index251 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index251 * 8) + let array390 : Array[String] = []; + for index391 = 0; index391 < (mbt_ffi_load32((iter_base) + 16)); index391 = index391 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index391 * 8) - let result249 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result389 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array250.push(result249) + array390.push(result389) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array250) + Option::Some(array390) } _ => panic() } - let lifted256 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted396 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array254 : Array[String] = []; - for index255 = 0; index255 < (mbt_ffi_load32((iter_base) + 28)); index255 = index255 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index255 * 8) + let array394 : Array[String] = []; + for index395 = 0; index395 < (mbt_ffi_load32((iter_base) + 28)); index395 = index395 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index395 * 8) - let result253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array254.push(result253) + array394.push(result393) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array254) + Option::Some(array394) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted252, allowed_hosts : lifted256}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted392, allowed_hosts : lifted396}) } 28 => { @@ -18072,148 +26472,148 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 30 => { - let result257 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result397 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array259 : Array[String] = []; - for index260 = 0; index260 < (mbt_ffi_load32((iter_base) + 20)); index260 = index260 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index260 * 8) + let array399 : Array[String] = []; + for index400 = 0; index400 < (mbt_ffi_load32((iter_base) + 20)); index400 = index400 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index400 * 8) - let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result398 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array259.push(result258) + array399.push(result398) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted262 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted402 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result401 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result261}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result401}) } _ => panic() } - let lifted264 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted404 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result263 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result403 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result263}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result403}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result257, allowed_suffixes : array259, min : lifted262, max : lifted264}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result397, allowed_suffixes : array399, min : lifted402, max : lifted404}) } 31 => { - let array288 : Array[@types.UnionBranch] = []; - for index289 = 0; index289 < (mbt_ffi_load32((iter_base) + 12)); index289 = index289 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index289 * 92) + let array428 : Array[@types.UnionBranch] = []; + for index429 = 0; index429 < (mbt_ffi_load32((iter_base) + 12)); index429 = index429 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index429 * 92) - let result265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result405 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted274 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted414 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result266 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result406 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result266) + @types.DiscriminatorRule::Prefix(result406) } 1 => { - let result267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result407 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result267) + @types.DiscriminatorRule::Suffix(result407) } 2 => { - let result268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result408 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result268) + @types.DiscriminatorRule::Contains(result408) } 3 => { - let result269 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result409 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result269) + @types.DiscriminatorRule::Regex(result409) } 4 => { - let result270 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result410 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted272 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted412 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result271 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result411 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result271) + Option::Some(result411) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result270, literal : lifted272}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result410, literal : lifted412}) } 5 => { - let result273 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result413 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result273) + @types.DiscriminatorRule::FieldAbsent(result413) } _ => panic() } - let lifted276 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted416 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result275 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result275) + Option::Some(result415) } _ => panic() } - let array278 : Array[String] = []; - for index279 = 0; index279 < (mbt_ffi_load32((iter_base) + 52)); index279 = index279 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index279 * 8) + let array418 : Array[String] = []; + for index419 = 0; index419 < (mbt_ffi_load32((iter_base) + 52)); index419 = index419 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index419 * 8) - let result277 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result417 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array278.push(result277) + array418.push(result417) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array281 : Array[String] = []; - for index282 = 0; index282 < (mbt_ffi_load32((iter_base) + 60)); index282 = index282 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index282 * 8) + let array421 : Array[String] = []; + for index422 = 0; index422 < (mbt_ffi_load32((iter_base) + 60)); index422 = index422 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index422 * 8) - let result280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array281.push(result280) + array421.push(result420) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted284 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted424 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result283 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result423 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result283) + Option::Some(result423) } _ => panic() } - let lifted287 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted427 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted286 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted426 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -18228,57 +26628,57 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result285 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result425 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result285) + @types.Role::Other(result425) } _ => panic() } - Option::Some(lifted286) + Option::Some(lifted426) } _ => panic() } - array288.push(@types.UnionBranch::{tag : result265, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted274, metadata : @types.MetadataEnvelope::{doc : lifted276, aliases : array278, examples : array281, deprecated : lifted284, role : lifted287}}) + array428.push(@types.UnionBranch::{tag : result405, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted414, metadata : @types.MetadataEnvelope::{doc : lifted416, aliases : array418, examples : array421, deprecated : lifted424, role : lifted427}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array288}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array428}) } 32 => { - let lifted291 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted431 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result290 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result290) + Option::Some(result430) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted291}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted431}) } 33 => { - let lifted293 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted433 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result292 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result432 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result292) + Option::Some(result432) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted293}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted433}) } 34 => { - let lifted294 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted434 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -18287,11 +26687,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted294) + @types.SchemaTypeBody::FutureType(lifted434) } 35 => { - let lifted295 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted435 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -18300,58 +26700,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::StreamType(lifted295) + @types.SchemaTypeBody::StreamType(lifted435) } _ => panic() } - let lifted298 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted438 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result297 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result437 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result297) + Option::Some(result437) } _ => panic() } - let array300 : Array[String] = []; - for index301 = 0; index301 < (mbt_ffi_load32((iter_base) + 104)); index301 = index301 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index301 * 8) + let array440 : Array[String] = []; + for index441 = 0; index441 < (mbt_ffi_load32((iter_base) + 104)); index441 = index441 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index441 * 8) - let result299 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result439 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array300.push(result299) + array440.push(result439) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array303 : Array[String] = []; - for index304 = 0; index304 < (mbt_ffi_load32((iter_base) + 112)); index304 = index304 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index304 * 8) + let array443 : Array[String] = []; + for index444 = 0; index444 < (mbt_ffi_load32((iter_base) + 112)); index444 = index444 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index444 * 8) - let result302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result442 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array303.push(result302) + array443.push(result442) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted306 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted446 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result305 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result445 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result305) + Option::Some(result445) } _ => panic() } - let lifted309 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted449 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted308 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted448 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -18366,48 +26766,48 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result447 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result307) + @types.Role::Other(result447) } _ => panic() } - Option::Some(lifted308) + Option::Some(lifted448) } _ => panic() } - array310.push(@types.SchemaTypeNode::{body : lifted296, metadata : @types.MetadataEnvelope::{doc : lifted298, aliases : array300, examples : array303, deprecated : lifted306, role : lifted309}}) + array450.push(@types.SchemaTypeNode::{body : lifted436, metadata : @types.MetadataEnvelope::{doc : lifted438, aliases : array440, examples : array443, deprecated : lifted446, role : lifted449}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 52)) - let array315 : Array[@types.SchemaTypeDef] = []; - for index316 = 0; index316 < (mbt_ffi_load32((iter_base) + 64)); index316 = index316 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index316 * 24) + let array455 : Array[@types.SchemaTypeDef] = []; + for index456 = 0; index456 < (mbt_ffi_load32((iter_base) + 64)); index456 = index456 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index456 * 24) - let result312 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted314 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted454 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result313 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result453 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result313) + Option::Some(result453) } _ => panic() } - array315.push(@types.SchemaTypeDef::{id : result312, name : lifted314, body : mbt_ffi_load32((iter_base) + 20)}) + array455.push(@types.SchemaTypeDef::{id : result452, name : lifted454, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - let array347 : Array[@types.SchemaValueNode] = []; - for index348 = 0; index348 < (mbt_ffi_load32((iter_base) + 76)); index348 = index348 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 72)) + (index348 * 32) + let array487 : Array[@types.SchemaValueNode] = []; + for index488 = 0; index488 < (mbt_ffi_load32((iter_base) + 76)); index488 = index488 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 72)) + (index488 * 32) - let lifted346 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted486 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -18458,25 +26858,25 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 12 => { - let result317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result457 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result317) + @types.SchemaValueNode::StringValue(result457) } 13 => { - let array318 : Array[Int] = []; - for index319 = 0; index319 < (mbt_ffi_load32((iter_base) + 12)); index319 = index319 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index319 * 4) + let array458 : Array[Int] = []; + for index459 = 0; index459 < (mbt_ffi_load32((iter_base) + 12)); index459 = index459 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index459 * 4) - array318.push(mbt_ffi_load32((iter_base) + 0)) + array458.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array318) + @types.SchemaValueNode::RecordValue(array458) } 14 => { - let lifted320 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted460 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -18485,7 +26885,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted320}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted460}) } 15 => { @@ -18493,67 +26893,67 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 16 => { - let array321 : Array[Bool] = []; - for index322 = 0; index322 < (mbt_ffi_load32((iter_base) + 12)); index322 = index322 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index322 * 1) + let array461 : Array[Bool] = []; + for index462 = 0; index462 < (mbt_ffi_load32((iter_base) + 12)); index462 = index462 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index462 * 1) - array321.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array461.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array321) + @types.SchemaValueNode::FlagsValue(array461) } 17 => { - let array323 : Array[Int] = []; - for index324 = 0; index324 < (mbt_ffi_load32((iter_base) + 12)); index324 = index324 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index324 * 4) + let array463 : Array[Int] = []; + for index464 = 0; index464 < (mbt_ffi_load32((iter_base) + 12)); index464 = index464 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index464 * 4) - array323.push(mbt_ffi_load32((iter_base) + 0)) + array463.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array323) + @types.SchemaValueNode::TupleValue(array463) } 18 => { - let array325 : Array[Int] = []; - for index326 = 0; index326 < (mbt_ffi_load32((iter_base) + 12)); index326 = index326 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index326 * 4) + let array465 : Array[Int] = []; + for index466 = 0; index466 < (mbt_ffi_load32((iter_base) + 12)); index466 = index466 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index466 * 4) - array325.push(mbt_ffi_load32((iter_base) + 0)) + array465.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array325) + @types.SchemaValueNode::ListValue(array465) } 19 => { - let array327 : Array[Int] = []; - for index328 = 0; index328 < (mbt_ffi_load32((iter_base) + 12)); index328 = index328 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index328 * 4) + let array467 : Array[Int] = []; + for index468 = 0; index468 < (mbt_ffi_load32((iter_base) + 12)); index468 = index468 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index468 * 4) - array327.push(mbt_ffi_load32((iter_base) + 0)) + array467.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array327) + @types.SchemaValueNode::FixedListValue(array467) } 20 => { - let array329 : Array[@types.MapEntry] = []; - for index330 = 0; index330 < (mbt_ffi_load32((iter_base) + 12)); index330 = index330 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index330 * 8) + let array469 : Array[@types.MapEntry] = []; + for index470 = 0; index470 < (mbt_ffi_load32((iter_base) + 12)); index470 = index470 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index470 * 8) - array329.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array469.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array329) + @types.SchemaValueNode::MapValue(array469) } 21 => { - let lifted331 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted471 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -18562,14 +26962,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted331) + @types.SchemaValueNode::OptionValue(lifted471) } 22 => { - let lifted334 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted474 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted332 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted472 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -18578,11 +26978,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted332) + @types.ResultValuePayload::OkValue(lifted472) } 1 => { - let lifted333 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted473 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -18591,58 +26991,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted333) + @types.ResultValuePayload::ErrValue(lifted473) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted334) + @types.SchemaValueNode::ResultValue(lifted474) } 23 => { - let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result475 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted337 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted477 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result336 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result476 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result336) + Option::Some(result476) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result335, language : lifted337}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result475, language : lifted477}) } 24 => { - let result338 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result478 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted340 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted480 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result339 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result479 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result339) + Option::Some(result479) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result338, mime_type : lifted340}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result478, mime_type : lifted480}) } 25 => { - let result341 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result481 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result341) + @types.SchemaValueNode::PathValue(result481) } 26 => { - let result342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result482 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result342) + @types.SchemaValueNode::UrlValue(result482) } 27 => { @@ -18654,21 +27054,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 29 => { - let result343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result483 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result343}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result483}) } 30 => { - let result344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result484 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result344, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result484, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result485 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result345}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result485}) } 32 => { @@ -18677,16 +27077,16 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array347.push(lifted346) + array487.push(lifted486) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 72)) - Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array310, defs : array315, root : mbt_ffi_load32((iter_base) + 68)}, value : @types.SchemaValueTree::{value_nodes : array347, root : mbt_ffi_load32((iter_base) + 80)}}) + Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array450, defs : array455, root : mbt_ffi_load32((iter_base) + 68)}, value : @types.SchemaValueTree::{value_nodes : array487, root : mbt_ffi_load32((iter_base) + 80)}}) } _ => panic() } - let lifted352 = match (mbt_ffi_load8_u((iter_base) + 88)) { + let lifted492 = match (mbt_ffi_load8_u((iter_base) + 88)) { 0 => { WrappedFunctionType::ReadLocal @@ -18705,7 +27105,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 4 => { - let lifted350 : UInt64? = match mbt_ffi_load8_u((iter_base) + 96) { + let lifted490 : UInt64? = match mbt_ffi_load8_u((iter_base) + 96) { 0 => Option::None 1 => { @@ -18714,11 +27114,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - WrappedFunctionType::WriteRemoteBatched(lifted350) + WrappedFunctionType::WriteRemoteBatched(lifted490) } 5 => { - let lifted351 : UInt64? = match mbt_ffi_load8_u((iter_base) + 96) { + let lifted491 : UInt64? = match mbt_ffi_load8_u((iter_base) + 96) { 0 => Option::None 1 => { @@ -18727,24 +27127,24 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - WrappedFunctionType::WriteRemoteTransaction(lifted351) + WrappedFunctionType::WriteRemoteTransaction(lifted491) } _ => panic() } - PublicOplogEntry::Start(StartParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, parent_start_index : lifted182, function_name : result183, request : lifted349, durable_function_type : lifted352}) + PublicOplogEntry::Start(StartParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, parent_start_index : lifted252, function_name : result253, request : lifted489, durable_function_type : lifted492}) } 2 => { - let lifted518 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted728 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let array479 : Array[@types.SchemaTypeNode] = []; - for index480 = 0; index480 < (mbt_ffi_load32((iter_base) + 40)); index480 = index480 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index480 * 144) + let array689 : Array[@types.SchemaTypeNode] = []; + for index690 = 0; index690 < (mbt_ffi_load32((iter_base) + 40)); index690 = index690 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index690 * 144) - let lifted465 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted675 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -18755,149 +27155,849 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted499 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted494 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted493 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted493) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted496 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted495 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array367 : Array[@types.NamedFieldType] = []; - for index368 = 0; index368 < (mbt_ffi_load32((iter_base) + 12)); index368 = index368 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index368 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result353 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted495) + } + _ => panic() + } - let lifted355 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted498 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result354 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result497 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result354) + Option::Some(result497) + } + _ => panic() } - _ => panic() - } - let array357 : Array[String] = []; - for index358 = 0; index358 < (mbt_ffi_load32((iter_base) + 28)); index358 = index358 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index358 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted494, max : lifted496, unit : lifted498}) + } + _ => panic() + } - let result356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted499) + } + 3 => { - array357.push(result356) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted506 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array360 : Array[String] = []; - for index361 = 0; index361 < (mbt_ffi_load32((iter_base) + 36)); index361 = index361 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index361 * 8) + let lifted501 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result359 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted500 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array360.push(result359) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted363 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result362 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result362) + Option::Some(lifted500) + } + _ => panic() } - _ => panic() - } - let lifted366 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted503 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted365 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted502 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - - let result364 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result364) - } - _ => panic() + Option::Some(lifted502) } + _ => panic() + } + + let lifted505 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result504 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(lifted365) + Option::Some(result504) + } + _ => panic() } - _ => panic() - } - array367.push(@types.NamedFieldType::{name : result353, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted355, aliases : array357, examples : array360, deprecated : lifted363, role : lifted366}}) + Option::Some(@types.NumericRestrictions::{min : lifted501, max : lifted503, unit : lifted505}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array367) + @types.SchemaTypeBody::S16Type(lifted506) } - 15 => { + 4 => { - let array384 : Array[@types.VariantCaseType] = []; - for index385 = 0; index385 < (mbt_ffi_load32((iter_base) + 12)); index385 = index385 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index385 * 72) + let lifted513 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result369 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted508 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted370 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None + let lifted507 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted507) + } + _ => panic() + } + + let lifted510 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted509 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted509) + } + _ => panic() + } + + let lifted512 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result511) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted508, max : lifted510, unit : lifted512}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted513) + } + 5 => { + + let lifted520 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted515 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted514 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted514) + } + _ => panic() + } + + let lifted517 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted516 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted516) + } + _ => panic() + } + + let lifted519 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result518) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted515, max : lifted517, unit : lifted519}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted520) + } + 6 => { + + let lifted527 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted522 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted521 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted521) + } + _ => panic() + } + + let lifted524 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted523 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted523) + } + _ => panic() + } + + let lifted526 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result525 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result525) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted522, max : lifted524, unit : lifted526}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted527) + } + 7 => { + + let lifted534 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted529 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted528 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted528) + } + _ => panic() + } + + let lifted531 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted530 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted530) + } + _ => panic() + } + + let lifted533 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result532 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result532) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted529, max : lifted531, unit : lifted533}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted534) + } + 8 => { + + let lifted541 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted536 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted535 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted535) + } + _ => panic() + } + + let lifted538 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted537 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted537) + } + _ => panic() + } + + let lifted540 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result539 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result539) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted536, max : lifted538, unit : lifted540}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted541) + } + 9 => { + + let lifted548 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted543 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted542 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted542) + } + _ => panic() + } + + let lifted545 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted544 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted544) + } + _ => panic() + } + + let lifted547 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result546 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result546) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted543, max : lifted545, unit : lifted547}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted548) + } + 10 => { + + let lifted555 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted550 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted549 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted549) + } + _ => panic() + } + + let lifted552 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted551 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted551) + } + _ => panic() + } + + let lifted554 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result553 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result553) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted550, max : lifted552, unit : lifted554}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted555) + } + 11 => { + + let lifted562 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted557 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted556 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted556) + } + _ => panic() + } + + let lifted559 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted558 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted558) + } + _ => panic() + } + + let lifted561 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result560 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result560) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted557, max : lifted559, unit : lifted561}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted562) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array577 : Array[@types.NamedFieldType] = []; + for index578 = 0; index578 < (mbt_ffi_load32((iter_base) + 12)); index578 = index578 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index578 * 68) + + let result563 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted565 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result564 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result564) + } + _ => panic() + } + + let array567 : Array[String] = []; + for index568 = 0; index568 < (mbt_ffi_load32((iter_base) + 28)); index568 = index568 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index568 * 8) + + let result566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array567.push(result566) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array570 : Array[String] = []; + for index571 = 0; index571 < (mbt_ffi_load32((iter_base) + 36)); index571 = index571 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index571 * 8) + + let result569 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array570.push(result569) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted573 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result572 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result572) + } + _ => panic() + } + + let lifted576 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted575 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result574 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result574) + } + _ => panic() + } + + Option::Some(lifted575) + } + _ => panic() + } + + array577.push(@types.NamedFieldType::{name : result563, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted565, aliases : array567, examples : array570, deprecated : lifted573, role : lifted576}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array577) + } + 15 => { + + let array594 : Array[@types.VariantCaseType] = []; + for index595 = 0; index595 < (mbt_ffi_load32((iter_base) + 12)); index595 = index595 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index595 * 72) + + let result579 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted580 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None 1 => { Option::Some(mbt_ffi_load32((iter_base) + 12)) @@ -18905,53 +28005,53 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted372 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted582 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result371 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result581 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result371) + Option::Some(result581) } _ => panic() } - let array374 : Array[String] = []; - for index375 = 0; index375 < (mbt_ffi_load32((iter_base) + 32)); index375 = index375 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index375 * 8) + let array584 : Array[String] = []; + for index585 = 0; index585 < (mbt_ffi_load32((iter_base) + 32)); index585 = index585 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index585 * 8) - let result373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array374.push(result373) + array584.push(result583) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array377 : Array[String] = []; - for index378 = 0; index378 < (mbt_ffi_load32((iter_base) + 40)); index378 = index378 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index378 * 8) + let array587 : Array[String] = []; + for index588 = 0; index588 < (mbt_ffi_load32((iter_base) + 40)); index588 = index588 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index588 * 8) - let result376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result586 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array377.push(result376) + array587.push(result586) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted380 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted590 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result379 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result589 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result379) + Option::Some(result589) } _ => panic() } - let lifted383 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted593 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted382 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted592 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -18966,63 +28066,63 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result381 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result591 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result381) + @types.Role::Other(result591) } _ => panic() } - Option::Some(lifted382) + Option::Some(lifted592) } _ => panic() } - array384.push(@types.VariantCaseType::{name : result369, payload : lifted370, metadata : @types.MetadataEnvelope::{doc : lifted372, aliases : array374, examples : array377, deprecated : lifted380, role : lifted383}}) + array594.push(@types.VariantCaseType::{name : result579, payload : lifted580, metadata : @types.MetadataEnvelope::{doc : lifted582, aliases : array584, examples : array587, deprecated : lifted590, role : lifted593}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array384) + @types.SchemaTypeBody::VariantType(array594) } 16 => { - let array387 : Array[String] = []; - for index388 = 0; index388 < (mbt_ffi_load32((iter_base) + 12)); index388 = index388 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index388 * 8) + let array597 : Array[String] = []; + for index598 = 0; index598 < (mbt_ffi_load32((iter_base) + 12)); index598 = index598 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index598 * 8) - let result386 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result596 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array387.push(result386) + array597.push(result596) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array387) + @types.SchemaTypeBody::EnumType(array597) } 17 => { - let array390 : Array[String] = []; - for index391 = 0; index391 < (mbt_ffi_load32((iter_base) + 12)); index391 = index391 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index391 * 8) + let array600 : Array[String] = []; + for index601 = 0; index601 < (mbt_ffi_load32((iter_base) + 12)); index601 = index601 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index601 * 8) - let result389 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result599 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array390.push(result389) + array600.push(result599) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array390) + @types.SchemaTypeBody::FlagsType(array600) } 18 => { - let array392 : Array[Int] = []; - for index393 = 0; index393 < (mbt_ffi_load32((iter_base) + 12)); index393 = index393 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index393 * 4) + let array602 : Array[Int] = []; + for index603 = 0; index603 < (mbt_ffi_load32((iter_base) + 12)); index603 = index603 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index603 * 4) - array392.push(mbt_ffi_load32((iter_base) + 0)) + array602.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array392) + @types.SchemaTypeBody::TupleType(array602) } 19 => { @@ -19042,7 +28142,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 23 => { - let lifted394 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted604 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -19051,7 +28151,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted395 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted605 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -19060,30 +28160,30 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted394, err : lifted395}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted604, err : lifted605}) } 24 => { - let lifted399 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted609 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array397 : Array[String] = []; - for index398 = 0; index398 < (mbt_ffi_load32((iter_base) + 16)); index398 = index398 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index398 * 8) + let array607 : Array[String] = []; + for index608 = 0; index608 < (mbt_ffi_load32((iter_base) + 16)); index608 = index608 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index608 * 8) - let result396 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result606 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array397.push(result396) + array607.push(result606) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array397) + Option::Some(array607) } _ => panic() } - let lifted400 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted610 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -19092,7 +28192,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted401 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted611 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -19101,41 +28201,41 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted403 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted613 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result402 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result612 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result402) + Option::Some(result612) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted399, min_length : lifted400, max_length : lifted401, regex : lifted403}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted609, min_length : lifted610, max_length : lifted611, regex : lifted613}) } 25 => { - let lifted407 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted617 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array405 : Array[String] = []; - for index406 = 0; index406 < (mbt_ffi_load32((iter_base) + 16)); index406 = index406 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index406 * 8) + let array615 : Array[String] = []; + for index616 = 0; index616 < (mbt_ffi_load32((iter_base) + 16)); index616 = index616 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index616 * 8) - let result404 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result614 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array405.push(result404) + array615.push(result614) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array405) + Option::Some(array615) } _ => panic() } - let lifted408 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted618 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -19144,7 +28244,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted409 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted619 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -19153,91 +28253,91 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted407, min_bytes : lifted408, max_bytes : lifted409}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted617, min_bytes : lifted618, max_bytes : lifted619}) } 26 => { - let lifted413 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted623 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array411 : Array[String] = []; - for index412 = 0; index412 < (mbt_ffi_load32((iter_base) + 20)); index412 = index412 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index412 * 8) + let array621 : Array[String] = []; + for index622 = 0; index622 < (mbt_ffi_load32((iter_base) + 20)); index622 = index622 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index622 * 8) - let result410 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result620 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array411.push(result410) + array621.push(result620) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array411) + Option::Some(array621) } _ => panic() } - let lifted417 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted627 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array415 : Array[String] = []; - for index416 = 0; index416 < (mbt_ffi_load32((iter_base) + 32)); index416 = index416 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index416 * 8) + let array625 : Array[String] = []; + for index626 = 0; index626 < (mbt_ffi_load32((iter_base) + 32)); index626 = index626 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index626 * 8) - let result414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result624 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array415.push(result414) + array625.push(result624) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array415) + Option::Some(array625) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted413, allowed_extensions : lifted417}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted623, allowed_extensions : lifted627}) } 27 => { - let lifted421 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted631 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array419 : Array[String] = []; - for index420 = 0; index420 < (mbt_ffi_load32((iter_base) + 16)); index420 = index420 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index420 * 8) + let array629 : Array[String] = []; + for index630 = 0; index630 < (mbt_ffi_load32((iter_base) + 16)); index630 = index630 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index630 * 8) - let result418 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result628 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array419.push(result418) + array629.push(result628) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array419) + Option::Some(array629) } _ => panic() } - let lifted425 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted635 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array423 : Array[String] = []; - for index424 = 0; index424 < (mbt_ffi_load32((iter_base) + 28)); index424 = index424 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index424 * 8) + let array633 : Array[String] = []; + for index634 = 0; index634 < (mbt_ffi_load32((iter_base) + 28)); index634 = index634 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index634 * 8) - let result422 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result632 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array423.push(result422) + array633.push(result632) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array423) + Option::Some(array633) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted421, allowed_hosts : lifted425}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted631, allowed_hosts : lifted635}) } 28 => { @@ -19249,148 +28349,148 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 30 => { - let result426 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result636 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array428 : Array[String] = []; - for index429 = 0; index429 < (mbt_ffi_load32((iter_base) + 20)); index429 = index429 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index429 * 8) + let array638 : Array[String] = []; + for index639 = 0; index639 < (mbt_ffi_load32((iter_base) + 20)); index639 = index639 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index639 * 8) - let result427 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result637 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array428.push(result427) + array638.push(result637) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted431 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted641 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result640 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result430}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result640}) } _ => panic() } - let lifted433 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted643 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result432 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result642 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result432}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result642}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result426, allowed_suffixes : array428, min : lifted431, max : lifted433}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result636, allowed_suffixes : array638, min : lifted641, max : lifted643}) } 31 => { - let array457 : Array[@types.UnionBranch] = []; - for index458 = 0; index458 < (mbt_ffi_load32((iter_base) + 12)); index458 = index458 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index458 * 92) + let array667 : Array[@types.UnionBranch] = []; + for index668 = 0; index668 < (mbt_ffi_load32((iter_base) + 12)); index668 = index668 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index668 * 92) - let result434 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result644 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted443 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted653 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result435 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result645 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result435) + @types.DiscriminatorRule::Prefix(result645) } 1 => { - let result436 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result646 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result436) + @types.DiscriminatorRule::Suffix(result646) } 2 => { - let result437 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result647 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result437) + @types.DiscriminatorRule::Contains(result647) } 3 => { - let result438 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result648 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result438) + @types.DiscriminatorRule::Regex(result648) } 4 => { - let result439 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result649 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted441 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted651 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result440 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result650 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result440) + Option::Some(result650) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result439, literal : lifted441}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result649, literal : lifted651}) } 5 => { - let result442 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result652 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result442) + @types.DiscriminatorRule::FieldAbsent(result652) } _ => panic() } - let lifted445 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted655 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result444 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result654 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result444) + Option::Some(result654) } _ => panic() } - let array447 : Array[String] = []; - for index448 = 0; index448 < (mbt_ffi_load32((iter_base) + 52)); index448 = index448 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index448 * 8) + let array657 : Array[String] = []; + for index658 = 0; index658 < (mbt_ffi_load32((iter_base) + 52)); index658 = index658 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index658 * 8) - let result446 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result656 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array447.push(result446) + array657.push(result656) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array450 : Array[String] = []; - for index451 = 0; index451 < (mbt_ffi_load32((iter_base) + 60)); index451 = index451 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index451 * 8) + let array660 : Array[String] = []; + for index661 = 0; index661 < (mbt_ffi_load32((iter_base) + 60)); index661 = index661 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index661 * 8) - let result449 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result659 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array450.push(result449) + array660.push(result659) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted453 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted663 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result662 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result452) + Option::Some(result662) } _ => panic() } - let lifted456 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted666 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted455 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted665 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -19405,57 +28505,57 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result454 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result664 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result454) + @types.Role::Other(result664) } _ => panic() } - Option::Some(lifted455) + Option::Some(lifted665) } _ => panic() } - array457.push(@types.UnionBranch::{tag : result434, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted443, metadata : @types.MetadataEnvelope::{doc : lifted445, aliases : array447, examples : array450, deprecated : lifted453, role : lifted456}}) + array667.push(@types.UnionBranch::{tag : result644, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted653, metadata : @types.MetadataEnvelope::{doc : lifted655, aliases : array657, examples : array660, deprecated : lifted663, role : lifted666}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array457}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array667}) } 32 => { - let lifted460 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted670 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result459 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result669 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result459) + Option::Some(result669) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted460}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted670}) } 33 => { - let lifted462 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted672 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result461 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result461) + Option::Some(result671) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted462}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted672}) } 34 => { - let lifted463 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted673 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -19464,11 +28564,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted463) + @types.SchemaTypeBody::FutureType(lifted673) } 35 => { - let lifted464 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted674 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -19477,58 +28577,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::StreamType(lifted464) + @types.SchemaTypeBody::StreamType(lifted674) } _ => panic() } - let lifted467 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted677 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result676 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result466) + Option::Some(result676) } _ => panic() } - let array469 : Array[String] = []; - for index470 = 0; index470 < (mbt_ffi_load32((iter_base) + 104)); index470 = index470 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index470 * 8) + let array679 : Array[String] = []; + for index680 = 0; index680 < (mbt_ffi_load32((iter_base) + 104)); index680 = index680 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index680 * 8) - let result468 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result678 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array469.push(result468) + array679.push(result678) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array472 : Array[String] = []; - for index473 = 0; index473 < (mbt_ffi_load32((iter_base) + 112)); index473 = index473 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index473 * 8) + let array682 : Array[String] = []; + for index683 = 0; index683 < (mbt_ffi_load32((iter_base) + 112)); index683 = index683 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index683 * 8) - let result471 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result681 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array472.push(result471) + array682.push(result681) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted475 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted685 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result474 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result684 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result474) + Option::Some(result684) } _ => panic() } - let lifted478 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted688 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted477 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted687 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -19543,48 +28643,48 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result476 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result686 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result476) + @types.Role::Other(result686) } _ => panic() } - Option::Some(lifted477) + Option::Some(lifted687) } _ => panic() } - array479.push(@types.SchemaTypeNode::{body : lifted465, metadata : @types.MetadataEnvelope::{doc : lifted467, aliases : array469, examples : array472, deprecated : lifted475, role : lifted478}}) + array689.push(@types.SchemaTypeNode::{body : lifted675, metadata : @types.MetadataEnvelope::{doc : lifted677, aliases : array679, examples : array682, deprecated : lifted685, role : lifted688}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array484 : Array[@types.SchemaTypeDef] = []; - for index485 = 0; index485 < (mbt_ffi_load32((iter_base) + 48)); index485 = index485 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index485 * 24) + let array694 : Array[@types.SchemaTypeDef] = []; + for index695 = 0; index695 < (mbt_ffi_load32((iter_base) + 48)); index695 = index695 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index695 * 24) - let result481 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result691 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted483 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted693 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result482 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result692 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result482) + Option::Some(result692) } _ => panic() } - array484.push(@types.SchemaTypeDef::{id : result481, name : lifted483, body : mbt_ffi_load32((iter_base) + 20)}) + array694.push(@types.SchemaTypeDef::{id : result691, name : lifted693, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) - let array516 : Array[@types.SchemaValueNode] = []; - for index517 = 0; index517 < (mbt_ffi_load32((iter_base) + 60)); index517 = index517 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index517 * 32) + let array726 : Array[@types.SchemaValueNode] = []; + for index727 = 0; index727 < (mbt_ffi_load32((iter_base) + 60)); index727 = index727 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index727 * 32) - let lifted515 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted725 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -19635,25 +28735,25 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 12 => { - let result486 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result696 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result486) + @types.SchemaValueNode::StringValue(result696) } 13 => { - let array487 : Array[Int] = []; - for index488 = 0; index488 < (mbt_ffi_load32((iter_base) + 12)); index488 = index488 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index488 * 4) + let array697 : Array[Int] = []; + for index698 = 0; index698 < (mbt_ffi_load32((iter_base) + 12)); index698 = index698 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index698 * 4) - array487.push(mbt_ffi_load32((iter_base) + 0)) + array697.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array487) + @types.SchemaValueNode::RecordValue(array697) } 14 => { - let lifted489 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted699 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -19662,7 +28762,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted489}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted699}) } 15 => { @@ -19670,67 +28770,67 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 16 => { - let array490 : Array[Bool] = []; - for index491 = 0; index491 < (mbt_ffi_load32((iter_base) + 12)); index491 = index491 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index491 * 1) + let array700 : Array[Bool] = []; + for index701 = 0; index701 < (mbt_ffi_load32((iter_base) + 12)); index701 = index701 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index701 * 1) - array490.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array700.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array490) + @types.SchemaValueNode::FlagsValue(array700) } 17 => { - let array492 : Array[Int] = []; - for index493 = 0; index493 < (mbt_ffi_load32((iter_base) + 12)); index493 = index493 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index493 * 4) + let array702 : Array[Int] = []; + for index703 = 0; index703 < (mbt_ffi_load32((iter_base) + 12)); index703 = index703 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index703 * 4) - array492.push(mbt_ffi_load32((iter_base) + 0)) + array702.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array492) + @types.SchemaValueNode::TupleValue(array702) } 18 => { - let array494 : Array[Int] = []; - for index495 = 0; index495 < (mbt_ffi_load32((iter_base) + 12)); index495 = index495 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index495 * 4) + let array704 : Array[Int] = []; + for index705 = 0; index705 < (mbt_ffi_load32((iter_base) + 12)); index705 = index705 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index705 * 4) - array494.push(mbt_ffi_load32((iter_base) + 0)) + array704.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array494) + @types.SchemaValueNode::ListValue(array704) } 19 => { - let array496 : Array[Int] = []; - for index497 = 0; index497 < (mbt_ffi_load32((iter_base) + 12)); index497 = index497 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index497 * 4) + let array706 : Array[Int] = []; + for index707 = 0; index707 < (mbt_ffi_load32((iter_base) + 12)); index707 = index707 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index707 * 4) - array496.push(mbt_ffi_load32((iter_base) + 0)) + array706.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array496) + @types.SchemaValueNode::FixedListValue(array706) } 20 => { - let array498 : Array[@types.MapEntry] = []; - for index499 = 0; index499 < (mbt_ffi_load32((iter_base) + 12)); index499 = index499 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index499 * 8) + let array708 : Array[@types.MapEntry] = []; + for index709 = 0; index709 < (mbt_ffi_load32((iter_base) + 12)); index709 = index709 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index709 * 8) - array498.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array708.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array498) + @types.SchemaValueNode::MapValue(array708) } 21 => { - let lifted500 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted710 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -19739,14 +28839,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted500) + @types.SchemaValueNode::OptionValue(lifted710) } 22 => { - let lifted503 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted713 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted501 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted711 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -19755,11 +28855,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted501) + @types.ResultValuePayload::OkValue(lifted711) } 1 => { - let lifted502 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted712 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -19768,58 +28868,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted502) + @types.ResultValuePayload::ErrValue(lifted712) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted503) + @types.SchemaValueNode::ResultValue(lifted713) } 23 => { - let result504 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted506 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted716 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result715 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result505) + Option::Some(result715) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result504, language : lifted506}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result714, language : lifted716}) } 24 => { - let result507 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result717 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted509 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted719 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result508 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result718 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result508) + Option::Some(result718) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result507, mime_type : lifted509}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result717, mime_type : lifted719}) } 25 => { - let result510 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result720 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result510) + @types.SchemaValueNode::PathValue(result720) } 26 => { - let result511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result721 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result511) + @types.SchemaValueNode::UrlValue(result721) } 27 => { @@ -19831,21 +28931,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 29 => { - let result512 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result722 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result512}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result722}) } 30 => { - let result513 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result723 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result513, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result723, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result514 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result724 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result514}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result724}) } 32 => { @@ -19854,28 +28954,28 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array516.push(lifted515) + array726.push(lifted725) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array479, defs : array484, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array516, root : mbt_ffi_load32((iter_base) + 64)}}) + Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array689, defs : array694, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array726, root : mbt_ffi_load32((iter_base) + 64)}}) } _ => panic() } - PublicOplogEntry::End(EndParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), response : lifted518, forced_commit : (mbt_ffi_load8_u((iter_base) + 68) != 0)}) + PublicOplogEntry::End(EndParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), response : lifted728, forced_commit : (mbt_ffi_load8_u((iter_base) + 68) != 0)}) } 3 => { - let lifted684 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted964 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let array645 : Array[@types.SchemaTypeNode] = []; - for index646 = 0; index646 < (mbt_ffi_load32((iter_base) + 40)); index646 = index646 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index646 * 144) + let array925 : Array[@types.SchemaTypeNode] = []; + for index926 = 0; index926 < (mbt_ffi_load32((iter_base) + 40)); index926 = index926 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index926 * 144) - let lifted631 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted911 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -19886,149 +28986,849 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted735 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted730 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted729 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted729) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted732 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted731 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array533 : Array[@types.NamedFieldType] = []; - for index534 = 0; index534 < (mbt_ffi_load32((iter_base) + 12)); index534 = index534 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index534 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result519 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted731) + } + _ => panic() + } - let lifted521 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted734 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result520 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result733 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result520) + Option::Some(result733) + } + _ => panic() } - _ => panic() - } - let array523 : Array[String] = []; - for index524 = 0; index524 < (mbt_ffi_load32((iter_base) + 28)); index524 = index524 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index524 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted730, max : lifted732, unit : lifted734}) + } + _ => panic() + } - let result522 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted735) + } + 3 => { - array523.push(result522) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted742 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array526 : Array[String] = []; - for index527 = 0; index527 < (mbt_ffi_load32((iter_base) + 36)); index527 = index527 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index527 * 8) + let lifted737 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result525 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted736 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array526.push(result525) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted529 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result528 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result528) + Option::Some(lifted736) + } + _ => panic() } - _ => panic() - } - let lifted532 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted739 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted531 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted738 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - let result530 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result530) - } - _ => panic() + Option::Some(lifted738) } + _ => panic() + } - Option::Some(lifted531) + let lifted741 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result740 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result740) + } + _ => panic() } - _ => panic() - } - array533.push(@types.NamedFieldType::{name : result519, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted521, aliases : array523, examples : array526, deprecated : lifted529, role : lifted532}}) + Option::Some(@types.NumericRestrictions::{min : lifted737, max : lifted739, unit : lifted741}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array533) + @types.SchemaTypeBody::S16Type(lifted742) } - 15 => { + 4 => { - let array550 : Array[@types.VariantCaseType] = []; - for index551 = 0; index551 < (mbt_ffi_load32((iter_base) + 12)); index551 = index551 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index551 * 72) + let lifted749 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result535 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted744 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted536 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None + let lifted743 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted743) + } + _ => panic() + } + + let lifted746 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted745 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted745) + } + _ => panic() + } + + let lifted748 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result747 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result747) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted744, max : lifted746, unit : lifted748}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted749) + } + 5 => { + + let lifted756 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted751 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted750 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted750) + } + _ => panic() + } + + let lifted753 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted752 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted752) + } + _ => panic() + } + + let lifted755 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result754 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result754) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted751, max : lifted753, unit : lifted755}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted756) + } + 6 => { + + let lifted763 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted758 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted757 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted757) + } + _ => panic() + } + + let lifted760 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted759 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted759) + } + _ => panic() + } + + let lifted762 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result761 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result761) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted758, max : lifted760, unit : lifted762}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted763) + } + 7 => { + + let lifted770 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted765 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted764 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted764) + } + _ => panic() + } + + let lifted767 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted766 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted766) + } + _ => panic() + } + + let lifted769 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result768 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result768) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted765, max : lifted767, unit : lifted769}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted770) + } + 8 => { + + let lifted777 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted772 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted771 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted771) + } + _ => panic() + } + + let lifted774 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted773 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted773) + } + _ => panic() + } + + let lifted776 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result775 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result775) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted772, max : lifted774, unit : lifted776}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted777) + } + 9 => { + + let lifted784 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted779 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted778 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted778) + } + _ => panic() + } + + let lifted781 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted780 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted780) + } + _ => panic() + } + + let lifted783 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result782 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result782) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted779, max : lifted781, unit : lifted783}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted784) + } + 10 => { + + let lifted791 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted786 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted785 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted785) + } + _ => panic() + } + + let lifted788 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted787 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted787) + } + _ => panic() + } + + let lifted790 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result789 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result789) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted786, max : lifted788, unit : lifted790}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted791) + } + 11 => { + + let lifted798 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted793 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted792 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted792) + } + _ => panic() + } + + let lifted795 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted794 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted794) + } + _ => panic() + } + + let lifted797 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result796 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result796) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted793, max : lifted795, unit : lifted797}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted798) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array813 : Array[@types.NamedFieldType] = []; + for index814 = 0; index814 < (mbt_ffi_load32((iter_base) + 12)); index814 = index814 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index814 * 68) + + let result799 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted801 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result800 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result800) + } + _ => panic() + } + + let array803 : Array[String] = []; + for index804 = 0; index804 < (mbt_ffi_load32((iter_base) + 28)); index804 = index804 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index804 * 8) + + let result802 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array803.push(result802) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array806 : Array[String] = []; + for index807 = 0; index807 < (mbt_ffi_load32((iter_base) + 36)); index807 = index807 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index807 * 8) + + let result805 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array806.push(result805) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted809 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result808 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result808) + } + _ => panic() + } + + let lifted812 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted811 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result810 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result810) + } + _ => panic() + } + + Option::Some(lifted811) + } + _ => panic() + } + + array813.push(@types.NamedFieldType::{name : result799, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted801, aliases : array803, examples : array806, deprecated : lifted809, role : lifted812}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array813) + } + 15 => { + + let array830 : Array[@types.VariantCaseType] = []; + for index831 = 0; index831 < (mbt_ffi_load32((iter_base) + 12)); index831 = index831 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index831 * 72) + + let result815 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted816 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None 1 => { Option::Some(mbt_ffi_load32((iter_base) + 12)) @@ -20036,53 +29836,53 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted538 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted818 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result537 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result817 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result537) + Option::Some(result817) } _ => panic() } - let array540 : Array[String] = []; - for index541 = 0; index541 < (mbt_ffi_load32((iter_base) + 32)); index541 = index541 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index541 * 8) + let array820 : Array[String] = []; + for index821 = 0; index821 < (mbt_ffi_load32((iter_base) + 32)); index821 = index821 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index821 * 8) - let result539 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result819 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array540.push(result539) + array820.push(result819) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array543 : Array[String] = []; - for index544 = 0; index544 < (mbt_ffi_load32((iter_base) + 40)); index544 = index544 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index544 * 8) + let array823 : Array[String] = []; + for index824 = 0; index824 < (mbt_ffi_load32((iter_base) + 40)); index824 = index824 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index824 * 8) - let result542 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result822 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array543.push(result542) + array823.push(result822) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted546 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted826 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result545 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result825 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result545) + Option::Some(result825) } _ => panic() } - let lifted549 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted829 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted548 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted828 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -20097,63 +29897,63 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result547 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result827 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result547) + @types.Role::Other(result827) } _ => panic() } - Option::Some(lifted548) + Option::Some(lifted828) } _ => panic() } - array550.push(@types.VariantCaseType::{name : result535, payload : lifted536, metadata : @types.MetadataEnvelope::{doc : lifted538, aliases : array540, examples : array543, deprecated : lifted546, role : lifted549}}) + array830.push(@types.VariantCaseType::{name : result815, payload : lifted816, metadata : @types.MetadataEnvelope::{doc : lifted818, aliases : array820, examples : array823, deprecated : lifted826, role : lifted829}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array550) + @types.SchemaTypeBody::VariantType(array830) } 16 => { - let array553 : Array[String] = []; - for index554 = 0; index554 < (mbt_ffi_load32((iter_base) + 12)); index554 = index554 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index554 * 8) + let array833 : Array[String] = []; + for index834 = 0; index834 < (mbt_ffi_load32((iter_base) + 12)); index834 = index834 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index834 * 8) - let result552 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result832 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array553.push(result552) + array833.push(result832) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array553) + @types.SchemaTypeBody::EnumType(array833) } 17 => { - let array556 : Array[String] = []; - for index557 = 0; index557 < (mbt_ffi_load32((iter_base) + 12)); index557 = index557 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index557 * 8) + let array836 : Array[String] = []; + for index837 = 0; index837 < (mbt_ffi_load32((iter_base) + 12)); index837 = index837 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index837 * 8) - let result555 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result835 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array556.push(result555) + array836.push(result835) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array556) + @types.SchemaTypeBody::FlagsType(array836) } 18 => { - let array558 : Array[Int] = []; - for index559 = 0; index559 < (mbt_ffi_load32((iter_base) + 12)); index559 = index559 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index559 * 4) + let array838 : Array[Int] = []; + for index839 = 0; index839 < (mbt_ffi_load32((iter_base) + 12)); index839 = index839 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index839 * 4) - array558.push(mbt_ffi_load32((iter_base) + 0)) + array838.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array558) + @types.SchemaTypeBody::TupleType(array838) } 19 => { @@ -20173,7 +29973,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 23 => { - let lifted560 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted840 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -20182,7 +29982,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted561 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted841 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -20191,30 +29991,30 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted560, err : lifted561}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted840, err : lifted841}) } 24 => { - let lifted565 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted845 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array563 : Array[String] = []; - for index564 = 0; index564 < (mbt_ffi_load32((iter_base) + 16)); index564 = index564 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index564 * 8) + let array843 : Array[String] = []; + for index844 = 0; index844 < (mbt_ffi_load32((iter_base) + 16)); index844 = index844 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index844 * 8) - let result562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result842 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array563.push(result562) + array843.push(result842) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array563) + Option::Some(array843) } _ => panic() } - let lifted566 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted846 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -20223,7 +30023,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted567 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted847 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -20232,41 +30032,41 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted569 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted849 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result568 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result848 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result568) + Option::Some(result848) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted565, min_length : lifted566, max_length : lifted567, regex : lifted569}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted845, min_length : lifted846, max_length : lifted847, regex : lifted849}) } 25 => { - let lifted573 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted853 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array571 : Array[String] = []; - for index572 = 0; index572 < (mbt_ffi_load32((iter_base) + 16)); index572 = index572 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index572 * 8) + let array851 : Array[String] = []; + for index852 = 0; index852 < (mbt_ffi_load32((iter_base) + 16)); index852 = index852 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index852 * 8) - let result570 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result850 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array571.push(result570) + array851.push(result850) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array571) + Option::Some(array851) } _ => panic() } - let lifted574 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted854 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -20275,7 +30075,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted575 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted855 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -20284,91 +30084,91 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted573, min_bytes : lifted574, max_bytes : lifted575}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted853, min_bytes : lifted854, max_bytes : lifted855}) } 26 => { - let lifted579 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted859 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array577 : Array[String] = []; - for index578 = 0; index578 < (mbt_ffi_load32((iter_base) + 20)); index578 = index578 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index578 * 8) + let array857 : Array[String] = []; + for index858 = 0; index858 < (mbt_ffi_load32((iter_base) + 20)); index858 = index858 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index858 * 8) - let result576 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result856 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array577.push(result576) + array857.push(result856) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array577) + Option::Some(array857) } _ => panic() } - let lifted583 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted863 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array581 : Array[String] = []; - for index582 = 0; index582 < (mbt_ffi_load32((iter_base) + 32)); index582 = index582 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index582 * 8) + let array861 : Array[String] = []; + for index862 = 0; index862 < (mbt_ffi_load32((iter_base) + 32)); index862 = index862 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index862 * 8) - let result580 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result860 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array581.push(result580) + array861.push(result860) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array581) + Option::Some(array861) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted579, allowed_extensions : lifted583}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted859, allowed_extensions : lifted863}) } 27 => { - let lifted587 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted867 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array585 : Array[String] = []; - for index586 = 0; index586 < (mbt_ffi_load32((iter_base) + 16)); index586 = index586 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index586 * 8) + let array865 : Array[String] = []; + for index866 = 0; index866 < (mbt_ffi_load32((iter_base) + 16)); index866 = index866 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index866 * 8) - let result584 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result864 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array585.push(result584) + array865.push(result864) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array585) + Option::Some(array865) } _ => panic() } - let lifted591 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted871 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array589 : Array[String] = []; - for index590 = 0; index590 < (mbt_ffi_load32((iter_base) + 28)); index590 = index590 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index590 * 8) + let array869 : Array[String] = []; + for index870 = 0; index870 < (mbt_ffi_load32((iter_base) + 28)); index870 = index870 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index870 * 8) - let result588 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result868 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array589.push(result588) + array869.push(result868) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array589) + Option::Some(array869) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted587, allowed_hosts : lifted591}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted867, allowed_hosts : lifted871}) } 28 => { @@ -20380,148 +30180,148 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 30 => { - let result592 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result872 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array594 : Array[String] = []; - for index595 = 0; index595 < (mbt_ffi_load32((iter_base) + 20)); index595 = index595 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index595 * 8) + let array874 : Array[String] = []; + for index875 = 0; index875 < (mbt_ffi_load32((iter_base) + 20)); index875 = index875 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index875 * 8) - let result593 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result873 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array594.push(result593) + array874.push(result873) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted597 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted877 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result596 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result876 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result596}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result876}) } _ => panic() } - let lifted599 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted879 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result598 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result878 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result598}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result878}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result592, allowed_suffixes : array594, min : lifted597, max : lifted599}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result872, allowed_suffixes : array874, min : lifted877, max : lifted879}) } 31 => { - let array623 : Array[@types.UnionBranch] = []; - for index624 = 0; index624 < (mbt_ffi_load32((iter_base) + 12)); index624 = index624 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index624 * 92) + let array903 : Array[@types.UnionBranch] = []; + for index904 = 0; index904 < (mbt_ffi_load32((iter_base) + 12)); index904 = index904 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index904 * 92) - let result600 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result880 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted609 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted889 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result601 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result881 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result601) + @types.DiscriminatorRule::Prefix(result881) } 1 => { - let result602 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result882 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result602) + @types.DiscriminatorRule::Suffix(result882) } 2 => { - let result603 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result883 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result603) + @types.DiscriminatorRule::Contains(result883) } 3 => { - let result604 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result884 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result604) + @types.DiscriminatorRule::Regex(result884) } 4 => { - let result605 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result885 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted607 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted887 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result606 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result886 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result606) + Option::Some(result886) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result605, literal : lifted607}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result885, literal : lifted887}) } 5 => { - let result608 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result888 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result608) + @types.DiscriminatorRule::FieldAbsent(result888) } _ => panic() } - let lifted611 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted891 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result610 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result890 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result610) + Option::Some(result890) } _ => panic() } - let array613 : Array[String] = []; - for index614 = 0; index614 < (mbt_ffi_load32((iter_base) + 52)); index614 = index614 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index614 * 8) + let array893 : Array[String] = []; + for index894 = 0; index894 < (mbt_ffi_load32((iter_base) + 52)); index894 = index894 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index894 * 8) - let result612 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result892 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array613.push(result612) + array893.push(result892) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array616 : Array[String] = []; - for index617 = 0; index617 < (mbt_ffi_load32((iter_base) + 60)); index617 = index617 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index617 * 8) + let array896 : Array[String] = []; + for index897 = 0; index897 < (mbt_ffi_load32((iter_base) + 60)); index897 = index897 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index897 * 8) - let result615 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result895 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array616.push(result615) + array896.push(result895) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted619 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted899 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result618 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result898 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result618) + Option::Some(result898) } _ => panic() } - let lifted622 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted902 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted621 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted901 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -20536,57 +30336,57 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result620 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result900 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result620) + @types.Role::Other(result900) } _ => panic() } - Option::Some(lifted621) + Option::Some(lifted901) } _ => panic() } - array623.push(@types.UnionBranch::{tag : result600, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted609, metadata : @types.MetadataEnvelope::{doc : lifted611, aliases : array613, examples : array616, deprecated : lifted619, role : lifted622}}) + array903.push(@types.UnionBranch::{tag : result880, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted889, metadata : @types.MetadataEnvelope::{doc : lifted891, aliases : array893, examples : array896, deprecated : lifted899, role : lifted902}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array623}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array903}) } 32 => { - let lifted626 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted906 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result625 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result905 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result625) + Option::Some(result905) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted626}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted906}) } 33 => { - let lifted628 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted908 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result627 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result907 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result627) + Option::Some(result907) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted628}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted908}) } 34 => { - let lifted629 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted909 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -20595,11 +30395,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted629) + @types.SchemaTypeBody::FutureType(lifted909) } 35 => { - let lifted630 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted910 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -20608,58 +30408,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::StreamType(lifted630) + @types.SchemaTypeBody::StreamType(lifted910) } _ => panic() } - let lifted633 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted913 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result632 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result912 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result632) + Option::Some(result912) } _ => panic() } - let array635 : Array[String] = []; - for index636 = 0; index636 < (mbt_ffi_load32((iter_base) + 104)); index636 = index636 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index636 * 8) + let array915 : Array[String] = []; + for index916 = 0; index916 < (mbt_ffi_load32((iter_base) + 104)); index916 = index916 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index916 * 8) - let result634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result914 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array635.push(result634) + array915.push(result914) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array638 : Array[String] = []; - for index639 = 0; index639 < (mbt_ffi_load32((iter_base) + 112)); index639 = index639 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index639 * 8) + let array918 : Array[String] = []; + for index919 = 0; index919 < (mbt_ffi_load32((iter_base) + 112)); index919 = index919 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index919 * 8) - let result637 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result917 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array638.push(result637) + array918.push(result917) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted641 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted921 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result640 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result920 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result640) + Option::Some(result920) } _ => panic() } - let lifted644 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted924 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted643 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted923 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -20674,48 +30474,48 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result642 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result922 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result642) + @types.Role::Other(result922) } _ => panic() } - Option::Some(lifted643) + Option::Some(lifted923) } _ => panic() } - array645.push(@types.SchemaTypeNode::{body : lifted631, metadata : @types.MetadataEnvelope::{doc : lifted633, aliases : array635, examples : array638, deprecated : lifted641, role : lifted644}}) + array925.push(@types.SchemaTypeNode::{body : lifted911, metadata : @types.MetadataEnvelope::{doc : lifted913, aliases : array915, examples : array918, deprecated : lifted921, role : lifted924}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array650 : Array[@types.SchemaTypeDef] = []; - for index651 = 0; index651 < (mbt_ffi_load32((iter_base) + 48)); index651 = index651 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index651 * 24) + let array930 : Array[@types.SchemaTypeDef] = []; + for index931 = 0; index931 < (mbt_ffi_load32((iter_base) + 48)); index931 = index931 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index931 * 24) - let result647 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result927 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted649 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted929 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result648 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result928 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result648) + Option::Some(result928) } _ => panic() } - array650.push(@types.SchemaTypeDef::{id : result647, name : lifted649, body : mbt_ffi_load32((iter_base) + 20)}) + array930.push(@types.SchemaTypeDef::{id : result927, name : lifted929, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) - let array682 : Array[@types.SchemaValueNode] = []; - for index683 = 0; index683 < (mbt_ffi_load32((iter_base) + 60)); index683 = index683 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index683 * 32) + let array962 : Array[@types.SchemaValueNode] = []; + for index963 = 0; index963 < (mbt_ffi_load32((iter_base) + 60)); index963 = index963 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index963 * 32) - let lifted681 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted961 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -20766,25 +30566,25 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 12 => { - let result652 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result932 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result652) + @types.SchemaValueNode::StringValue(result932) } 13 => { - let array653 : Array[Int] = []; - for index654 = 0; index654 < (mbt_ffi_load32((iter_base) + 12)); index654 = index654 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index654 * 4) + let array933 : Array[Int] = []; + for index934 = 0; index934 < (mbt_ffi_load32((iter_base) + 12)); index934 = index934 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index934 * 4) - array653.push(mbt_ffi_load32((iter_base) + 0)) + array933.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array653) + @types.SchemaValueNode::RecordValue(array933) } 14 => { - let lifted655 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted935 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -20793,7 +30593,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted655}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted935}) } 15 => { @@ -20801,67 +30601,67 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 16 => { - let array656 : Array[Bool] = []; - for index657 = 0; index657 < (mbt_ffi_load32((iter_base) + 12)); index657 = index657 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index657 * 1) + let array936 : Array[Bool] = []; + for index937 = 0; index937 < (mbt_ffi_load32((iter_base) + 12)); index937 = index937 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index937 * 1) - array656.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array936.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array656) + @types.SchemaValueNode::FlagsValue(array936) } 17 => { - let array658 : Array[Int] = []; - for index659 = 0; index659 < (mbt_ffi_load32((iter_base) + 12)); index659 = index659 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index659 * 4) + let array938 : Array[Int] = []; + for index939 = 0; index939 < (mbt_ffi_load32((iter_base) + 12)); index939 = index939 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index939 * 4) - array658.push(mbt_ffi_load32((iter_base) + 0)) + array938.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array658) + @types.SchemaValueNode::TupleValue(array938) } 18 => { - let array660 : Array[Int] = []; - for index661 = 0; index661 < (mbt_ffi_load32((iter_base) + 12)); index661 = index661 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index661 * 4) + let array940 : Array[Int] = []; + for index941 = 0; index941 < (mbt_ffi_load32((iter_base) + 12)); index941 = index941 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index941 * 4) - array660.push(mbt_ffi_load32((iter_base) + 0)) + array940.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array660) + @types.SchemaValueNode::ListValue(array940) } 19 => { - let array662 : Array[Int] = []; - for index663 = 0; index663 < (mbt_ffi_load32((iter_base) + 12)); index663 = index663 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index663 * 4) + let array942 : Array[Int] = []; + for index943 = 0; index943 < (mbt_ffi_load32((iter_base) + 12)); index943 = index943 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index943 * 4) - array662.push(mbt_ffi_load32((iter_base) + 0)) + array942.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array662) + @types.SchemaValueNode::FixedListValue(array942) } 20 => { - let array664 : Array[@types.MapEntry] = []; - for index665 = 0; index665 < (mbt_ffi_load32((iter_base) + 12)); index665 = index665 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index665 * 8) + let array944 : Array[@types.MapEntry] = []; + for index945 = 0; index945 < (mbt_ffi_load32((iter_base) + 12)); index945 = index945 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index945 * 8) - array664.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array944.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array664) + @types.SchemaValueNode::MapValue(array944) } 21 => { - let lifted666 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted946 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -20870,14 +30670,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted666) + @types.SchemaValueNode::OptionValue(lifted946) } 22 => { - let lifted669 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted949 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted667 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted947 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -20886,11 +30686,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted667) + @types.ResultValuePayload::OkValue(lifted947) } 1 => { - let lifted668 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted948 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -20899,58 +30699,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted668) + @types.ResultValuePayload::ErrValue(lifted948) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted669) + @types.SchemaValueNode::ResultValue(lifted949) } 23 => { - let result670 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result950 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted672 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted952 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result951 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result671) + Option::Some(result951) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result670, language : lifted672}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result950, language : lifted952}) } 24 => { - let result673 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result953 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted675 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted955 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result674 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result954 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result674) + Option::Some(result954) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result673, mime_type : lifted675}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result953, mime_type : lifted955}) } 25 => { - let result676 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result956 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result676) + @types.SchemaValueNode::PathValue(result956) } 26 => { - let result677 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result957 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result677) + @types.SchemaValueNode::UrlValue(result957) } 27 => { @@ -20962,21 +30762,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 29 => { - let result678 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result958 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result678}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result958}) } 30 => { - let result679 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result959 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result679, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result959, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result680 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result960 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result680}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result960}) } 32 => { @@ -20985,29 +30785,29 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array682.push(lifted681) + array962.push(lifted961) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array645, defs : array650, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array682, root : mbt_ffi_load32((iter_base) + 64)}}) + Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array925, defs : array930, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array962, root : mbt_ffi_load32((iter_base) + 64)}}) } _ => panic() } - PublicOplogEntry::Cancelled(CancelledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), partial : lifted684}) + PublicOplogEntry::Cancelled(CancelledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), partial : lifted964}) } 4 => { - let lifted1059 = match (mbt_ffi_load8_u((iter_base) + 24)) { + let lifted1479 = match (mbt_ffi_load8_u((iter_base) + 24)) { 0 => { - let result685 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result965 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let array812 : Array[@types.SchemaTypeNode] = []; - for index813 = 0; index813 < (mbt_ffi_load32((iter_base) + 44)); index813 = index813 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index813 * 144) + let array1162 : Array[@types.SchemaTypeNode] = []; + for index1163 = 0; index1163 < (mbt_ffi_load32((iter_base) + 44)); index1163 = index1163 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index1163 * 144) - let lifted798 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1148 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -21018,148 +30818,848 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted972 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted967 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted966 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted966) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted969 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted968 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array700 : Array[@types.NamedFieldType] = []; - for index701 = 0; index701 < (mbt_ffi_load32((iter_base) + 12)); index701 = index701 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index701 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result686 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted968) + } + _ => panic() + } - let lifted688 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted971 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result687 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result970 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result687) + Option::Some(result970) + } + _ => panic() } - _ => panic() - } - let array690 : Array[String] = []; - for index691 = 0; index691 < (mbt_ffi_load32((iter_base) + 28)); index691 = index691 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index691 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted967, max : lifted969, unit : lifted971}) + } + _ => panic() + } - let result689 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted972) + } + 3 => { - array690.push(result689) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted979 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array693 : Array[String] = []; - for index694 = 0; index694 < (mbt_ffi_load32((iter_base) + 36)); index694 = index694 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index694 * 8) + let lifted974 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result692 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted973 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array693.push(result692) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted696 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result695 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result695) + Option::Some(lifted973) + } + _ => panic() } - _ => panic() - } - let lifted699 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted976 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted698 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted975 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - let result697 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result697) - } - _ => panic() + Option::Some(lifted975) } + _ => panic() + } + + let lifted978 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some(lifted698) + let result977 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result977) + } + _ => panic() } - _ => panic() - } - array700.push(@types.NamedFieldType::{name : result686, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted688, aliases : array690, examples : array693, deprecated : lifted696, role : lifted699}}) + Option::Some(@types.NumericRestrictions::{min : lifted974, max : lifted976, unit : lifted978}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array700) + @types.SchemaTypeBody::S16Type(lifted979) + } + 4 => { + + let lifted986 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted981 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted980 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted980) + } + _ => panic() + } + + let lifted983 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted982 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted982) + } + _ => panic() + } + + let lifted985 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result984 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result984) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted981, max : lifted983, unit : lifted985}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted986) + } + 5 => { + + let lifted993 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted988 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted987 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted987) + } + _ => panic() + } + + let lifted990 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted989 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted989) + } + _ => panic() + } + + let lifted992 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result991 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result991) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted988, max : lifted990, unit : lifted992}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted993) + } + 6 => { + + let lifted1000 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted995 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted994 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted994) + } + _ => panic() + } + + let lifted997 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted996 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted996) + } + _ => panic() + } + + let lifted999 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result998 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result998) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted995, max : lifted997, unit : lifted999}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1000) + } + 7 => { + + let lifted1007 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1002 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1001 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1001) + } + _ => panic() + } + + let lifted1004 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1003 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1003) + } + _ => panic() + } + + let lifted1006 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1005 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1005) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1002, max : lifted1004, unit : lifted1006}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1007) + } + 8 => { + + let lifted1014 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1009 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1008 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1008) + } + _ => panic() + } + + let lifted1011 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1010 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1010) + } + _ => panic() + } + + let lifted1013 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1012 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1012) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1009, max : lifted1011, unit : lifted1013}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1014) + } + 9 => { + + let lifted1021 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1016 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1015 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1015) + } + _ => panic() + } + + let lifted1018 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1017 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1017) + } + _ => panic() + } + + let lifted1020 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1019 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1019) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1016, max : lifted1018, unit : lifted1020}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1021) + } + 10 => { + + let lifted1028 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1023 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1022 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1022) + } + _ => panic() + } + + let lifted1025 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1024 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1024) + } + _ => panic() + } + + let lifted1027 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1026 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1026) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1023, max : lifted1025, unit : lifted1027}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1028) + } + 11 => { + + let lifted1035 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1030 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1029 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1029) + } + _ => panic() + } + + let lifted1032 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1031 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1031) + } + _ => panic() + } + + let lifted1034 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1033 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1033) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1030, max : lifted1032, unit : lifted1034}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1035) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array1050 : Array[@types.NamedFieldType] = []; + for index1051 = 0; index1051 < (mbt_ffi_load32((iter_base) + 12)); index1051 = index1051 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1051 * 68) + + let result1036 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1038 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result1037 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result1037) + } + _ => panic() + } + + let array1040 : Array[String] = []; + for index1041 = 0; index1041 < (mbt_ffi_load32((iter_base) + 28)); index1041 = index1041 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1041 * 8) + + let result1039 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1040.push(result1039) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array1043 : Array[String] = []; + for index1044 = 0; index1044 < (mbt_ffi_load32((iter_base) + 36)); index1044 = index1044 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1044 * 8) + + let result1042 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1043.push(result1042) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted1046 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result1045 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result1045) + } + _ => panic() + } + + let lifted1049 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted1048 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result1047 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result1047) + } + _ => panic() + } + + Option::Some(lifted1048) + } + _ => panic() + } + + array1050.push(@types.NamedFieldType::{name : result1036, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1038, aliases : array1040, examples : array1043, deprecated : lifted1046, role : lifted1049}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array1050) } 15 => { - let array717 : Array[@types.VariantCaseType] = []; - for index718 = 0; index718 < (mbt_ffi_load32((iter_base) + 12)); index718 = index718 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index718 * 72) + let array1067 : Array[@types.VariantCaseType] = []; + for index1068 = 0; index1068 < (mbt_ffi_load32((iter_base) + 12)); index1068 = index1068 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1068 * 72) - let result702 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1052 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted703 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1053 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -21168,53 +31668,53 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted705 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1055 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result704 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1054 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result704) + Option::Some(result1054) } _ => panic() } - let array707 : Array[String] = []; - for index708 = 0; index708 < (mbt_ffi_load32((iter_base) + 32)); index708 = index708 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index708 * 8) + let array1057 : Array[String] = []; + for index1058 = 0; index1058 < (mbt_ffi_load32((iter_base) + 32)); index1058 = index1058 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1058 * 8) - let result706 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1056 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array707.push(result706) + array1057.push(result1056) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array710 : Array[String] = []; - for index711 = 0; index711 < (mbt_ffi_load32((iter_base) + 40)); index711 = index711 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index711 * 8) + let array1060 : Array[String] = []; + for index1061 = 0; index1061 < (mbt_ffi_load32((iter_base) + 40)); index1061 = index1061 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1061 * 8) - let result709 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1059 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array710.push(result709) + array1060.push(result1059) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted713 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1063 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result712 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1062 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result712) + Option::Some(result1062) } _ => panic() } - let lifted716 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1066 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted715 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1065 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -21229,63 +31729,63 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1064 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result714) + @types.Role::Other(result1064) } _ => panic() } - Option::Some(lifted715) + Option::Some(lifted1065) } _ => panic() } - array717.push(@types.VariantCaseType::{name : result702, payload : lifted703, metadata : @types.MetadataEnvelope::{doc : lifted705, aliases : array707, examples : array710, deprecated : lifted713, role : lifted716}}) + array1067.push(@types.VariantCaseType::{name : result1052, payload : lifted1053, metadata : @types.MetadataEnvelope::{doc : lifted1055, aliases : array1057, examples : array1060, deprecated : lifted1063, role : lifted1066}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array717) + @types.SchemaTypeBody::VariantType(array1067) } 16 => { - let array720 : Array[String] = []; - for index721 = 0; index721 < (mbt_ffi_load32((iter_base) + 12)); index721 = index721 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index721 * 8) + let array1070 : Array[String] = []; + for index1071 = 0; index1071 < (mbt_ffi_load32((iter_base) + 12)); index1071 = index1071 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1071 * 8) - let result719 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1069 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array720.push(result719) + array1070.push(result1069) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array720) + @types.SchemaTypeBody::EnumType(array1070) } 17 => { - let array723 : Array[String] = []; - for index724 = 0; index724 < (mbt_ffi_load32((iter_base) + 12)); index724 = index724 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index724 * 8) + let array1073 : Array[String] = []; + for index1074 = 0; index1074 < (mbt_ffi_load32((iter_base) + 12)); index1074 = index1074 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1074 * 8) - let result722 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1072 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array723.push(result722) + array1073.push(result1072) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array723) + @types.SchemaTypeBody::FlagsType(array1073) } 18 => { - let array725 : Array[Int] = []; - for index726 = 0; index726 < (mbt_ffi_load32((iter_base) + 12)); index726 = index726 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index726 * 4) + let array1075 : Array[Int] = []; + for index1076 = 0; index1076 < (mbt_ffi_load32((iter_base) + 12)); index1076 = index1076 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1076 * 4) - array725.push(mbt_ffi_load32((iter_base) + 0)) + array1075.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array725) + @types.SchemaTypeBody::TupleType(array1075) } 19 => { @@ -21305,7 +31805,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 23 => { - let lifted727 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1077 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -21314,7 +31814,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted728 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1078 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -21323,30 +31823,30 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted727, err : lifted728}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1077, err : lifted1078}) } 24 => { - let lifted732 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1082 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array730 : Array[String] = []; - for index731 = 0; index731 < (mbt_ffi_load32((iter_base) + 16)); index731 = index731 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index731 * 8) + let array1080 : Array[String] = []; + for index1081 = 0; index1081 < (mbt_ffi_load32((iter_base) + 16)); index1081 = index1081 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1081 * 8) - let result729 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1079 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array730.push(result729) + array1080.push(result1079) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array730) + Option::Some(array1080) } _ => panic() } - let lifted733 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1083 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -21355,7 +31855,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted734 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1084 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -21364,41 +31864,41 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted736 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1086 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result735 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1085 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result735) + Option::Some(result1085) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted732, min_length : lifted733, max_length : lifted734, regex : lifted736}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1082, min_length : lifted1083, max_length : lifted1084, regex : lifted1086}) } 25 => { - let lifted740 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1090 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array738 : Array[String] = []; - for index739 = 0; index739 < (mbt_ffi_load32((iter_base) + 16)); index739 = index739 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index739 * 8) + let array1088 : Array[String] = []; + for index1089 = 0; index1089 < (mbt_ffi_load32((iter_base) + 16)); index1089 = index1089 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1089 * 8) - let result737 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1087 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array738.push(result737) + array1088.push(result1087) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array738) + Option::Some(array1088) } _ => panic() } - let lifted741 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1091 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -21407,7 +31907,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted742 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1092 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -21416,91 +31916,91 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted740, min_bytes : lifted741, max_bytes : lifted742}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1090, min_bytes : lifted1091, max_bytes : lifted1092}) } 26 => { - let lifted746 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1096 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array744 : Array[String] = []; - for index745 = 0; index745 < (mbt_ffi_load32((iter_base) + 20)); index745 = index745 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index745 * 8) + let array1094 : Array[String] = []; + for index1095 = 0; index1095 < (mbt_ffi_load32((iter_base) + 20)); index1095 = index1095 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1095 * 8) - let result743 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1093 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array744.push(result743) + array1094.push(result1093) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array744) + Option::Some(array1094) } _ => panic() } - let lifted750 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1100 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array748 : Array[String] = []; - for index749 = 0; index749 < (mbt_ffi_load32((iter_base) + 32)); index749 = index749 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index749 * 8) + let array1098 : Array[String] = []; + for index1099 = 0; index1099 < (mbt_ffi_load32((iter_base) + 32)); index1099 = index1099 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1099 * 8) - let result747 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1097 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array748.push(result747) + array1098.push(result1097) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array748) + Option::Some(array1098) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted746, allowed_extensions : lifted750}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1096, allowed_extensions : lifted1100}) } 27 => { - let lifted754 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1104 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array752 : Array[String] = []; - for index753 = 0; index753 < (mbt_ffi_load32((iter_base) + 16)); index753 = index753 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index753 * 8) + let array1102 : Array[String] = []; + for index1103 = 0; index1103 < (mbt_ffi_load32((iter_base) + 16)); index1103 = index1103 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1103 * 8) - let result751 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1101 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array752.push(result751) + array1102.push(result1101) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array752) + Option::Some(array1102) } _ => panic() } - let lifted758 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1108 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array756 : Array[String] = []; - for index757 = 0; index757 < (mbt_ffi_load32((iter_base) + 28)); index757 = index757 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index757 * 8) + let array1106 : Array[String] = []; + for index1107 = 0; index1107 < (mbt_ffi_load32((iter_base) + 28)); index1107 = index1107 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1107 * 8) - let result755 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array756.push(result755) + array1106.push(result1105) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array756) + Option::Some(array1106) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted754, allowed_hosts : lifted758}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1104, allowed_hosts : lifted1108}) } 28 => { @@ -21512,148 +32012,148 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 30 => { - let result759 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array761 : Array[String] = []; - for index762 = 0; index762 < (mbt_ffi_load32((iter_base) + 20)); index762 = index762 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index762 * 8) + let array1111 : Array[String] = []; + for index1112 = 0; index1112 < (mbt_ffi_load32((iter_base) + 20)); index1112 = index1112 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1112 * 8) - let result760 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array761.push(result760) + array1111.push(result1110) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted764 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1114 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result763 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result763}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1113}) } _ => panic() } - let lifted766 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1116 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result765 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result765}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1115}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result759, allowed_suffixes : array761, min : lifted764, max : lifted766}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1109, allowed_suffixes : array1111, min : lifted1114, max : lifted1116}) } 31 => { - let array790 : Array[@types.UnionBranch] = []; - for index791 = 0; index791 < (mbt_ffi_load32((iter_base) + 12)); index791 = index791 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index791 * 92) + let array1140 : Array[@types.UnionBranch] = []; + for index1141 = 0; index1141 < (mbt_ffi_load32((iter_base) + 12)); index1141 = index1141 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1141 * 92) - let result767 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted776 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1126 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result768 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result768) + @types.DiscriminatorRule::Prefix(result1118) } 1 => { - let result769 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1119 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result769) + @types.DiscriminatorRule::Suffix(result1119) } 2 => { - let result770 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result770) + @types.DiscriminatorRule::Contains(result1120) } 3 => { - let result771 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result771) + @types.DiscriminatorRule::Regex(result1121) } 4 => { - let result772 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1122 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted774 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1124 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result773 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result773) + Option::Some(result1123) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result772, literal : lifted774}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1122, literal : lifted1124}) } 5 => { - let result775 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result775) + @types.DiscriminatorRule::FieldAbsent(result1125) } _ => panic() } - let lifted778 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1128 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result777 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result777) + Option::Some(result1127) } _ => panic() } - let array780 : Array[String] = []; - for index781 = 0; index781 < (mbt_ffi_load32((iter_base) + 52)); index781 = index781 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index781 * 8) + let array1130 : Array[String] = []; + for index1131 = 0; index1131 < (mbt_ffi_load32((iter_base) + 52)); index1131 = index1131 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1131 * 8) - let result779 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array780.push(result779) + array1130.push(result1129) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array783 : Array[String] = []; - for index784 = 0; index784 < (mbt_ffi_load32((iter_base) + 60)); index784 = index784 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index784 * 8) + let array1133 : Array[String] = []; + for index1134 = 0; index1134 < (mbt_ffi_load32((iter_base) + 60)); index1134 = index1134 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1134 * 8) - let result782 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array783.push(result782) + array1133.push(result1132) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted786 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1136 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result785 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result785) + Option::Some(result1135) } _ => panic() } - let lifted789 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1139 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted788 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1138 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -21668,57 +32168,57 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result787 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result787) + @types.Role::Other(result1137) } _ => panic() } - Option::Some(lifted788) + Option::Some(lifted1138) } _ => panic() } - array790.push(@types.UnionBranch::{tag : result767, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted776, metadata : @types.MetadataEnvelope::{doc : lifted778, aliases : array780, examples : array783, deprecated : lifted786, role : lifted789}}) + array1140.push(@types.UnionBranch::{tag : result1117, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1126, metadata : @types.MetadataEnvelope::{doc : lifted1128, aliases : array1130, examples : array1133, deprecated : lifted1136, role : lifted1139}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array790}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1140}) } 32 => { - let lifted793 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1143 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result792 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result792) + Option::Some(result1142) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted793}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1143}) } 33 => { - let lifted795 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1145 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result794 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result794) + Option::Some(result1144) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted795}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1145}) } 34 => { - let lifted796 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1146 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -21727,11 +32227,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted796) + @types.SchemaTypeBody::FutureType(lifted1146) } 35 => { - let lifted797 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1147 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -21740,58 +32240,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::StreamType(lifted797) + @types.SchemaTypeBody::StreamType(lifted1147) } _ => panic() } - let lifted800 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1150 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result799 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result799) + Option::Some(result1149) } _ => panic() } - let array802 : Array[String] = []; - for index803 = 0; index803 < (mbt_ffi_load32((iter_base) + 104)); index803 = index803 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index803 * 8) + let array1152 : Array[String] = []; + for index1153 = 0; index1153 < (mbt_ffi_load32((iter_base) + 104)); index1153 = index1153 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1153 * 8) - let result801 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array802.push(result801) + array1152.push(result1151) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array805 : Array[String] = []; - for index806 = 0; index806 < (mbt_ffi_load32((iter_base) + 112)); index806 = index806 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index806 * 8) + let array1155 : Array[String] = []; + for index1156 = 0; index1156 < (mbt_ffi_load32((iter_base) + 112)); index1156 = index1156 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1156 * 8) - let result804 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1154 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array805.push(result804) + array1155.push(result1154) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted808 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1158 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result807 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result807) + Option::Some(result1157) } _ => panic() } - let lifted811 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1161 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted810 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1160 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -21806,48 +32306,48 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result809 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1159 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result809) + @types.Role::Other(result1159) } _ => panic() } - Option::Some(lifted810) + Option::Some(lifted1160) } _ => panic() } - array812.push(@types.SchemaTypeNode::{body : lifted798, metadata : @types.MetadataEnvelope::{doc : lifted800, aliases : array802, examples : array805, deprecated : lifted808, role : lifted811}}) + array1162.push(@types.SchemaTypeNode::{body : lifted1148, metadata : @types.MetadataEnvelope::{doc : lifted1150, aliases : array1152, examples : array1155, deprecated : lifted1158, role : lifted1161}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let array817 : Array[@types.SchemaTypeDef] = []; - for index818 = 0; index818 < (mbt_ffi_load32((iter_base) + 52)); index818 = index818 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index818 * 24) + let array1167 : Array[@types.SchemaTypeDef] = []; + for index1168 = 0; index1168 < (mbt_ffi_load32((iter_base) + 52)); index1168 = index1168 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1168 * 24) - let result814 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1164 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted816 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1166 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result815 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result815) + Option::Some(result1165) } _ => panic() } - array817.push(@types.SchemaTypeDef::{id : result814, name : lifted816, body : mbt_ffi_load32((iter_base) + 20)}) + array1167.push(@types.SchemaTypeDef::{id : result1164, name : lifted1166, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array849 : Array[@types.SchemaValueNode] = []; - for index850 = 0; index850 < (mbt_ffi_load32((iter_base) + 64)); index850 = index850 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index850 * 32) + let array1199 : Array[@types.SchemaValueNode] = []; + for index1200 = 0; index1200 < (mbt_ffi_load32((iter_base) + 64)); index1200 = index1200 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index1200 * 32) - let lifted848 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1198 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -21898,25 +32398,25 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 12 => { - let result819 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result819) + @types.SchemaValueNode::StringValue(result1169) } 13 => { - let array820 : Array[Int] = []; - for index821 = 0; index821 < (mbt_ffi_load32((iter_base) + 12)); index821 = index821 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index821 * 4) + let array1170 : Array[Int] = []; + for index1171 = 0; index1171 < (mbt_ffi_load32((iter_base) + 12)); index1171 = index1171 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1171 * 4) - array820.push(mbt_ffi_load32((iter_base) + 0)) + array1170.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array820) + @types.SchemaValueNode::RecordValue(array1170) } 14 => { - let lifted822 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1172 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -21925,7 +32425,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted822}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1172}) } 15 => { @@ -21933,67 +32433,67 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 16 => { - let array823 : Array[Bool] = []; - for index824 = 0; index824 < (mbt_ffi_load32((iter_base) + 12)); index824 = index824 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index824 * 1) + let array1173 : Array[Bool] = []; + for index1174 = 0; index1174 < (mbt_ffi_load32((iter_base) + 12)); index1174 = index1174 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1174 * 1) - array823.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1173.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array823) + @types.SchemaValueNode::FlagsValue(array1173) } 17 => { - let array825 : Array[Int] = []; - for index826 = 0; index826 < (mbt_ffi_load32((iter_base) + 12)); index826 = index826 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index826 * 4) + let array1175 : Array[Int] = []; + for index1176 = 0; index1176 < (mbt_ffi_load32((iter_base) + 12)); index1176 = index1176 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1176 * 4) - array825.push(mbt_ffi_load32((iter_base) + 0)) + array1175.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array825) + @types.SchemaValueNode::TupleValue(array1175) } 18 => { - let array827 : Array[Int] = []; - for index828 = 0; index828 < (mbt_ffi_load32((iter_base) + 12)); index828 = index828 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index828 * 4) + let array1177 : Array[Int] = []; + for index1178 = 0; index1178 < (mbt_ffi_load32((iter_base) + 12)); index1178 = index1178 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1178 * 4) - array827.push(mbt_ffi_load32((iter_base) + 0)) + array1177.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array827) + @types.SchemaValueNode::ListValue(array1177) } 19 => { - let array829 : Array[Int] = []; - for index830 = 0; index830 < (mbt_ffi_load32((iter_base) + 12)); index830 = index830 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index830 * 4) + let array1179 : Array[Int] = []; + for index1180 = 0; index1180 < (mbt_ffi_load32((iter_base) + 12)); index1180 = index1180 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1180 * 4) - array829.push(mbt_ffi_load32((iter_base) + 0)) + array1179.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array829) + @types.SchemaValueNode::FixedListValue(array1179) } 20 => { - let array831 : Array[@types.MapEntry] = []; - for index832 = 0; index832 < (mbt_ffi_load32((iter_base) + 12)); index832 = index832 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index832 * 8) + let array1181 : Array[@types.MapEntry] = []; + for index1182 = 0; index1182 < (mbt_ffi_load32((iter_base) + 12)); index1182 = index1182 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1182 * 8) - array831.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1181.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array831) + @types.SchemaValueNode::MapValue(array1181) } 21 => { - let lifted833 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1183 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -22002,14 +32502,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted833) + @types.SchemaValueNode::OptionValue(lifted1183) } 22 => { - let lifted836 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1186 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted834 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1184 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -22018,11 +32518,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted834) + @types.ResultValuePayload::OkValue(lifted1184) } 1 => { - let lifted835 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1185 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -22031,58 +32531,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted835) + @types.ResultValuePayload::ErrValue(lifted1185) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted836) + @types.SchemaValueNode::ResultValue(lifted1186) } 23 => { - let result837 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted839 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1189 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result838 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result838) + Option::Some(result1188) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result837, language : lifted839}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1187, language : lifted1189}) } 24 => { - let result840 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1190 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted842 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1192 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result841 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1191 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result841) + Option::Some(result1191) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result840, mime_type : lifted842}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1190, mime_type : lifted1192}) } 25 => { - let result843 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result843) + @types.SchemaValueNode::PathValue(result1193) } 26 => { - let result844 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result844) + @types.SchemaValueNode::UrlValue(result1194) } 27 => { @@ -22094,21 +32594,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 29 => { - let result845 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result845}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1195}) } 30 => { - let result846 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result846, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1196, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result847 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result847}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1197}) } 32 => { @@ -22117,47 +32617,47 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array849.push(lifted848) + array1199.push(lifted1198) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - let result851 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 72), mbt_ffi_load32((iter_base) + 76)) + let result1201 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 72), mbt_ffi_load32((iter_base) + 76)) - let array853 : Array[String] = []; - for index854 = 0; index854 < (mbt_ffi_load32((iter_base) + 84)); index854 = index854 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index854 * 8) + let array1203 : Array[String] = []; + for index1204 = 0; index1204 < (mbt_ffi_load32((iter_base) + 84)); index1204 = index1204 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index1204 * 8) - let result852 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array853.push(result852) + array1203.push(result1202) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) - let array868 : Array[Array[SpanData]] = []; - for index869 = 0; index869 < (mbt_ffi_load32((iter_base) + 92)); index869 = index869 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index869 * 8) + let array1218 : Array[Array[SpanData]] = []; + for index1219 = 0; index1219 < (mbt_ffi_load32((iter_base) + 92)); index1219 = index1219 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index1219 * 8) - let array866 : Array[SpanData] = []; - for index867 = 0; index867 < (mbt_ffi_load32((iter_base) + 4)); index867 = index867 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index867 * 80) + let array1216 : Array[SpanData] = []; + for index1217 = 0; index1217 < (mbt_ffi_load32((iter_base) + 4)); index1217 = index1217 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1217 * 80) - let lifted865 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1215 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result855 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted857 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted1207 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result856 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result1206 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result856) + Option::Some(result1206) } _ => panic() } - let lifted858 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted1208 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -22166,58 +32666,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let array862 : Array[@context.Attribute] = []; - for index863 = 0; index863 < (mbt_ffi_load32((iter_base) + 68)); index863 = index863 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index863 * 20) + let array1212 : Array[@context.Attribute] = []; + for index1213 = 0; index1213 < (mbt_ffi_load32((iter_base) + 68)); index1213 = index1213 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1213 * 20) - let result859 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1209 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted861 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1211 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result860 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1210 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result860) + @context.AttributeValue::String(result1210) } _ => panic() } - array862.push(@context.Attribute::{key : result859, value : lifted861}) + array1212.push(@context.Attribute::{key : result1209, value : lifted1211}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result855, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted857, linked_context : lifted858, attributes : array862, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result1205, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1207, linked_context : lifted1208, attributes : array1212, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result864 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1214 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result864}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result1214}) } _ => panic() } - array866.push(lifted865) + array1216.push(lifted1215) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array868.push(array866) + array1218.push(array1216) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result685, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array812, defs : array817, root : mbt_ffi_load32((iter_base) + 56)}, value : @types.SchemaValueTree::{value_nodes : array849, root : mbt_ffi_load32((iter_base) + 68)}}, trace_id : result851, trace_states : array853, invocation_context : array868}) + AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result965, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1162, defs : array1167, root : mbt_ffi_load32((iter_base) + 56)}, value : @types.SchemaValueTree::{value_nodes : array1199, root : mbt_ffi_load32((iter_base) + 68)}}, trace_id : result1201, trace_states : array1203, invocation_context : array1218}) } 1 => { - let result870 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result1220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result871 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1221 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let array998 : Array[@types.SchemaTypeNode] = []; - for index999 = 0; index999 < (mbt_ffi_load32((iter_base) + 52)); index999 = index999 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index999 * 144) + let array1418 : Array[@types.SchemaTypeNode] = []; + for index1419 = 0; index1419 < (mbt_ffi_load32((iter_base) + 52)); index1419 = index1419 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1419 * 144) - let lifted984 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1404 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -22228,148 +32728,848 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted1228 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted1223 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted1222 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted1222) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted1225 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted1224 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array886 : Array[@types.NamedFieldType] = []; - for index887 = 0; index887 < (mbt_ffi_load32((iter_base) + 12)); index887 = index887 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index887 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result872 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted1224) + } + _ => panic() + } - let lifted874 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted1227 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result873 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result873) + Option::Some(result1226) + } + _ => panic() } - _ => panic() - } - let array876 : Array[String] = []; - for index877 = 0; index877 < (mbt_ffi_load32((iter_base) + 28)); index877 = index877 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index877 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted1223, max : lifted1225, unit : lifted1227}) + } + _ => panic() + } - let result875 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted1228) + } + 3 => { - array876.push(result875) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted1235 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array879 : Array[String] = []; - for index880 = 0; index880 < (mbt_ffi_load32((iter_base) + 36)); index880 = index880 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index880 * 8) + let lifted1230 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result878 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted1229 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array879.push(result878) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted882 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result881 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result881) + Option::Some(lifted1229) + } + _ => panic() } - _ => panic() - } - let lifted885 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted1232 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted884 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted1231 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - let result883 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result883) - } - _ => panic() + Option::Some(lifted1231) } + _ => panic() + } + + let lifted1234 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some(lifted884) + let result1233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1233) + } + _ => panic() } - _ => panic() - } - array886.push(@types.NamedFieldType::{name : result872, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted874, aliases : array876, examples : array879, deprecated : lifted882, role : lifted885}}) + Option::Some(@types.NumericRestrictions::{min : lifted1230, max : lifted1232, unit : lifted1234}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array886) + @types.SchemaTypeBody::S16Type(lifted1235) } - 15 => { - - let array903 : Array[@types.VariantCaseType] = []; - for index904 = 0; index904 < (mbt_ffi_load32((iter_base) + 12)); index904 = index904 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index904 * 72) + 4 => { - let result888 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted1242 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1237 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1236 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1236) + } + _ => panic() + } + + let lifted1239 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1238 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1238) + } + _ => panic() + } + + let lifted1241 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1240) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1237, max : lifted1239, unit : lifted1241}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1242) + } + 5 => { + + let lifted1249 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1244 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1243 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1243) + } + _ => panic() + } + + let lifted1246 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1245 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1245) + } + _ => panic() + } + + let lifted1248 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1247 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1247) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1244, max : lifted1246, unit : lifted1248}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1249) + } + 6 => { + + let lifted1256 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1251 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1250 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1250) + } + _ => panic() + } + + let lifted1253 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1252 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1252) + } + _ => panic() + } + + let lifted1255 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1254 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1254) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1251, max : lifted1253, unit : lifted1255}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1256) + } + 7 => { + + let lifted1263 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1258 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1257 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1257) + } + _ => panic() + } + + let lifted1260 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1259 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1259) + } + _ => panic() + } + + let lifted1262 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1261) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1258, max : lifted1260, unit : lifted1262}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1263) + } + 8 => { + + let lifted1270 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1265 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1264 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1264) + } + _ => panic() + } + + let lifted1267 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1266 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1266) + } + _ => panic() + } + + let lifted1269 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1268) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1265, max : lifted1267, unit : lifted1269}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1270) + } + 9 => { + + let lifted1277 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1272 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1271 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1271) + } + _ => panic() + } + + let lifted1274 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1273 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1273) + } + _ => panic() + } + + let lifted1276 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1275 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1275) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1272, max : lifted1274, unit : lifted1276}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1277) + } + 10 => { + + let lifted1284 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1279 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1278 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1278) + } + _ => panic() + } + + let lifted1281 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1280 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1280) + } + _ => panic() + } + + let lifted1283 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1282 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1282) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1279, max : lifted1281, unit : lifted1283}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1284) + } + 11 => { + + let lifted1291 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1286 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1285 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1285) + } + _ => panic() + } + + let lifted1288 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1287 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1287) + } + _ => panic() + } + + let lifted1290 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1289 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1289) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1286, max : lifted1288, unit : lifted1290}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1291) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array1306 : Array[@types.NamedFieldType] = []; + for index1307 = 0; index1307 < (mbt_ffi_load32((iter_base) + 12)); index1307 = index1307 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1307 * 68) + + let result1292 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1294 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result1293 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result1293) + } + _ => panic() + } + + let array1296 : Array[String] = []; + for index1297 = 0; index1297 < (mbt_ffi_load32((iter_base) + 28)); index1297 = index1297 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1297 * 8) + + let result1295 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1296.push(result1295) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array1299 : Array[String] = []; + for index1300 = 0; index1300 < (mbt_ffi_load32((iter_base) + 36)); index1300 = index1300 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1300 * 8) + + let result1298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1299.push(result1298) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted1302 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result1301 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result1301) + } + _ => panic() + } + + let lifted1305 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted1304 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { - let lifted889 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + @types.Role::UnstructuredBinary + } + 3 => { + + let result1303 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result1303) + } + _ => panic() + } + + Option::Some(lifted1304) + } + _ => panic() + } + + array1306.push(@types.NamedFieldType::{name : result1292, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1294, aliases : array1296, examples : array1299, deprecated : lifted1302, role : lifted1305}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array1306) + } + 15 => { + + let array1323 : Array[@types.VariantCaseType] = []; + for index1324 = 0; index1324 < (mbt_ffi_load32((iter_base) + 12)); index1324 = index1324 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1324 * 72) + + let result1308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1309 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -22378,53 +33578,53 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted891 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1311 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result890 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1310 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result890) + Option::Some(result1310) } _ => panic() } - let array893 : Array[String] = []; - for index894 = 0; index894 < (mbt_ffi_load32((iter_base) + 32)); index894 = index894 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index894 * 8) + let array1313 : Array[String] = []; + for index1314 = 0; index1314 < (mbt_ffi_load32((iter_base) + 32)); index1314 = index1314 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1314 * 8) - let result892 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1312 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array893.push(result892) + array1313.push(result1312) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array896 : Array[String] = []; - for index897 = 0; index897 < (mbt_ffi_load32((iter_base) + 40)); index897 = index897 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index897 * 8) + let array1316 : Array[String] = []; + for index1317 = 0; index1317 < (mbt_ffi_load32((iter_base) + 40)); index1317 = index1317 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1317 * 8) - let result895 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1315 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array896.push(result895) + array1316.push(result1315) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted899 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1319 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result898 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1318 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result898) + Option::Some(result1318) } _ => panic() } - let lifted902 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1322 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted901 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1321 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -22439,63 +33639,63 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result900 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1320 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result900) + @types.Role::Other(result1320) } _ => panic() } - Option::Some(lifted901) + Option::Some(lifted1321) } _ => panic() } - array903.push(@types.VariantCaseType::{name : result888, payload : lifted889, metadata : @types.MetadataEnvelope::{doc : lifted891, aliases : array893, examples : array896, deprecated : lifted899, role : lifted902}}) + array1323.push(@types.VariantCaseType::{name : result1308, payload : lifted1309, metadata : @types.MetadataEnvelope::{doc : lifted1311, aliases : array1313, examples : array1316, deprecated : lifted1319, role : lifted1322}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array903) + @types.SchemaTypeBody::VariantType(array1323) } 16 => { - let array906 : Array[String] = []; - for index907 = 0; index907 < (mbt_ffi_load32((iter_base) + 12)); index907 = index907 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index907 * 8) + let array1326 : Array[String] = []; + for index1327 = 0; index1327 < (mbt_ffi_load32((iter_base) + 12)); index1327 = index1327 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1327 * 8) - let result905 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array906.push(result905) + array1326.push(result1325) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array906) + @types.SchemaTypeBody::EnumType(array1326) } 17 => { - let array909 : Array[String] = []; - for index910 = 0; index910 < (mbt_ffi_load32((iter_base) + 12)); index910 = index910 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index910 * 8) + let array1329 : Array[String] = []; + for index1330 = 0; index1330 < (mbt_ffi_load32((iter_base) + 12)); index1330 = index1330 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1330 * 8) - let result908 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1328 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array909.push(result908) + array1329.push(result1328) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array909) + @types.SchemaTypeBody::FlagsType(array1329) } 18 => { - let array911 : Array[Int] = []; - for index912 = 0; index912 < (mbt_ffi_load32((iter_base) + 12)); index912 = index912 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index912 * 4) + let array1331 : Array[Int] = []; + for index1332 = 0; index1332 < (mbt_ffi_load32((iter_base) + 12)); index1332 = index1332 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1332 * 4) - array911.push(mbt_ffi_load32((iter_base) + 0)) + array1331.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array911) + @types.SchemaTypeBody::TupleType(array1331) } 19 => { @@ -22515,7 +33715,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 23 => { - let lifted913 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1333 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -22524,7 +33724,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted914 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1334 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -22533,30 +33733,30 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted913, err : lifted914}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1333, err : lifted1334}) } 24 => { - let lifted918 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1338 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array916 : Array[String] = []; - for index917 = 0; index917 < (mbt_ffi_load32((iter_base) + 16)); index917 = index917 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index917 * 8) + let array1336 : Array[String] = []; + for index1337 = 0; index1337 < (mbt_ffi_load32((iter_base) + 16)); index1337 = index1337 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1337 * 8) - let result915 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array916.push(result915) + array1336.push(result1335) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array916) + Option::Some(array1336) } _ => panic() } - let lifted919 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1339 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -22565,7 +33765,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted920 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1340 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -22574,41 +33774,41 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted922 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1342 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result921 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1341 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result921) + Option::Some(result1341) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted918, min_length : lifted919, max_length : lifted920, regex : lifted922}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1338, min_length : lifted1339, max_length : lifted1340, regex : lifted1342}) } 25 => { - let lifted926 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1346 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array924 : Array[String] = []; - for index925 = 0; index925 < (mbt_ffi_load32((iter_base) + 16)); index925 = index925 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index925 * 8) + let array1344 : Array[String] = []; + for index1345 = 0; index1345 < (mbt_ffi_load32((iter_base) + 16)); index1345 = index1345 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1345 * 8) - let result923 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array924.push(result923) + array1344.push(result1343) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array924) + Option::Some(array1344) } _ => panic() } - let lifted927 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1347 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -22617,7 +33817,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted928 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1348 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -22626,91 +33826,91 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted926, min_bytes : lifted927, max_bytes : lifted928}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1346, min_bytes : lifted1347, max_bytes : lifted1348}) } 26 => { - let lifted932 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1352 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array930 : Array[String] = []; - for index931 = 0; index931 < (mbt_ffi_load32((iter_base) + 20)); index931 = index931 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index931 * 8) + let array1350 : Array[String] = []; + for index1351 = 0; index1351 < (mbt_ffi_load32((iter_base) + 20)); index1351 = index1351 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1351 * 8) - let result929 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1349 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array930.push(result929) + array1350.push(result1349) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array930) + Option::Some(array1350) } _ => panic() } - let lifted936 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1356 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array934 : Array[String] = []; - for index935 = 0; index935 < (mbt_ffi_load32((iter_base) + 32)); index935 = index935 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index935 * 8) + let array1354 : Array[String] = []; + for index1355 = 0; index1355 < (mbt_ffi_load32((iter_base) + 32)); index1355 = index1355 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1355 * 8) - let result933 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1353 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array934.push(result933) + array1354.push(result1353) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array934) + Option::Some(array1354) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted932, allowed_extensions : lifted936}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1352, allowed_extensions : lifted1356}) } 27 => { - let lifted940 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1360 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array938 : Array[String] = []; - for index939 = 0; index939 < (mbt_ffi_load32((iter_base) + 16)); index939 = index939 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index939 * 8) + let array1358 : Array[String] = []; + for index1359 = 0; index1359 < (mbt_ffi_load32((iter_base) + 16)); index1359 = index1359 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1359 * 8) - let result937 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1357 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array938.push(result937) + array1358.push(result1357) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array938) + Option::Some(array1358) } _ => panic() } - let lifted944 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1364 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array942 : Array[String] = []; - for index943 = 0; index943 < (mbt_ffi_load32((iter_base) + 28)); index943 = index943 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index943 * 8) + let array1362 : Array[String] = []; + for index1363 = 0; index1363 < (mbt_ffi_load32((iter_base) + 28)); index1363 = index1363 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1363 * 8) - let result941 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1361 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array942.push(result941) + array1362.push(result1361) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array942) + Option::Some(array1362) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted940, allowed_hosts : lifted944}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1360, allowed_hosts : lifted1364}) } 28 => { @@ -22722,148 +33922,148 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 30 => { - let result945 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1365 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array947 : Array[String] = []; - for index948 = 0; index948 < (mbt_ffi_load32((iter_base) + 20)); index948 = index948 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index948 * 8) + let array1367 : Array[String] = []; + for index1368 = 0; index1368 < (mbt_ffi_load32((iter_base) + 20)); index1368 = index1368 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1368 * 8) - let result946 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1366 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array947.push(result946) + array1367.push(result1366) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted950 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1370 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result949 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1369 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result949}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1369}) } _ => panic() } - let lifted952 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1372 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result951 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1371 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result951}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1371}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result945, allowed_suffixes : array947, min : lifted950, max : lifted952}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1365, allowed_suffixes : array1367, min : lifted1370, max : lifted1372}) } 31 => { - let array976 : Array[@types.UnionBranch] = []; - for index977 = 0; index977 < (mbt_ffi_load32((iter_base) + 12)); index977 = index977 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index977 * 92) + let array1396 : Array[@types.UnionBranch] = []; + for index1397 = 0; index1397 < (mbt_ffi_load32((iter_base) + 12)); index1397 = index1397 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1397 * 92) - let result953 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted962 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1382 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result954 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1374 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result954) + @types.DiscriminatorRule::Prefix(result1374) } 1 => { - let result955 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result955) + @types.DiscriminatorRule::Suffix(result1375) } 2 => { - let result956 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result956) + @types.DiscriminatorRule::Contains(result1376) } 3 => { - let result957 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1377 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result957) + @types.DiscriminatorRule::Regex(result1377) } 4 => { - let result958 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1378 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted960 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1380 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result959 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1379 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result959) + Option::Some(result1379) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result958, literal : lifted960}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1378, literal : lifted1380}) } 5 => { - let result961 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1381 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result961) + @types.DiscriminatorRule::FieldAbsent(result1381) } _ => panic() } - let lifted964 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1384 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result963 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result963) + Option::Some(result1383) } _ => panic() } - let array966 : Array[String] = []; - for index967 = 0; index967 < (mbt_ffi_load32((iter_base) + 52)); index967 = index967 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index967 * 8) + let array1386 : Array[String] = []; + for index1387 = 0; index1387 < (mbt_ffi_load32((iter_base) + 52)); index1387 = index1387 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1387 * 8) - let result965 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1385 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array966.push(result965) + array1386.push(result1385) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array969 : Array[String] = []; - for index970 = 0; index970 < (mbt_ffi_load32((iter_base) + 60)); index970 = index970 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index970 * 8) + let array1389 : Array[String] = []; + for index1390 = 0; index1390 < (mbt_ffi_load32((iter_base) + 60)); index1390 = index1390 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1390 * 8) - let result968 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1388 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array969.push(result968) + array1389.push(result1388) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted972 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1392 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result971 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1391 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result971) + Option::Some(result1391) } _ => panic() } - let lifted975 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1395 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted974 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1394 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -22878,57 +34078,57 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result973 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result973) + @types.Role::Other(result1393) } _ => panic() } - Option::Some(lifted974) + Option::Some(lifted1394) } _ => panic() } - array976.push(@types.UnionBranch::{tag : result953, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted962, metadata : @types.MetadataEnvelope::{doc : lifted964, aliases : array966, examples : array969, deprecated : lifted972, role : lifted975}}) + array1396.push(@types.UnionBranch::{tag : result1373, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1382, metadata : @types.MetadataEnvelope::{doc : lifted1384, aliases : array1386, examples : array1389, deprecated : lifted1392, role : lifted1395}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array976}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1396}) } 32 => { - let lifted979 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1399 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result978 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1398 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result978) + Option::Some(result1398) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted979}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1399}) } 33 => { - let lifted981 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1401 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result980 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1400 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result980) + Option::Some(result1400) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted981}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1401}) } 34 => { - let lifted982 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1402 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -22937,11 +34137,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted982) + @types.SchemaTypeBody::FutureType(lifted1402) } 35 => { - let lifted983 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1403 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -22950,58 +34150,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::StreamType(lifted983) + @types.SchemaTypeBody::StreamType(lifted1403) } _ => panic() } - let lifted986 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1406 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result985 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1405 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result985) + Option::Some(result1405) } _ => panic() } - let array988 : Array[String] = []; - for index989 = 0; index989 < (mbt_ffi_load32((iter_base) + 104)); index989 = index989 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index989 * 8) + let array1408 : Array[String] = []; + for index1409 = 0; index1409 < (mbt_ffi_load32((iter_base) + 104)); index1409 = index1409 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1409 * 8) - let result987 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1407 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array988.push(result987) + array1408.push(result1407) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array991 : Array[String] = []; - for index992 = 0; index992 < (mbt_ffi_load32((iter_base) + 112)); index992 = index992 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index992 * 8) + let array1411 : Array[String] = []; + for index1412 = 0; index1412 < (mbt_ffi_load32((iter_base) + 112)); index1412 = index1412 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1412 * 8) - let result990 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1410 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array991.push(result990) + array1411.push(result1410) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted994 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1414 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result993 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1413 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result993) + Option::Some(result1413) } _ => panic() } - let lifted997 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1417 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted996 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1416 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -23016,48 +34216,48 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result995 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result995) + @types.Role::Other(result1415) } _ => panic() } - Option::Some(lifted996) + Option::Some(lifted1416) } _ => panic() } - array998.push(@types.SchemaTypeNode::{body : lifted984, metadata : @types.MetadataEnvelope::{doc : lifted986, aliases : array988, examples : array991, deprecated : lifted994, role : lifted997}}) + array1418.push(@types.SchemaTypeNode::{body : lifted1404, metadata : @types.MetadataEnvelope::{doc : lifted1406, aliases : array1408, examples : array1411, deprecated : lifted1414, role : lifted1417}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1003 : Array[@types.SchemaTypeDef] = []; - for index1004 = 0; index1004 < (mbt_ffi_load32((iter_base) + 60)); index1004 = index1004 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1004 * 24) + let array1423 : Array[@types.SchemaTypeDef] = []; + for index1424 = 0; index1424 < (mbt_ffi_load32((iter_base) + 60)); index1424 = index1424 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1424 * 24) - let result1000 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1002 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1422 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1001 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1001) + Option::Some(result1421) } _ => panic() } - array1003.push(@types.SchemaTypeDef::{id : result1000, name : lifted1002, body : mbt_ffi_load32((iter_base) + 20)}) + array1423.push(@types.SchemaTypeDef::{id : result1420, name : lifted1422, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let array1035 : Array[@types.SchemaValueNode] = []; - for index1036 = 0; index1036 < (mbt_ffi_load32((iter_base) + 72)); index1036 = index1036 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index1036 * 32) + let array1455 : Array[@types.SchemaValueNode] = []; + for index1456 = 0; index1456 < (mbt_ffi_load32((iter_base) + 72)); index1456 = index1456 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index1456 * 32) - let lifted1034 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1454 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -23108,25 +34308,25 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 12 => { - let result1005 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1425 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1005) + @types.SchemaValueNode::StringValue(result1425) } 13 => { - let array1006 : Array[Int] = []; - for index1007 = 0; index1007 < (mbt_ffi_load32((iter_base) + 12)); index1007 = index1007 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1007 * 4) + let array1426 : Array[Int] = []; + for index1427 = 0; index1427 < (mbt_ffi_load32((iter_base) + 12)); index1427 = index1427 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1427 * 4) - array1006.push(mbt_ffi_load32((iter_base) + 0)) + array1426.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1006) + @types.SchemaValueNode::RecordValue(array1426) } 14 => { - let lifted1008 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1428 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -23135,7 +34335,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1008}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1428}) } 15 => { @@ -23143,67 +34343,67 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 16 => { - let array1009 : Array[Bool] = []; - for index1010 = 0; index1010 < (mbt_ffi_load32((iter_base) + 12)); index1010 = index1010 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1010 * 1) + let array1429 : Array[Bool] = []; + for index1430 = 0; index1430 < (mbt_ffi_load32((iter_base) + 12)); index1430 = index1430 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1430 * 1) - array1009.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1429.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1009) + @types.SchemaValueNode::FlagsValue(array1429) } 17 => { - let array1011 : Array[Int] = []; - for index1012 = 0; index1012 < (mbt_ffi_load32((iter_base) + 12)); index1012 = index1012 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1012 * 4) + let array1431 : Array[Int] = []; + for index1432 = 0; index1432 < (mbt_ffi_load32((iter_base) + 12)); index1432 = index1432 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1432 * 4) - array1011.push(mbt_ffi_load32((iter_base) + 0)) + array1431.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1011) + @types.SchemaValueNode::TupleValue(array1431) } 18 => { - let array1013 : Array[Int] = []; - for index1014 = 0; index1014 < (mbt_ffi_load32((iter_base) + 12)); index1014 = index1014 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1014 * 4) + let array1433 : Array[Int] = []; + for index1434 = 0; index1434 < (mbt_ffi_load32((iter_base) + 12)); index1434 = index1434 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1434 * 4) - array1013.push(mbt_ffi_load32((iter_base) + 0)) + array1433.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1013) + @types.SchemaValueNode::ListValue(array1433) } 19 => { - let array1015 : Array[Int] = []; - for index1016 = 0; index1016 < (mbt_ffi_load32((iter_base) + 12)); index1016 = index1016 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1016 * 4) + let array1435 : Array[Int] = []; + for index1436 = 0; index1436 < (mbt_ffi_load32((iter_base) + 12)); index1436 = index1436 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1436 * 4) - array1015.push(mbt_ffi_load32((iter_base) + 0)) + array1435.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1015) + @types.SchemaValueNode::FixedListValue(array1435) } 20 => { - let array1017 : Array[@types.MapEntry] = []; - for index1018 = 0; index1018 < (mbt_ffi_load32((iter_base) + 12)); index1018 = index1018 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1018 * 8) + let array1437 : Array[@types.MapEntry] = []; + for index1438 = 0; index1438 < (mbt_ffi_load32((iter_base) + 12)); index1438 = index1438 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1438 * 8) - array1017.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1437.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1017) + @types.SchemaValueNode::MapValue(array1437) } 21 => { - let lifted1019 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1439 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -23212,14 +34412,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1019) + @types.SchemaValueNode::OptionValue(lifted1439) } 22 => { - let lifted1022 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1442 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1020 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1440 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -23228,11 +34428,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted1020) + @types.ResultValuePayload::OkValue(lifted1440) } 1 => { - let lifted1021 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1441 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -23241,58 +34441,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1021) + @types.ResultValuePayload::ErrValue(lifted1441) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1022) + @types.SchemaValueNode::ResultValue(lifted1442) } 23 => { - let result1023 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1443 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1025 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1445 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1024 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1444 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1024) + Option::Some(result1444) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1023, language : lifted1025}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1443, language : lifted1445}) } 24 => { - let result1026 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1446 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1028 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1448 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1027 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1447 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1027) + Option::Some(result1447) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1026, mime_type : lifted1028}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1446, mime_type : lifted1448}) } 25 => { - let result1029 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1449 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1029) + @types.SchemaValueNode::PathValue(result1449) } 26 => { - let result1030 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1450 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1030) + @types.SchemaValueNode::UrlValue(result1450) } 27 => { @@ -23304,21 +34504,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 29 => { - let result1031 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1451 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1031}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1451}) } 30 => { - let result1032 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1032, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1452, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1033 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1453 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1033}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1453}) } 32 => { @@ -23327,47 +34527,47 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1035.push(lifted1034) + array1455.push(lifted1454) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - let result1037 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) + let result1457 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) - let array1039 : Array[String] = []; - for index1040 = 0; index1040 < (mbt_ffi_load32((iter_base) + 92)); index1040 = index1040 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index1040 * 8) + let array1459 : Array[String] = []; + for index1460 = 0; index1460 < (mbt_ffi_load32((iter_base) + 92)); index1460 = index1460 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index1460 * 8) - let result1038 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1458 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1039.push(result1038) + array1459.push(result1458) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - let array1054 : Array[Array[SpanData]] = []; - for index1055 = 0; index1055 < (mbt_ffi_load32((iter_base) + 100)); index1055 = index1055 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index1055 * 8) + let array1474 : Array[Array[SpanData]] = []; + for index1475 = 0; index1475 < (mbt_ffi_load32((iter_base) + 100)); index1475 = index1475 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index1475 * 8) - let array1052 : Array[SpanData] = []; - for index1053 = 0; index1053 < (mbt_ffi_load32((iter_base) + 4)); index1053 = index1053 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1053 * 80) + let array1472 : Array[SpanData] = []; + for index1473 = 0; index1473 < (mbt_ffi_load32((iter_base) + 4)); index1473 = index1473 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1473 * 80) - let lifted1051 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1471 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1041 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1461 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1043 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted1463 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result1042 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result1462 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result1042) + Option::Some(result1462) } _ => panic() } - let lifted1044 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted1464 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -23376,46 +34576,46 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let array1048 : Array[@context.Attribute] = []; - for index1049 = 0; index1049 < (mbt_ffi_load32((iter_base) + 68)); index1049 = index1049 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1049 * 20) + let array1468 : Array[@context.Attribute] = []; + for index1469 = 0; index1469 < (mbt_ffi_load32((iter_base) + 68)); index1469 = index1469 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1469 * 20) - let result1045 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1465 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1047 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1467 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result1046 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result1046) + @context.AttributeValue::String(result1466) } _ => panic() } - array1048.push(@context.Attribute::{key : result1045, value : lifted1047}) + array1468.push(@context.Attribute::{key : result1465, value : lifted1467}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result1041, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1043, linked_context : lifted1044, attributes : array1048, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result1461, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1463, linked_context : lifted1464, attributes : array1468, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result1050 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1470 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result1050}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result1470}) } _ => panic() } - array1052.push(lifted1051) + array1472.push(lifted1471) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array1054.push(array1052) + array1474.push(array1472) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 96)) - AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result870, method_name : result871, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array998, defs : array1003, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array1035, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result1037, trace_states : array1039, invocation_context : array1054}) + AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result1220, method_name : result1221, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1418, defs : array1423, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array1455, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result1457, trace_states : array1459, invocation_context : array1474}) } 2 => { @@ -23423,17 +34623,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1056 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result1476 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result1057 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1477 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result1056, mime_type : result1057}}) + AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result1476, mime_type : result1477}}) } 4 => { - let result1058 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result1478 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result1058}) + AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result1478}) } 5 => { @@ -23442,18 +34642,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - PublicOplogEntry::AgentInvocationStarted(AgentInvocationStartedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, invocation : lifted1059}) + PublicOplogEntry::AgentInvocationStarted(AgentInvocationStartedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, invocation : lifted1479}) } 5 => { - let lifted1396 = match (mbt_ffi_load8_u((iter_base) + 24)) { + let lifted1956 = match (mbt_ffi_load8_u((iter_base) + 24)) { 0 => { - let array1186 : Array[@types.SchemaTypeNode] = []; - for index1187 = 0; index1187 < (mbt_ffi_load32((iter_base) + 32)); index1187 = index1187 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1187 * 144) + let array1676 : Array[@types.SchemaTypeNode] = []; + for index1677 = 0; index1677 < (mbt_ffi_load32((iter_base) + 32)); index1677 = index1677 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1677 * 144) - let lifted1172 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1662 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -23464,148 +34664,848 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted1486 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted1481 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted1480 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted1480) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted1483 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted1482 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array1074 : Array[@types.NamedFieldType] = []; - for index1075 = 0; index1075 < (mbt_ffi_load32((iter_base) + 12)); index1075 = index1075 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1075 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result1060 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted1482) + } + _ => panic() + } - let lifted1062 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted1485 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result1061 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1484 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1061) + Option::Some(result1484) + } + _ => panic() } - _ => panic() - } - let array1064 : Array[String] = []; - for index1065 = 0; index1065 < (mbt_ffi_load32((iter_base) + 28)); index1065 = index1065 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1065 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted1481, max : lifted1483, unit : lifted1485}) + } + _ => panic() + } - let result1063 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted1486) + } + 3 => { - array1064.push(result1063) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted1493 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array1067 : Array[String] = []; - for index1068 = 0; index1068 < (mbt_ffi_load32((iter_base) + 36)); index1068 = index1068 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1068 * 8) + let lifted1488 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result1066 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted1487 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array1067.push(result1066) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted1070 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result1069 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result1069) + Option::Some(lifted1487) + } + _ => panic() } - _ => panic() - } - let lifted1073 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted1490 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted1072 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted1489 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - - let result1071 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1071) - } - _ => panic() + Option::Some(lifted1489) } - - Option::Some(lifted1072) + _ => panic() } - _ => panic() - } - array1074.push(@types.NamedFieldType::{name : result1060, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1062, aliases : array1064, examples : array1067, deprecated : lifted1070, role : lifted1073}}) + let lifted1492 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1491 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1491) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1488, max : lifted1490, unit : lifted1492}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1493) + } + 4 => { + + let lifted1500 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1495 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1494 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1494) + } + _ => panic() + } + + let lifted1497 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1496 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1496) + } + _ => panic() + } + + let lifted1499 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1498 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1498) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1495, max : lifted1497, unit : lifted1499}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1500) + } + 5 => { + + let lifted1507 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1502 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1501 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1501) + } + _ => panic() + } + + let lifted1504 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1503 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1503) + } + _ => panic() + } + + let lifted1506 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1505) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1502, max : lifted1504, unit : lifted1506}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1507) + } + 6 => { + + let lifted1514 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1509 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1508 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1508) + } + _ => panic() + } + + let lifted1511 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1510 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1510) + } + _ => panic() + } + + let lifted1513 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1512 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1512) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1509, max : lifted1511, unit : lifted1513}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1514) + } + 7 => { + + let lifted1521 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1516 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1515 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1515) + } + _ => panic() + } + + let lifted1518 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1517 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1517) + } + _ => panic() + } + + let lifted1520 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1519 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1519) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1516, max : lifted1518, unit : lifted1520}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1521) + } + 8 => { + + let lifted1528 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1523 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1522 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1522) + } + _ => panic() + } + + let lifted1525 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1524 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1524) + } + _ => panic() + } + + let lifted1527 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1526 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1526) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1523, max : lifted1525, unit : lifted1527}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1528) + } + 9 => { + + let lifted1535 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1530 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1529 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1529) + } + _ => panic() + } + + let lifted1532 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1531 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1531) + } + _ => panic() + } + + let lifted1534 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1533) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1530, max : lifted1532, unit : lifted1534}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1535) + } + 10 => { + + let lifted1542 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1537 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1536 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1536) + } + _ => panic() + } + + let lifted1539 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1538 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1538) + } + _ => panic() + } + + let lifted1541 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1540 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1540) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1537, max : lifted1539, unit : lifted1541}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1542) + } + 11 => { + + let lifted1549 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1544 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1543 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1543) + } + _ => panic() + } + + let lifted1546 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1545 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1545) + } + _ => panic() + } + + let lifted1548 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1547 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1547) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1544, max : lifted1546, unit : lifted1548}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1549) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array1564 : Array[@types.NamedFieldType] = []; + for index1565 = 0; index1565 < (mbt_ffi_load32((iter_base) + 12)); index1565 = index1565 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1565 * 68) + + let result1550 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1552 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result1551 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result1551) + } + _ => panic() + } + + let array1554 : Array[String] = []; + for index1555 = 0; index1555 < (mbt_ffi_load32((iter_base) + 28)); index1555 = index1555 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1555 * 8) + + let result1553 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1554.push(result1553) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array1557 : Array[String] = []; + for index1558 = 0; index1558 < (mbt_ffi_load32((iter_base) + 36)); index1558 = index1558 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1558 * 8) + + let result1556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1557.push(result1556) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted1560 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result1559 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result1559) + } + _ => panic() + } + + let lifted1563 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted1562 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result1561 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result1561) + } + _ => panic() + } + + Option::Some(lifted1562) + } + _ => panic() + } + + array1564.push(@types.NamedFieldType::{name : result1550, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1552, aliases : array1554, examples : array1557, deprecated : lifted1560, role : lifted1563}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array1074) + @types.SchemaTypeBody::RecordType(array1564) } 15 => { - let array1091 : Array[@types.VariantCaseType] = []; - for index1092 = 0; index1092 < (mbt_ffi_load32((iter_base) + 12)); index1092 = index1092 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1092 * 72) + let array1581 : Array[@types.VariantCaseType] = []; + for index1582 = 0; index1582 < (mbt_ffi_load32((iter_base) + 12)); index1582 = index1582 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1582 * 72) - let result1076 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1077 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1567 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -23614,53 +35514,53 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1079 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1569 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1078 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1568 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1078) + Option::Some(result1568) } _ => panic() } - let array1081 : Array[String] = []; - for index1082 = 0; index1082 < (mbt_ffi_load32((iter_base) + 32)); index1082 = index1082 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1082 * 8) + let array1571 : Array[String] = []; + for index1572 = 0; index1572 < (mbt_ffi_load32((iter_base) + 32)); index1572 = index1572 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1572 * 8) - let result1080 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1570 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1081.push(result1080) + array1571.push(result1570) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1084 : Array[String] = []; - for index1085 = 0; index1085 < (mbt_ffi_load32((iter_base) + 40)); index1085 = index1085 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1085 * 8) + let array1574 : Array[String] = []; + for index1575 = 0; index1575 < (mbt_ffi_load32((iter_base) + 40)); index1575 = index1575 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1575 * 8) - let result1083 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1573 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1084.push(result1083) + array1574.push(result1573) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1087 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1577 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1086 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1576 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1086) + Option::Some(result1576) } _ => panic() } - let lifted1090 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1580 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1089 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1579 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -23675,63 +35575,63 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1088 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1578 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1088) + @types.Role::Other(result1578) } _ => panic() } - Option::Some(lifted1089) + Option::Some(lifted1579) } _ => panic() } - array1091.push(@types.VariantCaseType::{name : result1076, payload : lifted1077, metadata : @types.MetadataEnvelope::{doc : lifted1079, aliases : array1081, examples : array1084, deprecated : lifted1087, role : lifted1090}}) + array1581.push(@types.VariantCaseType::{name : result1566, payload : lifted1567, metadata : @types.MetadataEnvelope::{doc : lifted1569, aliases : array1571, examples : array1574, deprecated : lifted1577, role : lifted1580}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1091) + @types.SchemaTypeBody::VariantType(array1581) } 16 => { - let array1094 : Array[String] = []; - for index1095 = 0; index1095 < (mbt_ffi_load32((iter_base) + 12)); index1095 = index1095 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1095 * 8) + let array1584 : Array[String] = []; + for index1585 = 0; index1585 < (mbt_ffi_load32((iter_base) + 12)); index1585 = index1585 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1585 * 8) - let result1093 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1094.push(result1093) + array1584.push(result1583) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1094) + @types.SchemaTypeBody::EnumType(array1584) } 17 => { - let array1097 : Array[String] = []; - for index1098 = 0; index1098 < (mbt_ffi_load32((iter_base) + 12)); index1098 = index1098 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1098 * 8) + let array1587 : Array[String] = []; + for index1588 = 0; index1588 < (mbt_ffi_load32((iter_base) + 12)); index1588 = index1588 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1588 * 8) - let result1096 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1586 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1097.push(result1096) + array1587.push(result1586) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1097) + @types.SchemaTypeBody::FlagsType(array1587) } 18 => { - let array1099 : Array[Int] = []; - for index1100 = 0; index1100 < (mbt_ffi_load32((iter_base) + 12)); index1100 = index1100 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1100 * 4) + let array1589 : Array[Int] = []; + for index1590 = 0; index1590 < (mbt_ffi_load32((iter_base) + 12)); index1590 = index1590 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1590 * 4) - array1099.push(mbt_ffi_load32((iter_base) + 0)) + array1589.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1099) + @types.SchemaTypeBody::TupleType(array1589) } 19 => { @@ -23751,7 +35651,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 23 => { - let lifted1101 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1591 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -23760,7 +35660,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1102 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1592 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -23769,30 +35669,30 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1101, err : lifted1102}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1591, err : lifted1592}) } 24 => { - let lifted1106 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1596 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1104 : Array[String] = []; - for index1105 = 0; index1105 < (mbt_ffi_load32((iter_base) + 16)); index1105 = index1105 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1105 * 8) + let array1594 : Array[String] = []; + for index1595 = 0; index1595 < (mbt_ffi_load32((iter_base) + 16)); index1595 = index1595 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1595 * 8) - let result1103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1593 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1104.push(result1103) + array1594.push(result1593) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1104) + Option::Some(array1594) } _ => panic() } - let lifted1107 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1597 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -23801,7 +35701,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1108 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1598 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -23810,41 +35710,41 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1110 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1600 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1599 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1109) + Option::Some(result1599) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1106, min_length : lifted1107, max_length : lifted1108, regex : lifted1110}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1596, min_length : lifted1597, max_length : lifted1598, regex : lifted1600}) } 25 => { - let lifted1114 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1604 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1112 : Array[String] = []; - for index1113 = 0; index1113 < (mbt_ffi_load32((iter_base) + 16)); index1113 = index1113 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1113 * 8) + let array1602 : Array[String] = []; + for index1603 = 0; index1603 < (mbt_ffi_load32((iter_base) + 16)); index1603 = index1603 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1603 * 8) - let result1111 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1601 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1112.push(result1111) + array1602.push(result1601) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1112) + Option::Some(array1602) } _ => panic() } - let lifted1115 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1605 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -23853,7 +35753,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1116 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1606 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -23862,91 +35762,91 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1114, min_bytes : lifted1115, max_bytes : lifted1116}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1604, min_bytes : lifted1605, max_bytes : lifted1606}) } 26 => { - let lifted1120 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1610 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1118 : Array[String] = []; - for index1119 = 0; index1119 < (mbt_ffi_load32((iter_base) + 20)); index1119 = index1119 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1119 * 8) + let array1608 : Array[String] = []; + for index1609 = 0; index1609 < (mbt_ffi_load32((iter_base) + 20)); index1609 = index1609 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1609 * 8) - let result1117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1607 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1118.push(result1117) + array1608.push(result1607) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1118) + Option::Some(array1608) } _ => panic() } - let lifted1124 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1614 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1122 : Array[String] = []; - for index1123 = 0; index1123 < (mbt_ffi_load32((iter_base) + 32)); index1123 = index1123 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1123 * 8) + let array1612 : Array[String] = []; + for index1613 = 0; index1613 < (mbt_ffi_load32((iter_base) + 32)); index1613 = index1613 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1613 * 8) - let result1121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1611 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1122.push(result1121) + array1612.push(result1611) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1122) + Option::Some(array1612) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1120, allowed_extensions : lifted1124}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1610, allowed_extensions : lifted1614}) } 27 => { - let lifted1128 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1618 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1126 : Array[String] = []; - for index1127 = 0; index1127 < (mbt_ffi_load32((iter_base) + 16)); index1127 = index1127 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1127 * 8) + let array1616 : Array[String] = []; + for index1617 = 0; index1617 < (mbt_ffi_load32((iter_base) + 16)); index1617 = index1617 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1617 * 8) - let result1125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1615 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1126.push(result1125) + array1616.push(result1615) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1126) + Option::Some(array1616) } _ => panic() } - let lifted1132 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1622 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1130 : Array[String] = []; - for index1131 = 0; index1131 < (mbt_ffi_load32((iter_base) + 28)); index1131 = index1131 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1131 * 8) + let array1620 : Array[String] = []; + for index1621 = 0; index1621 < (mbt_ffi_load32((iter_base) + 28)); index1621 = index1621 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1621 * 8) - let result1129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1619 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1130.push(result1129) + array1620.push(result1619) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1130) + Option::Some(array1620) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1128, allowed_hosts : lifted1132}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1618, allowed_hosts : lifted1622}) } 28 => { @@ -23958,148 +35858,148 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 30 => { - let result1133 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1623 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1135 : Array[String] = []; - for index1136 = 0; index1136 < (mbt_ffi_load32((iter_base) + 20)); index1136 = index1136 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1136 * 8) + let array1625 : Array[String] = []; + for index1626 = 0; index1626 < (mbt_ffi_load32((iter_base) + 20)); index1626 = index1626 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1626 * 8) - let result1134 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1624 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1135.push(result1134) + array1625.push(result1624) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1138 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1628 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1627 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1137}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1627}) } _ => panic() } - let lifted1140 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1630 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1629 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1139}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1629}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1133, allowed_suffixes : array1135, min : lifted1138, max : lifted1140}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1623, allowed_suffixes : array1625, min : lifted1628, max : lifted1630}) } 31 => { - let array1164 : Array[@types.UnionBranch] = []; - for index1165 = 0; index1165 < (mbt_ffi_load32((iter_base) + 12)); index1165 = index1165 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1165 * 92) + let array1654 : Array[@types.UnionBranch] = []; + for index1655 = 0; index1655 < (mbt_ffi_load32((iter_base) + 12)); index1655 = index1655 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1655 * 92) - let result1141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1631 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1150 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1640 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1632 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1142) + @types.DiscriminatorRule::Prefix(result1632) } 1 => { - let result1143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1633 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1143) + @types.DiscriminatorRule::Suffix(result1633) } 2 => { - let result1144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1144) + @types.DiscriminatorRule::Contains(result1634) } 3 => { - let result1145 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1635 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1145) + @types.DiscriminatorRule::Regex(result1635) } 4 => { - let result1146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1636 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1148 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1638 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1637 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1147) + Option::Some(result1637) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1146, literal : lifted1148}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1636, literal : lifted1638}) } 5 => { - let result1149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1639 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1149) + @types.DiscriminatorRule::FieldAbsent(result1639) } _ => panic() } - let lifted1152 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1642 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1641 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1151) + Option::Some(result1641) } _ => panic() } - let array1154 : Array[String] = []; - for index1155 = 0; index1155 < (mbt_ffi_load32((iter_base) + 52)); index1155 = index1155 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1155 * 8) + let array1644 : Array[String] = []; + for index1645 = 0; index1645 < (mbt_ffi_load32((iter_base) + 52)); index1645 = index1645 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1645 * 8) - let result1153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1643 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1154.push(result1153) + array1644.push(result1643) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1157 : Array[String] = []; - for index1158 = 0; index1158 < (mbt_ffi_load32((iter_base) + 60)); index1158 = index1158 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1158 * 8) + let array1647 : Array[String] = []; + for index1648 = 0; index1648 < (mbt_ffi_load32((iter_base) + 60)); index1648 = index1648 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1648 * 8) - let result1156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1646 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1157.push(result1156) + array1647.push(result1646) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1160 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1650 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1159 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1649 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1159) + Option::Some(result1649) } _ => panic() } - let lifted1163 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1653 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1162 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1652 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -24114,57 +36014,57 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1161 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1651 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1161) + @types.Role::Other(result1651) } _ => panic() } - Option::Some(lifted1162) + Option::Some(lifted1652) } _ => panic() } - array1164.push(@types.UnionBranch::{tag : result1141, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1150, metadata : @types.MetadataEnvelope::{doc : lifted1152, aliases : array1154, examples : array1157, deprecated : lifted1160, role : lifted1163}}) + array1654.push(@types.UnionBranch::{tag : result1631, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1640, metadata : @types.MetadataEnvelope::{doc : lifted1642, aliases : array1644, examples : array1647, deprecated : lifted1650, role : lifted1653}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1164}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1654}) } 32 => { - let lifted1167 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1657 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1656 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1166) + Option::Some(result1656) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1167}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1657}) } 33 => { - let lifted1169 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1659 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1658 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1168) + Option::Some(result1658) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1169}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1659}) } 34 => { - let lifted1170 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1660 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -24173,11 +36073,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1170) + @types.SchemaTypeBody::FutureType(lifted1660) } 35 => { - let lifted1171 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1661 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -24186,58 +36086,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1171) + @types.SchemaTypeBody::StreamType(lifted1661) } _ => panic() } - let lifted1174 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1664 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1663 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1173) + Option::Some(result1663) } _ => panic() } - let array1176 : Array[String] = []; - for index1177 = 0; index1177 < (mbt_ffi_load32((iter_base) + 104)); index1177 = index1177 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1177 * 8) + let array1666 : Array[String] = []; + for index1667 = 0; index1667 < (mbt_ffi_load32((iter_base) + 104)); index1667 = index1667 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1667 * 8) - let result1175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1665 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1176.push(result1175) + array1666.push(result1665) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1179 : Array[String] = []; - for index1180 = 0; index1180 < (mbt_ffi_load32((iter_base) + 112)); index1180 = index1180 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1180 * 8) + let array1669 : Array[String] = []; + for index1670 = 0; index1670 < (mbt_ffi_load32((iter_base) + 112)); index1670 = index1670 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1670 * 8) - let result1178 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1668 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1179.push(result1178) + array1669.push(result1668) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1182 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1672 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1181 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1181) + Option::Some(result1671) } _ => panic() } - let lifted1185 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1675 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1184 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1674 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -24252,48 +36152,48 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1673 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1183) + @types.Role::Other(result1673) } _ => panic() } - Option::Some(lifted1184) + Option::Some(lifted1674) } _ => panic() } - array1186.push(@types.SchemaTypeNode::{body : lifted1172, metadata : @types.MetadataEnvelope::{doc : lifted1174, aliases : array1176, examples : array1179, deprecated : lifted1182, role : lifted1185}}) + array1676.push(@types.SchemaTypeNode::{body : lifted1662, metadata : @types.MetadataEnvelope::{doc : lifted1664, aliases : array1666, examples : array1669, deprecated : lifted1672, role : lifted1675}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1191 : Array[@types.SchemaTypeDef] = []; - for index1192 = 0; index1192 < (mbt_ffi_load32((iter_base) + 40)); index1192 = index1192 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1192 * 24) + let array1681 : Array[@types.SchemaTypeDef] = []; + for index1682 = 0; index1682 < (mbt_ffi_load32((iter_base) + 40)); index1682 = index1682 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1682 * 24) - let result1188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1678 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1190 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1680 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1679 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1189) + Option::Some(result1679) } _ => panic() } - array1191.push(@types.SchemaTypeDef::{id : result1188, name : lifted1190, body : mbt_ffi_load32((iter_base) + 20)}) + array1681.push(@types.SchemaTypeDef::{id : result1678, name : lifted1680, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array1223 : Array[@types.SchemaValueNode] = []; - for index1224 = 0; index1224 < (mbt_ffi_load32((iter_base) + 52)); index1224 = index1224 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1224 * 32) + let array1713 : Array[@types.SchemaValueNode] = []; + for index1714 = 0; index1714 < (mbt_ffi_load32((iter_base) + 52)); index1714 = index1714 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1714 * 32) - let lifted1222 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1712 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -24344,25 +36244,25 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 12 => { - let result1193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1683 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1193) + @types.SchemaValueNode::StringValue(result1683) } 13 => { - let array1194 : Array[Int] = []; - for index1195 = 0; index1195 < (mbt_ffi_load32((iter_base) + 12)); index1195 = index1195 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1195 * 4) + let array1684 : Array[Int] = []; + for index1685 = 0; index1685 < (mbt_ffi_load32((iter_base) + 12)); index1685 = index1685 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1685 * 4) - array1194.push(mbt_ffi_load32((iter_base) + 0)) + array1684.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1194) + @types.SchemaValueNode::RecordValue(array1684) } 14 => { - let lifted1196 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1686 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -24371,7 +36271,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1196}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1686}) } 15 => { @@ -24379,67 +36279,67 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 16 => { - let array1197 : Array[Bool] = []; - for index1198 = 0; index1198 < (mbt_ffi_load32((iter_base) + 12)); index1198 = index1198 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1198 * 1) + let array1687 : Array[Bool] = []; + for index1688 = 0; index1688 < (mbt_ffi_load32((iter_base) + 12)); index1688 = index1688 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1688 * 1) - array1197.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1687.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1197) + @types.SchemaValueNode::FlagsValue(array1687) } 17 => { - let array1199 : Array[Int] = []; - for index1200 = 0; index1200 < (mbt_ffi_load32((iter_base) + 12)); index1200 = index1200 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1200 * 4) + let array1689 : Array[Int] = []; + for index1690 = 0; index1690 < (mbt_ffi_load32((iter_base) + 12)); index1690 = index1690 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1690 * 4) - array1199.push(mbt_ffi_load32((iter_base) + 0)) + array1689.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1199) + @types.SchemaValueNode::TupleValue(array1689) } 18 => { - let array1201 : Array[Int] = []; - for index1202 = 0; index1202 < (mbt_ffi_load32((iter_base) + 12)); index1202 = index1202 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1202 * 4) + let array1691 : Array[Int] = []; + for index1692 = 0; index1692 < (mbt_ffi_load32((iter_base) + 12)); index1692 = index1692 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1692 * 4) - array1201.push(mbt_ffi_load32((iter_base) + 0)) + array1691.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1201) + @types.SchemaValueNode::ListValue(array1691) } 19 => { - let array1203 : Array[Int] = []; - for index1204 = 0; index1204 < (mbt_ffi_load32((iter_base) + 12)); index1204 = index1204 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1204 * 4) + let array1693 : Array[Int] = []; + for index1694 = 0; index1694 < (mbt_ffi_load32((iter_base) + 12)); index1694 = index1694 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1694 * 4) - array1203.push(mbt_ffi_load32((iter_base) + 0)) + array1693.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1203) + @types.SchemaValueNode::FixedListValue(array1693) } 20 => { - let array1205 : Array[@types.MapEntry] = []; - for index1206 = 0; index1206 < (mbt_ffi_load32((iter_base) + 12)); index1206 = index1206 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1206 * 8) + let array1695 : Array[@types.MapEntry] = []; + for index1696 = 0; index1696 < (mbt_ffi_load32((iter_base) + 12)); index1696 = index1696 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1696 * 8) - array1205.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1695.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1205) + @types.SchemaValueNode::MapValue(array1695) } 21 => { - let lifted1207 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1697 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -24448,14 +36348,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1207) + @types.SchemaValueNode::OptionValue(lifted1697) } 22 => { - let lifted1210 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1700 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1208 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1698 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -24464,11 +36364,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted1208) + @types.ResultValuePayload::OkValue(lifted1698) } 1 => { - let lifted1209 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1699 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -24477,58 +36377,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1209) + @types.ResultValuePayload::ErrValue(lifted1699) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1210) + @types.SchemaValueNode::ResultValue(lifted1700) } 23 => { - let result1211 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1701 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1213 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1703 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1212 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1702 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1212) + Option::Some(result1702) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1211, language : lifted1213}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1701, language : lifted1703}) } 24 => { - let result1214 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1704 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1216 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1706 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1215 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1705 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1215) + Option::Some(result1705) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1214, mime_type : lifted1216}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1704, mime_type : lifted1706}) } 25 => { - let result1217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1707 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1217) + @types.SchemaValueNode::PathValue(result1707) } 26 => { - let result1218 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1708 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1218) + @types.SchemaValueNode::UrlValue(result1708) } 27 => { @@ -24540,21 +36440,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 29 => { - let result1219 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1709 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1219}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1709}) } 30 => { - let result1220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1710 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1220, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1710, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1221 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1711 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1221}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1711}) } 32 => { @@ -24563,19 +36463,19 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1223.push(lifted1222) + array1713.push(lifted1712) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - AgentInvocationResult::AgentInitialization(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1186, defs : array1191, root : mbt_ffi_load32((iter_base) + 44)}, value : @types.SchemaValueTree::{value_nodes : array1223, root : mbt_ffi_load32((iter_base) + 56)}}}) + AgentInvocationResult::AgentInitialization(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1676, defs : array1681, root : mbt_ffi_load32((iter_base) + 44)}, value : @types.SchemaValueTree::{value_nodes : array1713, root : mbt_ffi_load32((iter_base) + 56)}}}) } 1 => { - let array1351 : Array[@types.SchemaTypeNode] = []; - for index1352 = 0; index1352 < (mbt_ffi_load32((iter_base) + 32)); index1352 = index1352 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1352 * 144) + let array1911 : Array[@types.SchemaTypeNode] = []; + for index1912 = 0; index1912 < (mbt_ffi_load32((iter_base) + 32)); index1912 = index1912 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1912 * 144) - let lifted1337 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1897 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -24586,148 +36486,848 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted1721 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted1716 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted1715 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted1715) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted1718 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted1717 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array1239 : Array[@types.NamedFieldType] = []; - for index1240 = 0; index1240 < (mbt_ffi_load32((iter_base) + 12)); index1240 = index1240 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1240 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result1225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted1717) + } + _ => panic() + } - let lifted1227 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted1720 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result1226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1719 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1226) + Option::Some(result1719) + } + _ => panic() } - _ => panic() - } - let array1229 : Array[String] = []; - for index1230 = 0; index1230 < (mbt_ffi_load32((iter_base) + 28)); index1230 = index1230 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1230 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted1716, max : lifted1718, unit : lifted1720}) + } + _ => panic() + } - let result1228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted1721) + } + 3 => { - array1229.push(result1228) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted1728 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array1232 : Array[String] = []; - for index1233 = 0; index1233 < (mbt_ffi_load32((iter_base) + 36)); index1233 = index1233 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1233 * 8) + let lifted1723 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result1231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted1722 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array1232.push(result1231) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted1235 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result1234 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result1234) + Option::Some(lifted1722) + } + _ => panic() } - _ => panic() - } - let lifted1238 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted1725 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted1237 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted1724 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - - let result1236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1236) - } - _ => panic() + Option::Some(lifted1724) } - - Option::Some(lifted1237) + _ => panic() } - _ => panic() - } - array1239.push(@types.NamedFieldType::{name : result1225, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1227, aliases : array1229, examples : array1232, deprecated : lifted1235, role : lifted1238}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted1727 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::RecordType(array1239) + let result1726 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1726) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1723, max : lifted1725, unit : lifted1727}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1728) + } + 4 => { + + let lifted1735 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1730 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1729 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1729) + } + _ => panic() + } + + let lifted1732 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1731 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1731) + } + _ => panic() + } + + let lifted1734 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1733 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1733) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1730, max : lifted1732, unit : lifted1734}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1735) + } + 5 => { + + let lifted1742 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1737 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1736 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1736) + } + _ => panic() + } + + let lifted1739 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1738 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1738) + } + _ => panic() + } + + let lifted1741 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1740 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1740) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1737, max : lifted1739, unit : lifted1741}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1742) + } + 6 => { + + let lifted1749 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1744 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1743 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1743) + } + _ => panic() + } + + let lifted1746 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1745 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1745) + } + _ => panic() + } + + let lifted1748 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1747 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1747) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1744, max : lifted1746, unit : lifted1748}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1749) + } + 7 => { + + let lifted1756 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1751 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1750 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1750) + } + _ => panic() + } + + let lifted1753 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1752 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1752) + } + _ => panic() + } + + let lifted1755 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1754 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1754) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1751, max : lifted1753, unit : lifted1755}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1756) + } + 8 => { + + let lifted1763 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1758 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1757 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1757) + } + _ => panic() + } + + let lifted1760 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1759 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1759) + } + _ => panic() + } + + let lifted1762 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1761 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1761) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1758, max : lifted1760, unit : lifted1762}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1763) + } + 9 => { + + let lifted1770 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1765 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1764 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1764) + } + _ => panic() + } + + let lifted1767 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1766 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1766) + } + _ => panic() + } + + let lifted1769 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1768 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1768) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1765, max : lifted1767, unit : lifted1769}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1770) + } + 10 => { + + let lifted1777 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1772 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1771 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1771) + } + _ => panic() + } + + let lifted1774 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1773 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1773) + } + _ => panic() + } + + let lifted1776 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1775 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1775) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1772, max : lifted1774, unit : lifted1776}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1777) + } + 11 => { + + let lifted1784 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1779 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1778 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1778) + } + _ => panic() + } + + let lifted1781 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1780 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1780) + } + _ => panic() + } + + let lifted1783 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1782 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1782) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1779, max : lifted1781, unit : lifted1783}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1784) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array1799 : Array[@types.NamedFieldType] = []; + for index1800 = 0; index1800 < (mbt_ffi_load32((iter_base) + 12)); index1800 = index1800 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1800 * 68) + + let result1785 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted1787 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result1786 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result1786) + } + _ => panic() + } + + let array1789 : Array[String] = []; + for index1790 = 0; index1790 < (mbt_ffi_load32((iter_base) + 28)); index1790 = index1790 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1790 * 8) + + let result1788 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1789.push(result1788) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array1792 : Array[String] = []; + for index1793 = 0; index1793 < (mbt_ffi_load32((iter_base) + 36)); index1793 = index1793 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1793 * 8) + + let result1791 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array1792.push(result1791) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted1795 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result1794 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result1794) + } + _ => panic() + } + + let lifted1798 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted1797 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result1796 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result1796) + } + _ => panic() + } + + Option::Some(lifted1797) + } + _ => panic() + } + + array1799.push(@types.NamedFieldType::{name : result1785, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1787, aliases : array1789, examples : array1792, deprecated : lifted1795, role : lifted1798}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array1799) } 15 => { - let array1256 : Array[@types.VariantCaseType] = []; - for index1257 = 0; index1257 < (mbt_ffi_load32((iter_base) + 12)); index1257 = index1257 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1257 * 72) + let array1816 : Array[@types.VariantCaseType] = []; + for index1817 = 0; index1817 < (mbt_ffi_load32((iter_base) + 12)); index1817 = index1817 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1817 * 72) - let result1241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1801 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1242 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1802 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -24736,53 +37336,53 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1244 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1804 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1803 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1243) + Option::Some(result1803) } _ => panic() } - let array1246 : Array[String] = []; - for index1247 = 0; index1247 < (mbt_ffi_load32((iter_base) + 32)); index1247 = index1247 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1247 * 8) + let array1806 : Array[String] = []; + for index1807 = 0; index1807 < (mbt_ffi_load32((iter_base) + 32)); index1807 = index1807 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1807 * 8) - let result1245 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1805 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1246.push(result1245) + array1806.push(result1805) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1249 : Array[String] = []; - for index1250 = 0; index1250 < (mbt_ffi_load32((iter_base) + 40)); index1250 = index1250 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1250 * 8) + let array1809 : Array[String] = []; + for index1810 = 0; index1810 < (mbt_ffi_load32((iter_base) + 40)); index1810 = index1810 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1810 * 8) - let result1248 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1808 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1249.push(result1248) + array1809.push(result1808) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1252 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1812 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1251 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1811 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1251) + Option::Some(result1811) } _ => panic() } - let lifted1255 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1815 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1254 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1814 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -24797,63 +37397,63 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1813 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1253) + @types.Role::Other(result1813) } _ => panic() } - Option::Some(lifted1254) + Option::Some(lifted1814) } _ => panic() } - array1256.push(@types.VariantCaseType::{name : result1241, payload : lifted1242, metadata : @types.MetadataEnvelope::{doc : lifted1244, aliases : array1246, examples : array1249, deprecated : lifted1252, role : lifted1255}}) + array1816.push(@types.VariantCaseType::{name : result1801, payload : lifted1802, metadata : @types.MetadataEnvelope::{doc : lifted1804, aliases : array1806, examples : array1809, deprecated : lifted1812, role : lifted1815}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1256) + @types.SchemaTypeBody::VariantType(array1816) } 16 => { - let array1259 : Array[String] = []; - for index1260 = 0; index1260 < (mbt_ffi_load32((iter_base) + 12)); index1260 = index1260 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1260 * 8) + let array1819 : Array[String] = []; + for index1820 = 0; index1820 < (mbt_ffi_load32((iter_base) + 12)); index1820 = index1820 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1820 * 8) - let result1258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1818 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1259.push(result1258) + array1819.push(result1818) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1259) + @types.SchemaTypeBody::EnumType(array1819) } 17 => { - let array1262 : Array[String] = []; - for index1263 = 0; index1263 < (mbt_ffi_load32((iter_base) + 12)); index1263 = index1263 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1263 * 8) + let array1822 : Array[String] = []; + for index1823 = 0; index1823 < (mbt_ffi_load32((iter_base) + 12)); index1823 = index1823 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1823 * 8) - let result1261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1821 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1262.push(result1261) + array1822.push(result1821) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1262) + @types.SchemaTypeBody::FlagsType(array1822) } 18 => { - let array1264 : Array[Int] = []; - for index1265 = 0; index1265 < (mbt_ffi_load32((iter_base) + 12)); index1265 = index1265 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1265 * 4) + let array1824 : Array[Int] = []; + for index1825 = 0; index1825 < (mbt_ffi_load32((iter_base) + 12)); index1825 = index1825 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1825 * 4) - array1264.push(mbt_ffi_load32((iter_base) + 0)) + array1824.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1264) + @types.SchemaTypeBody::TupleType(array1824) } 19 => { @@ -24873,7 +37473,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 23 => { - let lifted1266 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1826 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -24882,7 +37482,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1267 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1827 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -24891,30 +37491,30 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1266, err : lifted1267}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1826, err : lifted1827}) } 24 => { - let lifted1271 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1831 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1269 : Array[String] = []; - for index1270 = 0; index1270 < (mbt_ffi_load32((iter_base) + 16)); index1270 = index1270 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1270 * 8) + let array1829 : Array[String] = []; + for index1830 = 0; index1830 < (mbt_ffi_load32((iter_base) + 16)); index1830 = index1830 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1830 * 8) - let result1268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1828 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1269.push(result1268) + array1829.push(result1828) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1269) + Option::Some(array1829) } _ => panic() } - let lifted1272 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1832 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -24923,7 +37523,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1273 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1833 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -24932,41 +37532,41 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1275 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1835 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1274 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1834 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1274) + Option::Some(result1834) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1271, min_length : lifted1272, max_length : lifted1273, regex : lifted1275}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1831, min_length : lifted1832, max_length : lifted1833, regex : lifted1835}) } 25 => { - let lifted1279 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1839 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1277 : Array[String] = []; - for index1278 = 0; index1278 < (mbt_ffi_load32((iter_base) + 16)); index1278 = index1278 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1278 * 8) + let array1837 : Array[String] = []; + for index1838 = 0; index1838 < (mbt_ffi_load32((iter_base) + 16)); index1838 = index1838 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1838 * 8) - let result1276 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1836 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1277.push(result1276) + array1837.push(result1836) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1277) + Option::Some(array1837) } _ => panic() } - let lifted1280 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1840 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -24975,7 +37575,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1281 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1841 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -24984,91 +37584,91 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1279, min_bytes : lifted1280, max_bytes : lifted1281}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1839, min_bytes : lifted1840, max_bytes : lifted1841}) } 26 => { - let lifted1285 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1845 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1283 : Array[String] = []; - for index1284 = 0; index1284 < (mbt_ffi_load32((iter_base) + 20)); index1284 = index1284 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1284 * 8) + let array1843 : Array[String] = []; + for index1844 = 0; index1844 < (mbt_ffi_load32((iter_base) + 20)); index1844 = index1844 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1844 * 8) - let result1282 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1842 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1283.push(result1282) + array1843.push(result1842) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1283) + Option::Some(array1843) } _ => panic() } - let lifted1289 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1849 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1287 : Array[String] = []; - for index1288 = 0; index1288 < (mbt_ffi_load32((iter_base) + 32)); index1288 = index1288 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1288 * 8) + let array1847 : Array[String] = []; + for index1848 = 0; index1848 < (mbt_ffi_load32((iter_base) + 32)); index1848 = index1848 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1848 * 8) - let result1286 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1846 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1287.push(result1286) + array1847.push(result1846) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1287) + Option::Some(array1847) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1285, allowed_extensions : lifted1289}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1845, allowed_extensions : lifted1849}) } 27 => { - let lifted1293 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1853 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1291 : Array[String] = []; - for index1292 = 0; index1292 < (mbt_ffi_load32((iter_base) + 16)); index1292 = index1292 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1292 * 8) + let array1851 : Array[String] = []; + for index1852 = 0; index1852 < (mbt_ffi_load32((iter_base) + 16)); index1852 = index1852 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1852 * 8) - let result1290 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1850 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1291.push(result1290) + array1851.push(result1850) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1291) + Option::Some(array1851) } _ => panic() } - let lifted1297 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1857 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1295 : Array[String] = []; - for index1296 = 0; index1296 < (mbt_ffi_load32((iter_base) + 28)); index1296 = index1296 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1296 * 8) + let array1855 : Array[String] = []; + for index1856 = 0; index1856 < (mbt_ffi_load32((iter_base) + 28)); index1856 = index1856 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1856 * 8) - let result1294 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1854 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1295.push(result1294) + array1855.push(result1854) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1295) + Option::Some(array1855) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1293, allowed_hosts : lifted1297}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1853, allowed_hosts : lifted1857}) } 28 => { @@ -25080,148 +37680,148 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 30 => { - let result1298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1858 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1300 : Array[String] = []; - for index1301 = 0; index1301 < (mbt_ffi_load32((iter_base) + 20)); index1301 = index1301 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1301 * 8) + let array1860 : Array[String] = []; + for index1861 = 0; index1861 < (mbt_ffi_load32((iter_base) + 20)); index1861 = index1861 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1861 * 8) - let result1299 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1859 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1300.push(result1299) + array1860.push(result1859) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1303 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1863 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1862 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1302}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1862}) } _ => panic() } - let lifted1305 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1865 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1864 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1304}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1864}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1298, allowed_suffixes : array1300, min : lifted1303, max : lifted1305}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1858, allowed_suffixes : array1860, min : lifted1863, max : lifted1865}) } 31 => { - let array1329 : Array[@types.UnionBranch] = []; - for index1330 = 0; index1330 < (mbt_ffi_load32((iter_base) + 12)); index1330 = index1330 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1330 * 92) + let array1889 : Array[@types.UnionBranch] = []; + for index1890 = 0; index1890 < (mbt_ffi_load32((iter_base) + 12)); index1890 = index1890 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1890 * 92) - let result1306 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1866 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1315 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1875 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1867 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1307) + @types.DiscriminatorRule::Prefix(result1867) } 1 => { - let result1308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1868 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1308) + @types.DiscriminatorRule::Suffix(result1868) } 2 => { - let result1309 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1869 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1309) + @types.DiscriminatorRule::Contains(result1869) } 3 => { - let result1310 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1870 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1310) + @types.DiscriminatorRule::Regex(result1870) } 4 => { - let result1311 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1871 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1313 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1873 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1312 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1872 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1312) + Option::Some(result1872) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1311, literal : lifted1313}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1871, literal : lifted1873}) } 5 => { - let result1314 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1874 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1314) + @types.DiscriminatorRule::FieldAbsent(result1874) } _ => panic() } - let lifted1317 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1877 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1316 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1876 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1316) + Option::Some(result1876) } _ => panic() } - let array1319 : Array[String] = []; - for index1320 = 0; index1320 < (mbt_ffi_load32((iter_base) + 52)); index1320 = index1320 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1320 * 8) + let array1879 : Array[String] = []; + for index1880 = 0; index1880 < (mbt_ffi_load32((iter_base) + 52)); index1880 = index1880 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1880 * 8) - let result1318 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1878 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1319.push(result1318) + array1879.push(result1878) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1322 : Array[String] = []; - for index1323 = 0; index1323 < (mbt_ffi_load32((iter_base) + 60)); index1323 = index1323 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1323 * 8) + let array1882 : Array[String] = []; + for index1883 = 0; index1883 < (mbt_ffi_load32((iter_base) + 60)); index1883 = index1883 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1883 * 8) - let result1321 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1881 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1322.push(result1321) + array1882.push(result1881) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1325 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1885 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1324 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1884 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1324) + Option::Some(result1884) } _ => panic() } - let lifted1328 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1888 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1327 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1887 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -25236,57 +37836,57 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1326 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1886 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1326) + @types.Role::Other(result1886) } _ => panic() } - Option::Some(lifted1327) + Option::Some(lifted1887) } _ => panic() } - array1329.push(@types.UnionBranch::{tag : result1306, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1315, metadata : @types.MetadataEnvelope::{doc : lifted1317, aliases : array1319, examples : array1322, deprecated : lifted1325, role : lifted1328}}) + array1889.push(@types.UnionBranch::{tag : result1866, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1875, metadata : @types.MetadataEnvelope::{doc : lifted1877, aliases : array1879, examples : array1882, deprecated : lifted1885, role : lifted1888}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1329}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1889}) } 32 => { - let lifted1332 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1892 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1331 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1891 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1331) + Option::Some(result1891) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1332}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1892}) } 33 => { - let lifted1334 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1894 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1333 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1893 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1333) + Option::Some(result1893) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1334}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1894}) } 34 => { - let lifted1335 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1895 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -25295,11 +37895,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1335) + @types.SchemaTypeBody::FutureType(lifted1895) } 35 => { - let lifted1336 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1896 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -25308,58 +37908,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1336) + @types.SchemaTypeBody::StreamType(lifted1896) } _ => panic() } - let lifted1339 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1899 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1338 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1898 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1338) + Option::Some(result1898) } _ => panic() } - let array1341 : Array[String] = []; - for index1342 = 0; index1342 < (mbt_ffi_load32((iter_base) + 104)); index1342 = index1342 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1342 * 8) + let array1901 : Array[String] = []; + for index1902 = 0; index1902 < (mbt_ffi_load32((iter_base) + 104)); index1902 = index1902 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1902 * 8) - let result1340 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1900 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1341.push(result1340) + array1901.push(result1900) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1344 : Array[String] = []; - for index1345 = 0; index1345 < (mbt_ffi_load32((iter_base) + 112)); index1345 = index1345 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1345 * 8) + let array1904 : Array[String] = []; + for index1905 = 0; index1905 < (mbt_ffi_load32((iter_base) + 112)); index1905 = index1905 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1905 * 8) - let result1343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1903 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1344.push(result1343) + array1904.push(result1903) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1347 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1907 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1346 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1906 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1346) + Option::Some(result1906) } _ => panic() } - let lifted1350 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1910 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1349 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1909 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -25374,48 +37974,48 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1348 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1908 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1348) + @types.Role::Other(result1908) } _ => panic() } - Option::Some(lifted1349) + Option::Some(lifted1909) } _ => panic() } - array1351.push(@types.SchemaTypeNode::{body : lifted1337, metadata : @types.MetadataEnvelope::{doc : lifted1339, aliases : array1341, examples : array1344, deprecated : lifted1347, role : lifted1350}}) + array1911.push(@types.SchemaTypeNode::{body : lifted1897, metadata : @types.MetadataEnvelope::{doc : lifted1899, aliases : array1901, examples : array1904, deprecated : lifted1907, role : lifted1910}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1356 : Array[@types.SchemaTypeDef] = []; - for index1357 = 0; index1357 < (mbt_ffi_load32((iter_base) + 40)); index1357 = index1357 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1357 * 24) + let array1916 : Array[@types.SchemaTypeDef] = []; + for index1917 = 0; index1917 < (mbt_ffi_load32((iter_base) + 40)); index1917 = index1917 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1917 * 24) - let result1353 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1913 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1355 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1915 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1354 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1914 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1354) + Option::Some(result1914) } _ => panic() } - array1356.push(@types.SchemaTypeDef::{id : result1353, name : lifted1355, body : mbt_ffi_load32((iter_base) + 20)}) + array1916.push(@types.SchemaTypeDef::{id : result1913, name : lifted1915, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array1388 : Array[@types.SchemaValueNode] = []; - for index1389 = 0; index1389 < (mbt_ffi_load32((iter_base) + 52)); index1389 = index1389 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1389 * 32) + let array1948 : Array[@types.SchemaValueNode] = []; + for index1949 = 0; index1949 < (mbt_ffi_load32((iter_base) + 52)); index1949 = index1949 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1949 * 32) - let lifted1387 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1947 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -25466,25 +38066,25 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 12 => { - let result1358 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1918 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1358) + @types.SchemaValueNode::StringValue(result1918) } 13 => { - let array1359 : Array[Int] = []; - for index1360 = 0; index1360 < (mbt_ffi_load32((iter_base) + 12)); index1360 = index1360 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1360 * 4) + let array1919 : Array[Int] = []; + for index1920 = 0; index1920 < (mbt_ffi_load32((iter_base) + 12)); index1920 = index1920 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1920 * 4) - array1359.push(mbt_ffi_load32((iter_base) + 0)) + array1919.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1359) + @types.SchemaValueNode::RecordValue(array1919) } 14 => { - let lifted1361 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1921 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -25493,7 +38093,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1361}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1921}) } 15 => { @@ -25501,67 +38101,67 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 16 => { - let array1362 : Array[Bool] = []; - for index1363 = 0; index1363 < (mbt_ffi_load32((iter_base) + 12)); index1363 = index1363 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1363 * 1) + let array1922 : Array[Bool] = []; + for index1923 = 0; index1923 < (mbt_ffi_load32((iter_base) + 12)); index1923 = index1923 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1923 * 1) - array1362.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1922.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1362) + @types.SchemaValueNode::FlagsValue(array1922) } 17 => { - let array1364 : Array[Int] = []; - for index1365 = 0; index1365 < (mbt_ffi_load32((iter_base) + 12)); index1365 = index1365 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1365 * 4) + let array1924 : Array[Int] = []; + for index1925 = 0; index1925 < (mbt_ffi_load32((iter_base) + 12)); index1925 = index1925 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1925 * 4) - array1364.push(mbt_ffi_load32((iter_base) + 0)) + array1924.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1364) + @types.SchemaValueNode::TupleValue(array1924) } 18 => { - let array1366 : Array[Int] = []; - for index1367 = 0; index1367 < (mbt_ffi_load32((iter_base) + 12)); index1367 = index1367 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1367 * 4) + let array1926 : Array[Int] = []; + for index1927 = 0; index1927 < (mbt_ffi_load32((iter_base) + 12)); index1927 = index1927 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1927 * 4) - array1366.push(mbt_ffi_load32((iter_base) + 0)) + array1926.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1366) + @types.SchemaValueNode::ListValue(array1926) } 19 => { - let array1368 : Array[Int] = []; - for index1369 = 0; index1369 < (mbt_ffi_load32((iter_base) + 12)); index1369 = index1369 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1369 * 4) + let array1928 : Array[Int] = []; + for index1929 = 0; index1929 < (mbt_ffi_load32((iter_base) + 12)); index1929 = index1929 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1929 * 4) - array1368.push(mbt_ffi_load32((iter_base) + 0)) + array1928.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1368) + @types.SchemaValueNode::FixedListValue(array1928) } 20 => { - let array1370 : Array[@types.MapEntry] = []; - for index1371 = 0; index1371 < (mbt_ffi_load32((iter_base) + 12)); index1371 = index1371 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1371 * 8) + let array1930 : Array[@types.MapEntry] = []; + for index1931 = 0; index1931 < (mbt_ffi_load32((iter_base) + 12)); index1931 = index1931 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1931 * 8) - array1370.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1930.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1370) + @types.SchemaValueNode::MapValue(array1930) } 21 => { - let lifted1372 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1932 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -25570,14 +38170,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1372) + @types.SchemaValueNode::OptionValue(lifted1932) } 22 => { - let lifted1375 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1935 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1373 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1933 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -25586,11 +38186,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted1373) + @types.ResultValuePayload::OkValue(lifted1933) } 1 => { - let lifted1374 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1934 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -25599,58 +38199,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1374) + @types.ResultValuePayload::ErrValue(lifted1934) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1375) + @types.SchemaValueNode::ResultValue(lifted1935) } 23 => { - let result1376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1936 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1378 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1938 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1377 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1937 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1377) + Option::Some(result1937) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1376, language : lifted1378}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1936, language : lifted1938}) } 24 => { - let result1379 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1939 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1381 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1941 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1940 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1380) + Option::Some(result1940) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1379, mime_type : lifted1381}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1939, mime_type : lifted1941}) } 25 => { - let result1382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1942 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1382) + @types.SchemaValueNode::PathValue(result1942) } 26 => { - let result1383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1943 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1383) + @types.SchemaValueNode::UrlValue(result1943) } 27 => { @@ -25662,21 +38262,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 29 => { - let result1384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1944 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1384}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1944}) } 30 => { - let result1385 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1945 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1385, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1945, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1386 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1946 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1386}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1946}) } 32 => { @@ -25685,11 +38285,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1388.push(lifted1387) + array1948.push(lifted1947) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - AgentInvocationResult::AgentMethod(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1351, defs : array1356, root : mbt_ffi_load32((iter_base) + 44)}, value : @types.SchemaValueTree::{value_nodes : array1388, root : mbt_ffi_load32((iter_base) + 56)}}}) + AgentInvocationResult::AgentMethod(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1911, defs : array1916, root : mbt_ffi_load32((iter_base) + 44)}, value : @types.SchemaValueTree::{value_nodes : array1948, root : mbt_ffi_load32((iter_base) + 56)}}}) } 2 => { @@ -25697,57 +38297,57 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let lifted1391 : String? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1951 : String? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { - let result1390 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result1950 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - Option::Some(result1390) + Option::Some(result1950) } _ => panic() } - AgentInvocationResult::LoadSnapshot(FallibleResultParameters::{error : lifted1391}) + AgentInvocationResult::LoadSnapshot(FallibleResultParameters::{error : lifted1951}) } 4 => { - let result1392 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1952 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - let result1393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result1953 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - AgentInvocationResult::SaveSnapshot(SaveSnapshotResultParameters::{snapshot : SnapshotData::{data : result1392, mime_type : result1393}}) + AgentInvocationResult::SaveSnapshot(SaveSnapshotResultParameters::{snapshot : SnapshotData::{data : result1952, mime_type : result1953}}) } 5 => { - let lifted1395 : String? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1955 : String? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { - let result1394 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result1954 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - Option::Some(result1394) + Option::Some(result1954) } _ => panic() } - AgentInvocationResult::ProcessOplogEntries(FallibleResultParameters::{error : lifted1395}) + AgentInvocationResult::ProcessOplogEntries(FallibleResultParameters::{error : lifted1955}) } _ => panic() } - let lifted1398 : String? = match mbt_ffi_load8_u((iter_base) + 60) { + let lifted1958 : String? = match mbt_ffi_load8_u((iter_base) + 60) { 0 => Option::None 1 => { - let result1397 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1957 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - Option::Some(result1397) + Option::Some(result1957) } _ => panic() } - PublicOplogEntry::AgentInvocationFinished(AgentInvocationFinishedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, result : lifted1396, method_name : lifted1398, consumed_fuel : mbt_ffi_load64((iter_base) + 72), component_revision : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}) + PublicOplogEntry::AgentInvocationFinished(AgentInvocationFinishedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, result : lifted1956, method_name : lifted1958, consumed_fuel : mbt_ffi_load64((iter_base) + 72), component_revision : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}) } 6 => { @@ -25755,17 +38355,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 7 => { - let result1399 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result1959 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let lifted1403 : RetryPolicyState? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1963 : RetryPolicyState? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let array1401 : Array[StateNode] = []; - for index1402 = 0; index1402 < (mbt_ffi_load32((iter_base) + 52)); index1402 = index1402 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1402 * 16) + let array1961 : Array[StateNode] = []; + for index1962 = 0; index1962 < (mbt_ffi_load32((iter_base) + 52)); index1962 = index1962 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1962 * 16) - let lifted1400 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1960 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { StateNode::Counter((mbt_ffi_load32((iter_base) + 4)).reinterpret_as_uint()) @@ -25793,16 +38393,16 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1401.push(lifted1400) + array1961.push(lifted1960) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - Option::Some(RetryPolicyState::{nodes : array1401}) + Option::Some(RetryPolicyState::{nodes : array1961}) } _ => panic() } - PublicOplogEntry::Error(ErrorParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, error : result1399, retry_from : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), inside_atomic_region : (mbt_ffi_load8_u((iter_base) + 40) != 0), retry_policy_state : lifted1403}) + PublicOplogEntry::Error(ErrorParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, error : result1959, retry_from : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), inside_atomic_region : (mbt_ffi_load8_u((iter_base) + 40) != 0), retry_policy_state : lifted1963}) } 8 => { @@ -25830,16 +38430,16 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 14 => { - let lifted1778 = match (mbt_ffi_load8_u((iter_base) + 24)) { + let lifted2478 = match (mbt_ffi_load8_u((iter_base) + 24)) { 0 => { - let result1404 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result1964 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let array1531 : Array[@types.SchemaTypeNode] = []; - for index1532 = 0; index1532 < (mbt_ffi_load32((iter_base) + 44)); index1532 = index1532 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index1532 * 144) + let array2161 : Array[@types.SchemaTypeNode] = []; + for index2162 = 0; index2162 < (mbt_ffi_load32((iter_base) + 44)); index2162 = index2162 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index2162 * 144) - let lifted1517 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2147 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -25850,43 +38450,743 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 2 => { - @types.SchemaTypeBody::S8Type + let lifted1971 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1966 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1965 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1965) + } + _ => panic() + } + + let lifted1968 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1967 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1967) + } + _ => panic() + } + + let lifted1970 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1969 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1969) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1966, max : lifted1968, unit : lifted1970}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1971) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted1978 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1973 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1972 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1972) + } + _ => panic() + } + + let lifted1975 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1974 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1974) + } + _ => panic() + } + + let lifted1977 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1976 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1976) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1973, max : lifted1975, unit : lifted1977}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1978) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted1985 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1980 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1979 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1979) + } + _ => panic() + } + + let lifted1982 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1981 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1981) + } + _ => panic() + } + + let lifted1984 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1983 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1983) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1980, max : lifted1982, unit : lifted1984}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1985) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted1992 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1987 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1986 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1986) + } + _ => panic() + } + + let lifted1989 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1988 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1988) + } + _ => panic() + } + + let lifted1991 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1990 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1990) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1987, max : lifted1989, unit : lifted1991}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1992) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted1999 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1994 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1993 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1993) + } + _ => panic() + } + + let lifted1996 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1995 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1995) + } + _ => panic() + } + + let lifted1998 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1997 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1997) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1994, max : lifted1996, unit : lifted1998}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1999) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted2006 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2001 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2000 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2000) + } + _ => panic() + } + + let lifted2003 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2002 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2002) + } + _ => panic() + } + + let lifted2005 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2004 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2004) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2001, max : lifted2003, unit : lifted2005}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted2006) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted2013 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2008 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2007 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2007) + } + _ => panic() + } + + let lifted2010 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2009 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2009) + } + _ => panic() + } + + let lifted2012 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2011 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2011) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2008, max : lifted2010, unit : lifted2012}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2013) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted2020 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2015 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2014 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2014) + } + _ => panic() + } + + let lifted2017 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2016 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2016) + } + _ => panic() + } + + let lifted2019 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2018 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2018) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2015, max : lifted2017, unit : lifted2019}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2020) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted2027 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2022 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2021 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2021) + } + _ => panic() + } + + let lifted2024 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2023 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2023) + } + _ => panic() + } + + let lifted2026 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2025 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2025) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2022, max : lifted2024, unit : lifted2026}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2027) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted2034 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2029 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2028 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2028) + } + _ => panic() + } + + let lifted2031 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2030 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2030) + } + _ => panic() + } + + let lifted2033 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2032 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2032) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2029, max : lifted2031, unit : lifted2033}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2034) } 12 => { @@ -25898,59 +39198,59 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 14 => { - let array1419 : Array[@types.NamedFieldType] = []; - for index1420 = 0; index1420 < (mbt_ffi_load32((iter_base) + 12)); index1420 = index1420 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1420 * 68) + let array2049 : Array[@types.NamedFieldType] = []; + for index2050 = 0; index2050 < (mbt_ffi_load32((iter_base) + 12)); index2050 = index2050 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2050 * 68) - let result1405 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2035 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1407 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2037 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result1406 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2036 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result1406) + Option::Some(result2036) } _ => panic() } - let array1409 : Array[String] = []; - for index1410 = 0; index1410 < (mbt_ffi_load32((iter_base) + 28)); index1410 = index1410 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1410 * 8) + let array2039 : Array[String] = []; + for index2040 = 0; index2040 < (mbt_ffi_load32((iter_base) + 28)); index2040 = index2040 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2040 * 8) - let result1408 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2038 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1409.push(result1408) + array2039.push(result2038) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array1412 : Array[String] = []; - for index1413 = 0; index1413 < (mbt_ffi_load32((iter_base) + 36)); index1413 = index1413 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1413 * 8) + let array2042 : Array[String] = []; + for index2043 = 0; index2043 < (mbt_ffi_load32((iter_base) + 36)); index2043 = index2043 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index2043 * 8) - let result1411 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2041 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1412.push(result1411) + array2042.push(result2041) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted1415 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted2045 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result1414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2044 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result1414) + Option::Some(result2044) } _ => panic() } - let lifted1418 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted2048 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted1417 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted2047 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -25965,33 +39265,33 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1416 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result2046 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1416) + @types.Role::Other(result2046) } _ => panic() } - Option::Some(lifted1417) + Option::Some(lifted2047) } _ => panic() } - array1419.push(@types.NamedFieldType::{name : result1405, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1407, aliases : array1409, examples : array1412, deprecated : lifted1415, role : lifted1418}}) + array2049.push(@types.NamedFieldType::{name : result2035, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted2037, aliases : array2039, examples : array2042, deprecated : lifted2045, role : lifted2048}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array1419) + @types.SchemaTypeBody::RecordType(array2049) } 15 => { - let array1436 : Array[@types.VariantCaseType] = []; - for index1437 = 0; index1437 < (mbt_ffi_load32((iter_base) + 12)); index1437 = index1437 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1437 * 72) + let array2066 : Array[@types.VariantCaseType] = []; + for index2067 = 0; index2067 < (mbt_ffi_load32((iter_base) + 12)); index2067 = index2067 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2067 * 72) - let result1421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2051 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1422 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2052 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -26000,53 +39300,53 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1424 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2054 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1423 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2053 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1423) + Option::Some(result2053) } _ => panic() } - let array1426 : Array[String] = []; - for index1427 = 0; index1427 < (mbt_ffi_load32((iter_base) + 32)); index1427 = index1427 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1427 * 8) + let array2056 : Array[String] = []; + for index2057 = 0; index2057 < (mbt_ffi_load32((iter_base) + 32)); index2057 = index2057 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2057 * 8) - let result1425 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2055 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1426.push(result1425) + array2056.push(result2055) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1429 : Array[String] = []; - for index1430 = 0; index1430 < (mbt_ffi_load32((iter_base) + 40)); index1430 = index1430 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1430 * 8) + let array2059 : Array[String] = []; + for index2060 = 0; index2060 < (mbt_ffi_load32((iter_base) + 40)); index2060 = index2060 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2060 * 8) - let result1428 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2058 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1429.push(result1428) + array2059.push(result2058) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1432 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted2062 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1431 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2061 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1431) + Option::Some(result2061) } _ => panic() } - let lifted1435 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2065 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1434 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted2064 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -26061,63 +39361,63 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1433 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result2063 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1433) + @types.Role::Other(result2063) } _ => panic() } - Option::Some(lifted1434) + Option::Some(lifted2064) } _ => panic() } - array1436.push(@types.VariantCaseType::{name : result1421, payload : lifted1422, metadata : @types.MetadataEnvelope::{doc : lifted1424, aliases : array1426, examples : array1429, deprecated : lifted1432, role : lifted1435}}) + array2066.push(@types.VariantCaseType::{name : result2051, payload : lifted2052, metadata : @types.MetadataEnvelope::{doc : lifted2054, aliases : array2056, examples : array2059, deprecated : lifted2062, role : lifted2065}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1436) + @types.SchemaTypeBody::VariantType(array2066) } 16 => { - let array1439 : Array[String] = []; - for index1440 = 0; index1440 < (mbt_ffi_load32((iter_base) + 12)); index1440 = index1440 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1440 * 8) + let array2069 : Array[String] = []; + for index2070 = 0; index2070 < (mbt_ffi_load32((iter_base) + 12)); index2070 = index2070 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2070 * 8) - let result1438 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2068 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1439.push(result1438) + array2069.push(result2068) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1439) + @types.SchemaTypeBody::EnumType(array2069) } 17 => { - let array1442 : Array[String] = []; - for index1443 = 0; index1443 < (mbt_ffi_load32((iter_base) + 12)); index1443 = index1443 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1443 * 8) + let array2072 : Array[String] = []; + for index2073 = 0; index2073 < (mbt_ffi_load32((iter_base) + 12)); index2073 = index2073 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2073 * 8) - let result1441 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2071 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1442.push(result1441) + array2072.push(result2071) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1442) + @types.SchemaTypeBody::FlagsType(array2072) } 18 => { - let array1444 : Array[Int] = []; - for index1445 = 0; index1445 < (mbt_ffi_load32((iter_base) + 12)); index1445 = index1445 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1445 * 4) + let array2074 : Array[Int] = []; + for index2075 = 0; index2075 < (mbt_ffi_load32((iter_base) + 12)); index2075 = index2075 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2075 * 4) - array1444.push(mbt_ffi_load32((iter_base) + 0)) + array2074.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1444) + @types.SchemaTypeBody::TupleType(array2074) } 19 => { @@ -26137,7 +39437,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 23 => { - let lifted1446 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2076 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -26146,7 +39446,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1447 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2077 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -26155,30 +39455,30 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1446, err : lifted1447}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted2076, err : lifted2077}) } 24 => { - let lifted1451 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2081 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1449 : Array[String] = []; - for index1450 = 0; index1450 < (mbt_ffi_load32((iter_base) + 16)); index1450 = index1450 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1450 * 8) + let array2079 : Array[String] = []; + for index2080 = 0; index2080 < (mbt_ffi_load32((iter_base) + 16)); index2080 = index2080 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2080 * 8) - let result1448 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2078 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1449.push(result1448) + array2079.push(result2078) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1449) + Option::Some(array2079) } _ => panic() } - let lifted1452 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2082 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -26187,7 +39487,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1453 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2083 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -26196,41 +39496,41 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1455 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2085 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1454 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2084 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1454) + Option::Some(result2084) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1451, min_length : lifted1452, max_length : lifted1453, regex : lifted1455}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted2081, min_length : lifted2082, max_length : lifted2083, regex : lifted2085}) } 25 => { - let lifted1459 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2089 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1457 : Array[String] = []; - for index1458 = 0; index1458 < (mbt_ffi_load32((iter_base) + 16)); index1458 = index1458 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1458 * 8) + let array2087 : Array[String] = []; + for index2088 = 0; index2088 < (mbt_ffi_load32((iter_base) + 16)); index2088 = index2088 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2088 * 8) - let result1456 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2086 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1457.push(result1456) + array2087.push(result2086) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1457) + Option::Some(array2087) } _ => panic() } - let lifted1460 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2090 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -26239,7 +39539,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1461 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2091 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -26248,91 +39548,91 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1459, min_bytes : lifted1460, max_bytes : lifted1461}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted2089, min_bytes : lifted2090, max_bytes : lifted2091}) } 26 => { - let lifted1465 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2095 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1463 : Array[String] = []; - for index1464 = 0; index1464 < (mbt_ffi_load32((iter_base) + 20)); index1464 = index1464 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1464 * 8) + let array2093 : Array[String] = []; + for index2094 = 0; index2094 < (mbt_ffi_load32((iter_base) + 20)); index2094 = index2094 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2094 * 8) - let result1462 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2092 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1463.push(result1462) + array2093.push(result2092) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1463) + Option::Some(array2093) } _ => panic() } - let lifted1469 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2099 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1467 : Array[String] = []; - for index1468 = 0; index1468 < (mbt_ffi_load32((iter_base) + 32)); index1468 = index1468 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1468 * 8) + let array2097 : Array[String] = []; + for index2098 = 0; index2098 < (mbt_ffi_load32((iter_base) + 32)); index2098 = index2098 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2098 * 8) - let result1466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2096 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1467.push(result1466) + array2097.push(result2096) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1467) + Option::Some(array2097) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1465, allowed_extensions : lifted1469}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted2095, allowed_extensions : lifted2099}) } 27 => { - let lifted1473 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2103 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1471 : Array[String] = []; - for index1472 = 0; index1472 < (mbt_ffi_load32((iter_base) + 16)); index1472 = index1472 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1472 * 8) + let array2101 : Array[String] = []; + for index2102 = 0; index2102 < (mbt_ffi_load32((iter_base) + 16)); index2102 = index2102 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2102 * 8) - let result1470 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1471.push(result1470) + array2101.push(result2100) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1471) + Option::Some(array2101) } _ => panic() } - let lifted1477 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2107 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1475 : Array[String] = []; - for index1476 = 0; index1476 < (mbt_ffi_load32((iter_base) + 28)); index1476 = index1476 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1476 * 8) + let array2105 : Array[String] = []; + for index2106 = 0; index2106 < (mbt_ffi_load32((iter_base) + 28)); index2106 = index2106 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2106 * 8) - let result1474 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2104 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1475.push(result1474) + array2105.push(result2104) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1475) + Option::Some(array2105) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1473, allowed_hosts : lifted1477}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted2103, allowed_hosts : lifted2107}) } 28 => { @@ -26344,148 +39644,148 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 30 => { - let result1478 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2108 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1480 : Array[String] = []; - for index1481 = 0; index1481 < (mbt_ffi_load32((iter_base) + 20)); index1481 = index1481 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1481 * 8) + let array2110 : Array[String] = []; + for index2111 = 0; index2111 < (mbt_ffi_load32((iter_base) + 20)); index2111 = index2111 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2111 * 8) - let result1479 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1480.push(result1479) + array2110.push(result2109) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1483 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2113 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1482 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1482}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result2112}) } _ => panic() } - let lifted1485 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2115 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1484 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result2114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1484}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result2114}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1478, allowed_suffixes : array1480, min : lifted1483, max : lifted1485}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result2108, allowed_suffixes : array2110, min : lifted2113, max : lifted2115}) } 31 => { - let array1509 : Array[@types.UnionBranch] = []; - for index1510 = 0; index1510 < (mbt_ffi_load32((iter_base) + 12)); index1510 = index1510 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1510 * 92) + let array2139 : Array[@types.UnionBranch] = []; + for index2140 = 0; index2140 < (mbt_ffi_load32((iter_base) + 12)); index2140 = index2140 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2140 * 92) - let result1486 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2116 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1495 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted2125 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1487 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1487) + @types.DiscriminatorRule::Prefix(result2117) } 1 => { - let result1488 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1488) + @types.DiscriminatorRule::Suffix(result2118) } 2 => { - let result1489 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2119 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1489) + @types.DiscriminatorRule::Contains(result2119) } 3 => { - let result1490 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1490) + @types.DiscriminatorRule::Regex(result2120) } 4 => { - let result1491 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1493 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2123 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1492 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2122 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1492) + Option::Some(result2122) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1491, literal : lifted1493}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result2121, literal : lifted2123}) } 5 => { - let result1494 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2124 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1494) + @types.DiscriminatorRule::FieldAbsent(result2124) } _ => panic() } - let lifted1497 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2127 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1496 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1496) + Option::Some(result2126) } _ => panic() } - let array1499 : Array[String] = []; - for index1500 = 0; index1500 < (mbt_ffi_load32((iter_base) + 52)); index1500 = index1500 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1500 * 8) + let array2129 : Array[String] = []; + for index2130 = 0; index2130 < (mbt_ffi_load32((iter_base) + 52)); index2130 = index2130 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2130 * 8) - let result1498 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2128 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1499.push(result1498) + array2129.push(result2128) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1502 : Array[String] = []; - for index1503 = 0; index1503 < (mbt_ffi_load32((iter_base) + 60)); index1503 = index1503 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1503 * 8) + let array2132 : Array[String] = []; + for index2133 = 0; index2133 < (mbt_ffi_load32((iter_base) + 60)); index2133 = index2133 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2133 * 8) - let result1501 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2131 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1502.push(result1501) + array2132.push(result2131) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1505 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted2135 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1504 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result2134 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1504) + Option::Some(result2134) } _ => panic() } - let lifted1508 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted2138 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1507 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted2137 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -26500,57 +39800,57 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1506 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result2136 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1506) + @types.Role::Other(result2136) } _ => panic() } - Option::Some(lifted1507) + Option::Some(lifted2137) } _ => panic() } - array1509.push(@types.UnionBranch::{tag : result1486, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1495, metadata : @types.MetadataEnvelope::{doc : lifted1497, aliases : array1499, examples : array1502, deprecated : lifted1505, role : lifted1508}}) + array2139.push(@types.UnionBranch::{tag : result2116, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted2125, metadata : @types.MetadataEnvelope::{doc : lifted2127, aliases : array2129, examples : array2132, deprecated : lifted2135, role : lifted2138}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1509}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array2139}) } 32 => { - let lifted1512 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2142 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1511) + Option::Some(result2141) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1512}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted2142}) } 33 => { - let lifted1514 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2144 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1513 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1513) + Option::Some(result2143) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1514}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted2144}) } 34 => { - let lifted1515 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2145 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -26559,11 +39859,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1515) + @types.SchemaTypeBody::FutureType(lifted2145) } 35 => { - let lifted1516 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2146 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -26572,58 +39872,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1516) + @types.SchemaTypeBody::StreamType(lifted2146) } _ => panic() } - let lifted1519 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted2149 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result2148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1518) + Option::Some(result2148) } _ => panic() } - let array1521 : Array[String] = []; - for index1522 = 0; index1522 < (mbt_ffi_load32((iter_base) + 104)); index1522 = index1522 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1522 * 8) + let array2151 : Array[String] = []; + for index2152 = 0; index2152 < (mbt_ffi_load32((iter_base) + 104)); index2152 = index2152 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index2152 * 8) - let result1520 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1521.push(result1520) + array2151.push(result2150) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1524 : Array[String] = []; - for index1525 = 0; index1525 < (mbt_ffi_load32((iter_base) + 112)); index1525 = index1525 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1525 * 8) + let array2154 : Array[String] = []; + for index2155 = 0; index2155 < (mbt_ffi_load32((iter_base) + 112)); index2155 = index2155 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index2155 * 8) - let result1523 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1524.push(result1523) + array2154.push(result2153) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1527 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted2157 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1526 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result2156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1526) + Option::Some(result2156) } _ => panic() } - let lifted1530 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted2160 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1529 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted2159 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -26638,48 +39938,48 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1528 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result2158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1528) + @types.Role::Other(result2158) } _ => panic() } - Option::Some(lifted1529) + Option::Some(lifted2159) } _ => panic() } - array1531.push(@types.SchemaTypeNode::{body : lifted1517, metadata : @types.MetadataEnvelope::{doc : lifted1519, aliases : array1521, examples : array1524, deprecated : lifted1527, role : lifted1530}}) + array2161.push(@types.SchemaTypeNode::{body : lifted2147, metadata : @types.MetadataEnvelope::{doc : lifted2149, aliases : array2151, examples : array2154, deprecated : lifted2157, role : lifted2160}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let array1536 : Array[@types.SchemaTypeDef] = []; - for index1537 = 0; index1537 < (mbt_ffi_load32((iter_base) + 52)); index1537 = index1537 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1537 * 24) + let array2166 : Array[@types.SchemaTypeDef] = []; + for index2167 = 0; index2167 < (mbt_ffi_load32((iter_base) + 52)); index2167 = index2167 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2167 * 24) - let result1533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2163 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1535 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2165 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1534 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2164 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1534) + Option::Some(result2164) } _ => panic() } - array1536.push(@types.SchemaTypeDef::{id : result1533, name : lifted1535, body : mbt_ffi_load32((iter_base) + 20)}) + array2166.push(@types.SchemaTypeDef::{id : result2163, name : lifted2165, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1568 : Array[@types.SchemaValueNode] = []; - for index1569 = 0; index1569 < (mbt_ffi_load32((iter_base) + 64)); index1569 = index1569 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index1569 * 32) + let array2198 : Array[@types.SchemaValueNode] = []; + for index2199 = 0; index2199 < (mbt_ffi_load32((iter_base) + 64)); index2199 = index2199 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2199 * 32) - let lifted1567 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2197 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -26730,25 +40030,25 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 12 => { - let result1538 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1538) + @types.SchemaValueNode::StringValue(result2168) } 13 => { - let array1539 : Array[Int] = []; - for index1540 = 0; index1540 < (mbt_ffi_load32((iter_base) + 12)); index1540 = index1540 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1540 * 4) + let array2169 : Array[Int] = []; + for index2170 = 0; index2170 < (mbt_ffi_load32((iter_base) + 12)); index2170 = index2170 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2170 * 4) - array1539.push(mbt_ffi_load32((iter_base) + 0)) + array2169.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1539) + @types.SchemaValueNode::RecordValue(array2169) } 14 => { - let lifted1541 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2171 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -26757,7 +40057,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1541}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted2171}) } 15 => { @@ -26765,67 +40065,67 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 16 => { - let array1542 : Array[Bool] = []; - for index1543 = 0; index1543 < (mbt_ffi_load32((iter_base) + 12)); index1543 = index1543 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1543 * 1) + let array2172 : Array[Bool] = []; + for index2173 = 0; index2173 < (mbt_ffi_load32((iter_base) + 12)); index2173 = index2173 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2173 * 1) - array1542.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array2172.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1542) + @types.SchemaValueNode::FlagsValue(array2172) } 17 => { - let array1544 : Array[Int] = []; - for index1545 = 0; index1545 < (mbt_ffi_load32((iter_base) + 12)); index1545 = index1545 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1545 * 4) + let array2174 : Array[Int] = []; + for index2175 = 0; index2175 < (mbt_ffi_load32((iter_base) + 12)); index2175 = index2175 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2175 * 4) - array1544.push(mbt_ffi_load32((iter_base) + 0)) + array2174.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1544) + @types.SchemaValueNode::TupleValue(array2174) } 18 => { - let array1546 : Array[Int] = []; - for index1547 = 0; index1547 < (mbt_ffi_load32((iter_base) + 12)); index1547 = index1547 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1547 * 4) + let array2176 : Array[Int] = []; + for index2177 = 0; index2177 < (mbt_ffi_load32((iter_base) + 12)); index2177 = index2177 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2177 * 4) - array1546.push(mbt_ffi_load32((iter_base) + 0)) + array2176.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1546) + @types.SchemaValueNode::ListValue(array2176) } 19 => { - let array1548 : Array[Int] = []; - for index1549 = 0; index1549 < (mbt_ffi_load32((iter_base) + 12)); index1549 = index1549 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1549 * 4) + let array2178 : Array[Int] = []; + for index2179 = 0; index2179 < (mbt_ffi_load32((iter_base) + 12)); index2179 = index2179 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2179 * 4) - array1548.push(mbt_ffi_load32((iter_base) + 0)) + array2178.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1548) + @types.SchemaValueNode::FixedListValue(array2178) } 20 => { - let array1550 : Array[@types.MapEntry] = []; - for index1551 = 0; index1551 < (mbt_ffi_load32((iter_base) + 12)); index1551 = index1551 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1551 * 8) + let array2180 : Array[@types.MapEntry] = []; + for index2181 = 0; index2181 < (mbt_ffi_load32((iter_base) + 12)); index2181 = index2181 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2181 * 8) - array1550.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array2180.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1550) + @types.SchemaValueNode::MapValue(array2180) } 21 => { - let lifted1552 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2182 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -26834,14 +40134,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1552) + @types.SchemaValueNode::OptionValue(lifted2182) } 22 => { - let lifted1555 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2185 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1553 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2183 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -26850,11 +40150,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted1553) + @types.ResultValuePayload::OkValue(lifted2183) } 1 => { - let lifted1554 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2184 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -26863,58 +40163,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1554) + @types.ResultValuePayload::ErrValue(lifted2184) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1555) + @types.SchemaValueNode::ResultValue(lifted2185) } 23 => { - let result1556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2186 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1558 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2188 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1557 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1557) + Option::Some(result2187) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1556, language : lifted1558}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result2186, language : lifted2188}) } 24 => { - let result1559 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2189 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1561 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2191 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1560 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1560) + Option::Some(result2190) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1559, mime_type : lifted1561}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result2189, mime_type : lifted2191}) } 25 => { - let result1562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1562) + @types.SchemaValueNode::PathValue(result2192) } 26 => { - let result1563 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1563) + @types.SchemaValueNode::UrlValue(result2193) } 27 => { @@ -26926,21 +40226,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 29 => { - let result1564 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1564}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result2194}) } 30 => { - let result1565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1565, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result2195, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1566}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result2196}) } 32 => { @@ -26949,47 +40249,47 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1568.push(lifted1567) + array2198.push(lifted2197) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - let result1570 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 72), mbt_ffi_load32((iter_base) + 76)) + let result2200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 72), mbt_ffi_load32((iter_base) + 76)) - let array1572 : Array[String] = []; - for index1573 = 0; index1573 < (mbt_ffi_load32((iter_base) + 84)); index1573 = index1573 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index1573 * 8) + let array2202 : Array[String] = []; + for index2203 = 0; index2203 < (mbt_ffi_load32((iter_base) + 84)); index2203 = index2203 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index2203 * 8) - let result1571 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2201 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1572.push(result1571) + array2202.push(result2201) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) - let array1587 : Array[Array[SpanData]] = []; - for index1588 = 0; index1588 < (mbt_ffi_load32((iter_base) + 92)); index1588 = index1588 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index1588 * 8) + let array2217 : Array[Array[SpanData]] = []; + for index2218 = 0; index2218 < (mbt_ffi_load32((iter_base) + 92)); index2218 = index2218 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index2218 * 8) - let array1585 : Array[SpanData] = []; - for index1586 = 0; index1586 < (mbt_ffi_load32((iter_base) + 4)); index1586 = index1586 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1586 * 80) + let array2215 : Array[SpanData] = []; + for index2216 = 0; index2216 < (mbt_ffi_load32((iter_base) + 4)); index2216 = index2216 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index2216 * 80) - let lifted1584 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2214 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1574 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2204 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1576 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted2206 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result1575 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result1575) + Option::Some(result2205) } _ => panic() } - let lifted1577 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted2207 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -26998,58 +40298,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let array1581 : Array[@context.Attribute] = []; - for index1582 = 0; index1582 < (mbt_ffi_load32((iter_base) + 68)); index1582 = index1582 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1582 * 20) + let array2211 : Array[@context.Attribute] = []; + for index2212 = 0; index2212 < (mbt_ffi_load32((iter_base) + 68)); index2212 = index2212 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index2212 * 20) - let result1578 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2208 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1580 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2210 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result1579 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2209 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result1579) + @context.AttributeValue::String(result2209) } _ => panic() } - array1581.push(@context.Attribute::{key : result1578, value : lifted1580}) + array2211.push(@context.Attribute::{key : result2208, value : lifted2210}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result1574, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1576, linked_context : lifted1577, attributes : array1581, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result2204, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted2206, linked_context : lifted2207, attributes : array2211, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result1583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result1583}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result2213}) } _ => panic() } - array1585.push(lifted1584) + array2215.push(lifted2214) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array1587.push(array1585) + array2217.push(array2215) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result1404, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1531, defs : array1536, root : mbt_ffi_load32((iter_base) + 56)}, value : @types.SchemaValueTree::{value_nodes : array1568, root : mbt_ffi_load32((iter_base) + 68)}}, trace_id : result1570, trace_states : array1572, invocation_context : array1587}) + AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result1964, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array2161, defs : array2166, root : mbt_ffi_load32((iter_base) + 56)}, value : @types.SchemaValueTree::{value_nodes : array2198, root : mbt_ffi_load32((iter_base) + 68)}}, trace_id : result2200, trace_states : array2202, invocation_context : array2217}) } 1 => { - let result1589 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2219 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result1590 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let array1717 : Array[@types.SchemaTypeNode] = []; - for index1718 = 0; index1718 < (mbt_ffi_load32((iter_base) + 52)); index1718 = index1718 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1718 * 144) + let array2417 : Array[@types.SchemaTypeNode] = []; + for index2418 = 0; index2418 < (mbt_ffi_load32((iter_base) + 52)); index2418 = index2418 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2418 * 144) - let lifted1703 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2403 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -27060,43 +40360,743 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 2 => { - @types.SchemaTypeBody::S8Type + let lifted2227 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2222 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2221 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2221) + } + _ => panic() + } + + let lifted2224 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2223 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2223) + } + _ => panic() + } + + let lifted2226 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2225) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2222, max : lifted2224, unit : lifted2226}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted2227) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted2234 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2229 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2228 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2228) + } + _ => panic() + } + + let lifted2231 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2230 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2230) + } + _ => panic() + } + + let lifted2233 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2232 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2232) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2229, max : lifted2231, unit : lifted2233}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted2234) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted2241 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2236 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2235 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2235) + } + _ => panic() + } + + let lifted2238 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2237 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2237) + } + _ => panic() + } + + let lifted2240 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2239 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2239) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2236, max : lifted2238, unit : lifted2240}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted2241) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted2248 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2243 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2242 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2242) + } + _ => panic() + } + + let lifted2245 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2244 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2244) + } + _ => panic() + } + + let lifted2247 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2246 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2246) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2243, max : lifted2245, unit : lifted2247}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted2248) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted2255 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2250 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2249 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2249) + } + _ => panic() + } + + let lifted2252 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2251 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2251) + } + _ => panic() + } + + let lifted2254 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2253) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2250, max : lifted2252, unit : lifted2254}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted2255) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted2262 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2257 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2256 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2256) + } + _ => panic() + } + + let lifted2259 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2258 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2258) + } + _ => panic() + } + + let lifted2261 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2260 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2260) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2257, max : lifted2259, unit : lifted2261}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted2262) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted2269 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2264 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2263 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2263) + } + _ => panic() + } + + let lifted2266 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2265 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2265) + } + _ => panic() + } + + let lifted2268 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2267) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2264, max : lifted2266, unit : lifted2268}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2269) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted2276 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2271 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2270 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2270) + } + _ => panic() + } + + let lifted2273 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2272 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2272) + } + _ => panic() + } + + let lifted2275 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2274 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2274) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2271, max : lifted2273, unit : lifted2275}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2276) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted2283 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2278 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2277 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2277) + } + _ => panic() + } + + let lifted2280 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2279 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2279) + } + _ => panic() + } + + let lifted2282 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2281 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2281) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2278, max : lifted2280, unit : lifted2282}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2283) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted2290 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2285 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2284 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2284) + } + _ => panic() + } + + let lifted2287 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2286 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2286) + } + _ => panic() + } + + let lifted2289 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2288 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2288) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2285, max : lifted2287, unit : lifted2289}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2290) } 12 => { @@ -27108,59 +41108,59 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 14 => { - let array1605 : Array[@types.NamedFieldType] = []; - for index1606 = 0; index1606 < (mbt_ffi_load32((iter_base) + 12)); index1606 = index1606 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1606 * 68) + let array2305 : Array[@types.NamedFieldType] = []; + for index2306 = 0; index2306 < (mbt_ffi_load32((iter_base) + 12)); index2306 = index2306 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2306 * 68) - let result1591 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2291 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1593 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2293 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result1592 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2292 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result1592) + Option::Some(result2292) } _ => panic() } - let array1595 : Array[String] = []; - for index1596 = 0; index1596 < (mbt_ffi_load32((iter_base) + 28)); index1596 = index1596 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1596 * 8) + let array2295 : Array[String] = []; + for index2296 = 0; index2296 < (mbt_ffi_load32((iter_base) + 28)); index2296 = index2296 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2296 * 8) - let result1594 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2294 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1595.push(result1594) + array2295.push(result2294) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array1598 : Array[String] = []; - for index1599 = 0; index1599 < (mbt_ffi_load32((iter_base) + 36)); index1599 = index1599 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1599 * 8) + let array2298 : Array[String] = []; + for index2299 = 0; index2299 < (mbt_ffi_load32((iter_base) + 36)); index2299 = index2299 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index2299 * 8) - let result1597 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2297 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1598.push(result1597) + array2298.push(result2297) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted1601 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted2301 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result1600 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result1600) + Option::Some(result2300) } _ => panic() } - let lifted1604 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted2304 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted1603 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted2303 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -27175,33 +41175,33 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1602 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result2302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1602) + @types.Role::Other(result2302) } _ => panic() } - Option::Some(lifted1603) + Option::Some(lifted2303) } _ => panic() } - array1605.push(@types.NamedFieldType::{name : result1591, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1593, aliases : array1595, examples : array1598, deprecated : lifted1601, role : lifted1604}}) + array2305.push(@types.NamedFieldType::{name : result2291, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted2293, aliases : array2295, examples : array2298, deprecated : lifted2301, role : lifted2304}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array1605) + @types.SchemaTypeBody::RecordType(array2305) } 15 => { - let array1622 : Array[@types.VariantCaseType] = []; - for index1623 = 0; index1623 < (mbt_ffi_load32((iter_base) + 12)); index1623 = index1623 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1623 * 72) + let array2322 : Array[@types.VariantCaseType] = []; + for index2323 = 0; index2323 < (mbt_ffi_load32((iter_base) + 12)); index2323 = index2323 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2323 * 72) - let result1607 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1608 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2308 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -27210,53 +41210,53 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1610 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2310 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1609 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2309 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1609) + Option::Some(result2309) } _ => panic() } - let array1612 : Array[String] = []; - for index1613 = 0; index1613 < (mbt_ffi_load32((iter_base) + 32)); index1613 = index1613 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1613 * 8) + let array2312 : Array[String] = []; + for index2313 = 0; index2313 < (mbt_ffi_load32((iter_base) + 32)); index2313 = index2313 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2313 * 8) - let result1611 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2311 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1612.push(result1611) + array2312.push(result2311) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1615 : Array[String] = []; - for index1616 = 0; index1616 < (mbt_ffi_load32((iter_base) + 40)); index1616 = index1616 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1616 * 8) + let array2315 : Array[String] = []; + for index2316 = 0; index2316 < (mbt_ffi_load32((iter_base) + 40)); index2316 = index2316 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2316 * 8) - let result1614 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2314 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1615.push(result1614) + array2315.push(result2314) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1618 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted2318 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1617 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1617) + Option::Some(result2317) } _ => panic() } - let lifted1621 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2321 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1620 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted2320 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -27271,63 +41271,63 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1619 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result2319 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1619) + @types.Role::Other(result2319) } _ => panic() } - Option::Some(lifted1620) + Option::Some(lifted2320) } _ => panic() } - array1622.push(@types.VariantCaseType::{name : result1607, payload : lifted1608, metadata : @types.MetadataEnvelope::{doc : lifted1610, aliases : array1612, examples : array1615, deprecated : lifted1618, role : lifted1621}}) + array2322.push(@types.VariantCaseType::{name : result2307, payload : lifted2308, metadata : @types.MetadataEnvelope::{doc : lifted2310, aliases : array2312, examples : array2315, deprecated : lifted2318, role : lifted2321}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1622) + @types.SchemaTypeBody::VariantType(array2322) } 16 => { - let array1625 : Array[String] = []; - for index1626 = 0; index1626 < (mbt_ffi_load32((iter_base) + 12)); index1626 = index1626 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1626 * 8) + let array2325 : Array[String] = []; + for index2326 = 0; index2326 < (mbt_ffi_load32((iter_base) + 12)); index2326 = index2326 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2326 * 8) - let result1624 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2324 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1625.push(result1624) + array2325.push(result2324) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1625) + @types.SchemaTypeBody::EnumType(array2325) } 17 => { - let array1628 : Array[String] = []; - for index1629 = 0; index1629 < (mbt_ffi_load32((iter_base) + 12)); index1629 = index1629 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1629 * 8) + let array2328 : Array[String] = []; + for index2329 = 0; index2329 < (mbt_ffi_load32((iter_base) + 12)); index2329 = index2329 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2329 * 8) - let result1627 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2327 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1628.push(result1627) + array2328.push(result2327) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1628) + @types.SchemaTypeBody::FlagsType(array2328) } 18 => { - let array1630 : Array[Int] = []; - for index1631 = 0; index1631 < (mbt_ffi_load32((iter_base) + 12)); index1631 = index1631 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1631 * 4) + let array2330 : Array[Int] = []; + for index2331 = 0; index2331 < (mbt_ffi_load32((iter_base) + 12)); index2331 = index2331 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2331 * 4) - array1630.push(mbt_ffi_load32((iter_base) + 0)) + array2330.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1630) + @types.SchemaTypeBody::TupleType(array2330) } 19 => { @@ -27347,7 +41347,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 23 => { - let lifted1632 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2332 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -27356,7 +41356,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1633 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2333 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -27365,30 +41365,30 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1632, err : lifted1633}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted2332, err : lifted2333}) } 24 => { - let lifted1637 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2337 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1635 : Array[String] = []; - for index1636 = 0; index1636 < (mbt_ffi_load32((iter_base) + 16)); index1636 = index1636 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1636 * 8) + let array2335 : Array[String] = []; + for index2336 = 0; index2336 < (mbt_ffi_load32((iter_base) + 16)); index2336 = index2336 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2336 * 8) - let result1634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2334 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1635.push(result1634) + array2335.push(result2334) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1635) + Option::Some(array2335) } _ => panic() } - let lifted1638 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2338 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -27397,7 +41397,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1639 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2339 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -27406,41 +41406,41 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1641 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2341 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1640 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2340 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1640) + Option::Some(result2340) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1637, min_length : lifted1638, max_length : lifted1639, regex : lifted1641}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted2337, min_length : lifted2338, max_length : lifted2339, regex : lifted2341}) } 25 => { - let lifted1645 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2345 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1643 : Array[String] = []; - for index1644 = 0; index1644 < (mbt_ffi_load32((iter_base) + 16)); index1644 = index1644 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1644 * 8) + let array2343 : Array[String] = []; + for index2344 = 0; index2344 < (mbt_ffi_load32((iter_base) + 16)); index2344 = index2344 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2344 * 8) - let result1642 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1643.push(result1642) + array2343.push(result2342) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1643) + Option::Some(array2343) } _ => panic() } - let lifted1646 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2346 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -27449,7 +41449,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let lifted1647 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2347 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -27458,91 +41458,91 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1645, min_bytes : lifted1646, max_bytes : lifted1647}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted2345, min_bytes : lifted2346, max_bytes : lifted2347}) } 26 => { - let lifted1651 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2351 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1649 : Array[String] = []; - for index1650 = 0; index1650 < (mbt_ffi_load32((iter_base) + 20)); index1650 = index1650 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1650 * 8) + let array2349 : Array[String] = []; + for index2350 = 0; index2350 < (mbt_ffi_load32((iter_base) + 20)); index2350 = index2350 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2350 * 8) - let result1648 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2348 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1649.push(result1648) + array2349.push(result2348) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1649) + Option::Some(array2349) } _ => panic() } - let lifted1655 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2355 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1653 : Array[String] = []; - for index1654 = 0; index1654 < (mbt_ffi_load32((iter_base) + 32)); index1654 = index1654 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1654 * 8) + let array2353 : Array[String] = []; + for index2354 = 0; index2354 < (mbt_ffi_load32((iter_base) + 32)); index2354 = index2354 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2354 * 8) - let result1652 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2352 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1653.push(result1652) + array2353.push(result2352) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1653) + Option::Some(array2353) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1651, allowed_extensions : lifted1655}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted2351, allowed_extensions : lifted2355}) } 27 => { - let lifted1659 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2359 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1657 : Array[String] = []; - for index1658 = 0; index1658 < (mbt_ffi_load32((iter_base) + 16)); index1658 = index1658 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1658 * 8) + let array2357 : Array[String] = []; + for index2358 = 0; index2358 < (mbt_ffi_load32((iter_base) + 16)); index2358 = index2358 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2358 * 8) - let result1656 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1657.push(result1656) + array2357.push(result2356) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1657) + Option::Some(array2357) } _ => panic() } - let lifted1663 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2363 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1661 : Array[String] = []; - for index1662 = 0; index1662 < (mbt_ffi_load32((iter_base) + 28)); index1662 = index1662 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1662 * 8) + let array2361 : Array[String] = []; + for index2362 = 0; index2362 < (mbt_ffi_load32((iter_base) + 28)); index2362 = index2362 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2362 * 8) - let result1660 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2360 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1661.push(result1660) + array2361.push(result2360) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1661) + Option::Some(array2361) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1659, allowed_hosts : lifted1663}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted2359, allowed_hosts : lifted2363}) } 28 => { @@ -27554,148 +41554,148 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 30 => { - let result1664 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2364 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1666 : Array[String] = []; - for index1667 = 0; index1667 < (mbt_ffi_load32((iter_base) + 20)); index1667 = index1667 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1667 * 8) + let array2366 : Array[String] = []; + for index2367 = 0; index2367 < (mbt_ffi_load32((iter_base) + 20)); index2367 = index2367 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2367 * 8) - let result1665 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2365 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1666.push(result1665) + array2366.push(result2365) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1669 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2369 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1668 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2368 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1668}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result2368}) } _ => panic() } - let lifted1671 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2371 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1670 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result2370 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1670}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result2370}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1664, allowed_suffixes : array1666, min : lifted1669, max : lifted1671}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result2364, allowed_suffixes : array2366, min : lifted2369, max : lifted2371}) } 31 => { - let array1695 : Array[@types.UnionBranch] = []; - for index1696 = 0; index1696 < (mbt_ffi_load32((iter_base) + 12)); index1696 = index1696 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1696 * 92) + let array2395 : Array[@types.UnionBranch] = []; + for index2396 = 0; index2396 < (mbt_ffi_load32((iter_base) + 12)); index2396 = index2396 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2396 * 92) - let result1672 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2372 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1681 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted2381 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1673 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1673) + @types.DiscriminatorRule::Prefix(result2373) } 1 => { - let result1674 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2374 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1674) + @types.DiscriminatorRule::Suffix(result2374) } 2 => { - let result1675 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1675) + @types.DiscriminatorRule::Contains(result2375) } 3 => { - let result1676 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1676) + @types.DiscriminatorRule::Regex(result2376) } 4 => { - let result1677 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2377 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1679 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2379 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1678 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2378 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1678) + Option::Some(result2378) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1677, literal : lifted1679}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result2377, literal : lifted2379}) } 5 => { - let result1680 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1680) + @types.DiscriminatorRule::FieldAbsent(result2380) } _ => panic() } - let lifted1683 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2383 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1682 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1682) + Option::Some(result2382) } _ => panic() } - let array1685 : Array[String] = []; - for index1686 = 0; index1686 < (mbt_ffi_load32((iter_base) + 52)); index1686 = index1686 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1686 * 8) + let array2385 : Array[String] = []; + for index2386 = 0; index2386 < (mbt_ffi_load32((iter_base) + 52)); index2386 = index2386 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2386 * 8) - let result1684 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1685.push(result1684) + array2385.push(result2384) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1688 : Array[String] = []; - for index1689 = 0; index1689 < (mbt_ffi_load32((iter_base) + 60)); index1689 = index1689 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1689 * 8) + let array2388 : Array[String] = []; + for index2389 = 0; index2389 < (mbt_ffi_load32((iter_base) + 60)); index2389 = index2389 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2389 * 8) - let result1687 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2387 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1688.push(result1687) + array2388.push(result2387) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1691 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted2391 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1690 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result2390 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1690) + Option::Some(result2390) } _ => panic() } - let lifted1694 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted2394 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1693 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted2393 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -27710,57 +41710,57 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1692 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result2392 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1692) + @types.Role::Other(result2392) } _ => panic() } - Option::Some(lifted1693) + Option::Some(lifted2393) } _ => panic() } - array1695.push(@types.UnionBranch::{tag : result1672, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1681, metadata : @types.MetadataEnvelope::{doc : lifted1683, aliases : array1685, examples : array1688, deprecated : lifted1691, role : lifted1694}}) + array2395.push(@types.UnionBranch::{tag : result2372, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted2381, metadata : @types.MetadataEnvelope::{doc : lifted2383, aliases : array2385, examples : array2388, deprecated : lifted2391, role : lifted2394}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1695}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array2395}) } 32 => { - let lifted1698 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2398 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1697 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2397 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1697) + Option::Some(result2397) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1698}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted2398}) } 33 => { - let lifted1700 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2400 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1699 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2399 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1699) + Option::Some(result2399) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1700}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted2400}) } 34 => { - let lifted1701 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2401 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -27769,11 +41769,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1701) + @types.SchemaTypeBody::FutureType(lifted2401) } 35 => { - let lifted1702 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2402 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -27782,58 +41782,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1702) + @types.SchemaTypeBody::StreamType(lifted2402) } _ => panic() } - let lifted1705 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted2405 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1704 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result2404 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1704) + Option::Some(result2404) } _ => panic() } - let array1707 : Array[String] = []; - for index1708 = 0; index1708 < (mbt_ffi_load32((iter_base) + 104)); index1708 = index1708 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1708 * 8) + let array2407 : Array[String] = []; + for index2408 = 0; index2408 < (mbt_ffi_load32((iter_base) + 104)); index2408 = index2408 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index2408 * 8) - let result1706 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2406 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1707.push(result1706) + array2407.push(result2406) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1710 : Array[String] = []; - for index1711 = 0; index1711 < (mbt_ffi_load32((iter_base) + 112)); index1711 = index1711 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1711 * 8) + let array2410 : Array[String] = []; + for index2411 = 0; index2411 < (mbt_ffi_load32((iter_base) + 112)); index2411 = index2411 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index2411 * 8) - let result1709 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2409 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1710.push(result1709) + array2410.push(result2409) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1713 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted2413 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1712 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result2412 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1712) + Option::Some(result2412) } _ => panic() } - let lifted1716 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted2416 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1715 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted2415 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -27848,48 +41848,48 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result2414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1714) + @types.Role::Other(result2414) } _ => panic() } - Option::Some(lifted1715) + Option::Some(lifted2415) } _ => panic() } - array1717.push(@types.SchemaTypeNode::{body : lifted1703, metadata : @types.MetadataEnvelope::{doc : lifted1705, aliases : array1707, examples : array1710, deprecated : lifted1713, role : lifted1716}}) + array2417.push(@types.SchemaTypeNode::{body : lifted2403, metadata : @types.MetadataEnvelope::{doc : lifted2405, aliases : array2407, examples : array2410, deprecated : lifted2413, role : lifted2416}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1722 : Array[@types.SchemaTypeDef] = []; - for index1723 = 0; index1723 < (mbt_ffi_load32((iter_base) + 60)); index1723 = index1723 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1723 * 24) + let array2422 : Array[@types.SchemaTypeDef] = []; + for index2423 = 0; index2423 < (mbt_ffi_load32((iter_base) + 60)); index2423 = index2423 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2423 * 24) - let result1719 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2419 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1721 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2421 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1720 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1720) + Option::Some(result2420) } _ => panic() } - array1722.push(@types.SchemaTypeDef::{id : result1719, name : lifted1721, body : mbt_ffi_load32((iter_base) + 20)}) + array2422.push(@types.SchemaTypeDef::{id : result2419, name : lifted2421, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let array1754 : Array[@types.SchemaValueNode] = []; - for index1755 = 0; index1755 < (mbt_ffi_load32((iter_base) + 72)); index1755 = index1755 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index1755 * 32) + let array2454 : Array[@types.SchemaValueNode] = []; + for index2455 = 0; index2455 < (mbt_ffi_load32((iter_base) + 72)); index2455 = index2455 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index2455 * 32) - let lifted1753 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2453 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -27940,25 +41940,25 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 12 => { - let result1724 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2424 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1724) + @types.SchemaValueNode::StringValue(result2424) } 13 => { - let array1725 : Array[Int] = []; - for index1726 = 0; index1726 < (mbt_ffi_load32((iter_base) + 12)); index1726 = index1726 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1726 * 4) + let array2425 : Array[Int] = []; + for index2426 = 0; index2426 < (mbt_ffi_load32((iter_base) + 12)); index2426 = index2426 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2426 * 4) - array1725.push(mbt_ffi_load32((iter_base) + 0)) + array2425.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1725) + @types.SchemaValueNode::RecordValue(array2425) } 14 => { - let lifted1727 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2427 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -27967,7 +41967,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1727}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted2427}) } 15 => { @@ -27975,67 +41975,67 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 16 => { - let array1728 : Array[Bool] = []; - for index1729 = 0; index1729 < (mbt_ffi_load32((iter_base) + 12)); index1729 = index1729 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1729 * 1) + let array2428 : Array[Bool] = []; + for index2429 = 0; index2429 < (mbt_ffi_load32((iter_base) + 12)); index2429 = index2429 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2429 * 1) - array1728.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array2428.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1728) + @types.SchemaValueNode::FlagsValue(array2428) } 17 => { - let array1730 : Array[Int] = []; - for index1731 = 0; index1731 < (mbt_ffi_load32((iter_base) + 12)); index1731 = index1731 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1731 * 4) + let array2430 : Array[Int] = []; + for index2431 = 0; index2431 < (mbt_ffi_load32((iter_base) + 12)); index2431 = index2431 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2431 * 4) - array1730.push(mbt_ffi_load32((iter_base) + 0)) + array2430.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1730) + @types.SchemaValueNode::TupleValue(array2430) } 18 => { - let array1732 : Array[Int] = []; - for index1733 = 0; index1733 < (mbt_ffi_load32((iter_base) + 12)); index1733 = index1733 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1733 * 4) + let array2432 : Array[Int] = []; + for index2433 = 0; index2433 < (mbt_ffi_load32((iter_base) + 12)); index2433 = index2433 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2433 * 4) - array1732.push(mbt_ffi_load32((iter_base) + 0)) + array2432.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1732) + @types.SchemaValueNode::ListValue(array2432) } 19 => { - let array1734 : Array[Int] = []; - for index1735 = 0; index1735 < (mbt_ffi_load32((iter_base) + 12)); index1735 = index1735 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1735 * 4) + let array2434 : Array[Int] = []; + for index2435 = 0; index2435 < (mbt_ffi_load32((iter_base) + 12)); index2435 = index2435 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2435 * 4) - array1734.push(mbt_ffi_load32((iter_base) + 0)) + array2434.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1734) + @types.SchemaValueNode::FixedListValue(array2434) } 20 => { - let array1736 : Array[@types.MapEntry] = []; - for index1737 = 0; index1737 < (mbt_ffi_load32((iter_base) + 12)); index1737 = index1737 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1737 * 8) + let array2436 : Array[@types.MapEntry] = []; + for index2437 = 0; index2437 < (mbt_ffi_load32((iter_base) + 12)); index2437 = index2437 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2437 * 8) - array1736.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array2436.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1736) + @types.SchemaValueNode::MapValue(array2436) } 21 => { - let lifted1738 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2438 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -28044,14 +42044,14 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1738) + @types.SchemaValueNode::OptionValue(lifted2438) } 22 => { - let lifted1741 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2441 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1739 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2439 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -28060,11 +42060,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted1739) + @types.ResultValuePayload::OkValue(lifted2439) } 1 => { - let lifted1740 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2440 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -28073,58 +42073,58 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1740) + @types.ResultValuePayload::ErrValue(lifted2440) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1741) + @types.SchemaValueNode::ResultValue(lifted2441) } 23 => { - let result1742 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2442 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1744 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2444 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1743 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2443 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1743) + Option::Some(result2443) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1742, language : lifted1744}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result2442, language : lifted2444}) } 24 => { - let result1745 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2445 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1747 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2447 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1746 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2446 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1746) + Option::Some(result2446) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1745, mime_type : lifted1747}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result2445, mime_type : lifted2447}) } 25 => { - let result1748 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2448 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1748) + @types.SchemaValueNode::PathValue(result2448) } 26 => { - let result1749 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2449 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1749) + @types.SchemaValueNode::UrlValue(result2449) } 27 => { @@ -28136,21 +42136,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 29 => { - let result1750 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2450 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1750}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result2450}) } 30 => { - let result1751 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2451 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1751, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result2451, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1752 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1752}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result2452}) } 32 => { @@ -28159,47 +42159,47 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1754.push(lifted1753) + array2454.push(lifted2453) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - let result1756 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) + let result2456 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) - let array1758 : Array[String] = []; - for index1759 = 0; index1759 < (mbt_ffi_load32((iter_base) + 92)); index1759 = index1759 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index1759 * 8) + let array2458 : Array[String] = []; + for index2459 = 0; index2459 < (mbt_ffi_load32((iter_base) + 92)); index2459 = index2459 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index2459 * 8) - let result1757 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2457 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1758.push(result1757) + array2458.push(result2457) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - let array1773 : Array[Array[SpanData]] = []; - for index1774 = 0; index1774 < (mbt_ffi_load32((iter_base) + 100)); index1774 = index1774 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index1774 * 8) + let array2473 : Array[Array[SpanData]] = []; + for index2474 = 0; index2474 < (mbt_ffi_load32((iter_base) + 100)); index2474 = index2474 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index2474 * 8) - let array1771 : Array[SpanData] = []; - for index1772 = 0; index1772 < (mbt_ffi_load32((iter_base) + 4)); index1772 = index1772 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1772 * 80) + let array2471 : Array[SpanData] = []; + for index2472 = 0; index2472 < (mbt_ffi_load32((iter_base) + 4)); index2472 = index2472 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index2472 * 80) - let lifted1770 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2470 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1760 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2460 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1762 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted2462 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result1761 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2461 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result1761) + Option::Some(result2461) } _ => panic() } - let lifted1763 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted2463 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -28208,46 +42208,46 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - let array1767 : Array[@context.Attribute] = []; - for index1768 = 0; index1768 < (mbt_ffi_load32((iter_base) + 68)); index1768 = index1768 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1768 * 20) + let array2467 : Array[@context.Attribute] = []; + for index2468 = 0; index2468 < (mbt_ffi_load32((iter_base) + 68)); index2468 = index2468 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index2468 * 20) - let result1764 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2464 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1766 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2466 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result1765 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2465 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result1765) + @context.AttributeValue::String(result2465) } _ => panic() } - array1767.push(@context.Attribute::{key : result1764, value : lifted1766}) + array2467.push(@context.Attribute::{key : result2464, value : lifted2466}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result1760, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1762, linked_context : lifted1763, attributes : array1767, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result2460, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted2462, linked_context : lifted2463, attributes : array2467, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result1769 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2469 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result1769}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result2469}) } _ => panic() } - array1771.push(lifted1770) + array2471.push(lifted2470) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array1773.push(array1771) + array2473.push(array2471) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 96)) - AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result1589, method_name : result1590, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1717, defs : array1722, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array1754, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result1756, trace_states : array1758, invocation_context : array1773}) + AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result2219, method_name : result2220, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array2417, defs : array2422, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array2454, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result2456, trace_states : array2458, invocation_context : array2473}) } 2 => { @@ -28255,17 +42255,17 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 3 => { - let result1775 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2475 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result1776 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2476 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result1775, mime_type : result1776}}) + AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result2475, mime_type : result2476}}) } 4 => { - let result1777 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2477 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result1777}) + AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result2477}) } 5 => { @@ -28274,70 +42274,70 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - PublicOplogEntry::PendingAgentInvocation(PendingAgentInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, invocation : lifted1778}) + PublicOplogEntry::PendingAgentInvocation(PendingAgentInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, invocation : lifted2478}) } 15 => { - let lifted1781 = match (mbt_ffi_load8_u((iter_base) + 32)) { + let lifted2481 = match (mbt_ffi_load8_u((iter_base) + 32)) { 0 => { UpdateDescription::AutoUpdate } 1 => { - let result1779 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2479 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - let result1780 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2480 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - UpdateDescription::SnapshotBased(@host.Snapshot::{payload : result1779, mime_type : result1780}) + UpdateDescription::SnapshotBased(@host.Snapshot::{payload : result2479, mime_type : result2480}) } _ => panic() } - PublicOplogEntry::PendingUpdate(PendingUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), description : lifted1781}) + PublicOplogEntry::PendingUpdate(PendingUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), description : lifted2481}) } 16 => { - let array1788 : Array[PluginInstallationDescription] = []; - for index1789 = 0; index1789 < (mbt_ffi_load32((iter_base) + 44)); index1789 = index1789 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index1789 * 48) + let array2488 : Array[PluginInstallationDescription] = []; + for index2489 = 0; index2489 < (mbt_ffi_load32((iter_base) + 44)); index2489 = index2489 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index2489 * 48) - let result1782 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2482 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - let result1783 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2483 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - let array1786 : Array[(String, String)] = []; - for index1787 = 0; index1787 < (mbt_ffi_load32((iter_base) + 40)); index1787 = index1787 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1787 * 16) + let array2486 : Array[(String, String)] = []; + for index2487 = 0; index2487 < (mbt_ffi_load32((iter_base) + 40)); index2487 = index2487 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2487 * 16) - let result1784 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2484 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result1785 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2485 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array1786.push((result1784, result1785)) + array2486.push((result2484, result2485)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - array1788.push(PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 0)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 16), plugin_name : result1782, plugin_version : result1783, parameters : array1786}) + array2488.push(PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 0)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 16), plugin_name : result2482, plugin_version : result2483, parameters : array2486}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - PublicOplogEntry::SuccessfulUpdate(SuccessfulUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), new_component_size : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), new_active_plugins : array1788}) + PublicOplogEntry::SuccessfulUpdate(SuccessfulUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), new_component_size : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), new_active_plugins : array2488}) } 17 => { - let lifted1791 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted2491 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result1790 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2490 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result1790) + Option::Some(result2490) } _ => panic() } - PublicOplogEntry::FailedUpdate(FailedUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), details : lifted1791}) + PublicOplogEntry::FailedUpdate(FailedUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), details : lifted2491}) } 18 => { @@ -28349,27 +42349,27 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 20 => { - let result1792 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2492 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result1793 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2493 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - PublicOplogEntry::CreateResource(CreateResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), name : result1792, owner : result1793}) + PublicOplogEntry::CreateResource(CreateResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), name : result2492, owner : result2493}) } 21 => { - let result1794 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2494 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result1795 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2495 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - PublicOplogEntry::DropResource(DropResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), name : result1794, owner : result1795}) + PublicOplogEntry::DropResource(DropResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), name : result2494, owner : result2495}) } 22 => { - let result1796 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2496 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - let result1797 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2497 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - PublicOplogEntry::Log(LogParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, level : LogLevel::from(mbt_ffi_load8_u((iter_base) + 24)), context : result1796, message : result1797}) + PublicOplogEntry::Log(LogParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, level : LogLevel::from(mbt_ffi_load8_u((iter_base) + 24)), context : result2496, message : result2497}) } 23 => { @@ -28377,43 +42377,43 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 24 => { - let result1798 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2498 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - let result1799 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result2499 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - let array1802 : Array[(String, String)] = []; - for index1803 = 0; index1803 < (mbt_ffi_load32((iter_base) + 64)); index1803 = index1803 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index1803 * 16) + let array2502 : Array[(String, String)] = []; + for index2503 = 0; index2503 < (mbt_ffi_load32((iter_base) + 64)); index2503 = index2503 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2503 * 16) - let result1800 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2500 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result1801 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2501 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array1802.push((result1800, result1801)) + array2502.push((result2500, result2501)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - PublicOplogEntry::ActivatePlugin(ActivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result1798, plugin_version : result1799, parameters : array1802}}) + PublicOplogEntry::ActivatePlugin(ActivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result2498, plugin_version : result2499, parameters : array2502}}) } 25 => { - let result1804 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2504 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - let result1805 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result2505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - let array1808 : Array[(String, String)] = []; - for index1809 = 0; index1809 < (mbt_ffi_load32((iter_base) + 64)); index1809 = index1809 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index1809 * 16) + let array2508 : Array[(String, String)] = []; + for index2509 = 0; index2509 < (mbt_ffi_load32((iter_base) + 64)); index2509 = index2509 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2509 * 16) - let result1806 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2506 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result1807 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2507 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array1808.push((result1806, result1807)) + array2508.push((result2506, result2507)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - PublicOplogEntry::DeactivatePlugin(DeactivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result1804, plugin_version : result1805, parameters : array1808}}) + PublicOplogEntry::DeactivatePlugin(DeactivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result2504, plugin_version : result2505, parameters : array2508}}) } 26 => { @@ -28421,85 +42421,85 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 27 => { - let result1810 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2510 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - PublicOplogEntry::CancelPendingInvocation(CancelPendingInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, idempotency_key : result1810}) + PublicOplogEntry::CancelPendingInvocation(CancelPendingInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, idempotency_key : result2510}) } 28 => { - let result1811 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let lifted1813 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted2513 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result1812 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2512 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result1812) + Option::Some(result2512) } _ => panic() } - let lifted1815 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted2515 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1814 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2514 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1814) + Option::Some(result2514) } _ => panic() } - let array1819 : Array[@context.Attribute] = []; - for index1820 = 0; index1820 < (mbt_ffi_load32((iter_base) + 60)); index1820 = index1820 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1820 * 20) + let array2519 : Array[@context.Attribute] = []; + for index2520 = 0; index2520 < (mbt_ffi_load32((iter_base) + 60)); index2520 = index2520 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2520 * 20) - let result1816 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2516 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1818 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2518 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result1817 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2517 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result1817) + @context.AttributeValue::String(result2517) } _ => panic() } - array1819.push(@context.Attribute::{key : result1816, value : lifted1818}) + array2519.push(@context.Attribute::{key : result2516, value : lifted2518}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - PublicOplogEntry::StartSpan(StartSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result1811, parent : lifted1813, linked_context_id : lifted1815, attributes : array1819}) + PublicOplogEntry::StartSpan(StartSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result2511, parent : lifted2513, linked_context_id : lifted2515, attributes : array2519}) } 29 => { - let result1821 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2521 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - PublicOplogEntry::FinishSpan(FinishSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result1821}) + PublicOplogEntry::FinishSpan(FinishSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result2521}) } 30 => { - let result1822 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2522 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let result1823 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2523 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let lifted1825 = match (mbt_ffi_load8_u((iter_base) + 40)) { + let lifted2525 = match (mbt_ffi_load8_u((iter_base) + 40)) { 0 => { - let result1824 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2524 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - @context.AttributeValue::String(result1824) + @context.AttributeValue::String(result2524) } _ => panic() } - PublicOplogEntry::SetSpanAttribute(SetSpanAttributeParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result1822, key : result1823, value : lifted1825}) + PublicOplogEntry::SetSpanAttribute(SetSpanAttributeParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, span_id : result2522, key : result2523, value : lifted2525}) } 31 => { - let lifted1826 = match (mbt_ffi_load8_u((iter_base) + 24)) { + let lifted2526 = match (mbt_ffi_load8_u((iter_base) + 24)) { 0 => { @host.PersistenceLevel::PersistNothing @@ -28515,13 +42515,13 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - PublicOplogEntry::ChangePersistenceLevel(ChangePersistenceLevelParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, persistence_level : lifted1826}) + PublicOplogEntry::ChangePersistenceLevel(ChangePersistenceLevelParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, persistence_level : lifted2526}) } 32 => { - let result1827 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2527 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - PublicOplogEntry::BeginRemoteTransaction(BeginRemoteTransactionParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, transaction_id : result1827}) + PublicOplogEntry::BeginRemoteTransaction(BeginRemoteTransactionParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, transaction_id : result2527}) } 33 => { @@ -28541,53 +42541,53 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 37 => { - let result1828 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2528 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let result1829 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2529 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - PublicOplogEntry::Snapshot(SnapshotParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, data : SnapshotData::{data : result1828, mime_type : result1829}}) + PublicOplogEntry::Snapshot(SnapshotParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, data : SnapshotData::{data : result2528, mime_type : result2529}}) } 38 => { - let result1830 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2530 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - let result1831 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result2531 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - let array1834 : Array[(String, String)] = []; - for index1835 = 0; index1835 < (mbt_ffi_load32((iter_base) + 64)); index1835 = index1835 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index1835 * 16) + let array2534 : Array[(String, String)] = []; + for index2535 = 0; index2535 < (mbt_ffi_load32((iter_base) + 64)); index2535 = index2535 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index2535 * 16) - let result1832 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2532 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result1833 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array1834.push((result1832, result1833)) + array2534.push((result2532, result2533)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - let result1836 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) + let result2536 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) - PublicOplogEntry::OplogProcessorCheckpoint(OplogProcessorCheckpointParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result1830, plugin_version : result1831, parameters : array1834}, target_agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}}, agent_id : result1836}, confirmed_up_to : (mbt_ffi_load64((iter_base) + 96)).reinterpret_as_uint64(), sending_up_to : (mbt_ffi_load64((iter_base) + 104)).reinterpret_as_uint64(), last_batch_start : (mbt_ffi_load64((iter_base) + 112)).reinterpret_as_uint64()}) + PublicOplogEntry::OplogProcessorCheckpoint(OplogProcessorCheckpointParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 24)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 40), plugin_name : result2530, plugin_version : result2531, parameters : array2534}, target_agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 72)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64()}}, agent_id : result2536}, confirmed_up_to : (mbt_ffi_load64((iter_base) + 96)).reinterpret_as_uint64(), sending_up_to : (mbt_ffi_load64((iter_base) + 104)).reinterpret_as_uint64(), last_batch_start : (mbt_ffi_load64((iter_base) + 112)).reinterpret_as_uint64()}) } 39 => { - let result1837 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2537 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let array1869 : Array[@retry.PredicateNode] = []; - for index1870 = 0; index1870 < (mbt_ffi_load32((iter_base) + 40)); index1870 = index1870 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1870 * 32) + let array2569 : Array[@retry.PredicateNode] = []; + for index2570 = 0; index2570 < (mbt_ffi_load32((iter_base) + 40)); index2570 = index2570 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2570 * 32) - let lifted1868 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2568 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1838 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2538 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1840 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2540 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1839 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2539 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1839) + @retry.PredicateValue::Text(result2539) } 1 => { @@ -28600,18 +42600,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result1838, value : lifted1840}) + @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result2538, value : lifted2540}) } 1 => { - let result1841 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2541 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1843 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2543 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1842 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2542 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1842) + @retry.PredicateValue::Text(result2542) } 1 => { @@ -28624,18 +42624,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result1841, value : lifted1843}) + @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result2541, value : lifted2543}) } 2 => { - let result1844 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2544 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1846 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2546 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1845 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2545 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1845) + @retry.PredicateValue::Text(result2545) } 1 => { @@ -28648,18 +42648,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result1844, value : lifted1846}) + @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result2544, value : lifted2546}) } 3 => { - let result1847 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2547 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1849 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2549 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1848 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2548 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1848) + @retry.PredicateValue::Text(result2548) } 1 => { @@ -28672,18 +42672,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result1847, value : lifted1849}) + @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result2547, value : lifted2549}) } 4 => { - let result1850 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2550 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1852 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2552 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1851 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2551 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1851) + @retry.PredicateValue::Text(result2551) } 1 => { @@ -28696,18 +42696,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result1850, value : lifted1852}) + @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result2550, value : lifted2552}) } 5 => { - let result1853 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2553 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1855 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2555 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1854 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2554 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1854) + @retry.PredicateValue::Text(result2554) } 1 => { @@ -28720,28 +42720,28 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result1853, value : lifted1855}) + @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result2553, value : lifted2555}) } 6 => { - let result1856 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateNode::PropExists(result1856) + @retry.PredicateNode::PropExists(result2556) } 7 => { - let result1857 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2557 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1860 : Array[@retry.PredicateValue] = []; - for index1861 = 0; index1861 < (mbt_ffi_load32((iter_base) + 20)); index1861 = index1861 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1861 * 16) + let array2560 : Array[@retry.PredicateValue] = []; + for index2561 = 0; index2561 < (mbt_ffi_load32((iter_base) + 20)); index2561 = index2561 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2561 * 16) - let lifted1859 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2559 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1858 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2558 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateValue::Text(result1858) + @retry.PredicateValue::Text(result2558) } 1 => { @@ -28754,35 +42754,35 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1860.push(lifted1859) + array2560.push(lifted2559) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result1857, values : array1860}) + @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result2557, values : array2560}) } 8 => { - let result1862 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1863 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2563 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result1862, pattern : result1863}) + @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result2562, pattern : result2563}) } 9 => { - let result1864 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2564 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1865 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result1864, pattern : result1865}) + @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result2564, pattern : result2565}) } 10 => { - let result1866 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1867 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2567 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result1866, pattern : result1867}) + @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result2566, pattern : result2567}) } 11 => { @@ -28807,15 +42807,15 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1869.push(lifted1868) + array2569.push(lifted2568) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array1905 : Array[@retry.PolicyNode] = []; - for index1906 = 0; index1906 < (mbt_ffi_load32((iter_base) + 48)); index1906 = index1906 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index1906 * 32) + let array2605 : Array[@retry.PolicyNode] = []; + for index2606 = 0; index2606 < (mbt_ffi_load32((iter_base) + 48)); index2606 = index2606 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index2606 * 32) - let lifted1904 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2604 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @retry.PolicyNode::Periodic((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) @@ -28858,21 +42858,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { } 10 => { - let array1902 : Array[@retry.PredicateNode] = []; - for index1903 = 0; index1903 < (mbt_ffi_load32((iter_base) + 12)); index1903 = index1903 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1903 * 32) + let array2602 : Array[@retry.PredicateNode] = []; + for index2603 = 0; index2603 < (mbt_ffi_load32((iter_base) + 12)); index2603 = index2603 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2603 * 32) - let lifted1901 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2601 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1871 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2571 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1873 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2573 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1872 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2572 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1872) + @retry.PredicateValue::Text(result2572) } 1 => { @@ -28885,18 +42885,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result1871, value : lifted1873}) + @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result2571, value : lifted2573}) } 1 => { - let result1874 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2574 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1876 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2576 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1875 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2575 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1875) + @retry.PredicateValue::Text(result2575) } 1 => { @@ -28909,18 +42909,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result1874, value : lifted1876}) + @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result2574, value : lifted2576}) } 2 => { - let result1877 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2577 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1879 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2579 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1878 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2578 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1878) + @retry.PredicateValue::Text(result2578) } 1 => { @@ -28933,18 +42933,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result1877, value : lifted1879}) + @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result2577, value : lifted2579}) } 3 => { - let result1880 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2580 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1882 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2582 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1881 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2581 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1881) + @retry.PredicateValue::Text(result2581) } 1 => { @@ -28957,18 +42957,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result1880, value : lifted1882}) + @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result2580, value : lifted2582}) } 4 => { - let result1883 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1885 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2585 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1884 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2584 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1884) + @retry.PredicateValue::Text(result2584) } 1 => { @@ -28981,18 +42981,18 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result1883, value : lifted1885}) + @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result2583, value : lifted2585}) } 5 => { - let result1886 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2586 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1888 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2588 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1887 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2587 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1887) + @retry.PredicateValue::Text(result2587) } 1 => { @@ -29005,28 +43005,28 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result1886, value : lifted1888}) + @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result2586, value : lifted2588}) } 6 => { - let result1889 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2589 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateNode::PropExists(result1889) + @retry.PredicateNode::PropExists(result2589) } 7 => { - let result1890 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2590 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1893 : Array[@retry.PredicateValue] = []; - for index1894 = 0; index1894 < (mbt_ffi_load32((iter_base) + 20)); index1894 = index1894 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1894 * 16) + let array2593 : Array[@retry.PredicateValue] = []; + for index2594 = 0; index2594 < (mbt_ffi_load32((iter_base) + 20)); index2594 = index2594 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2594 * 16) - let lifted1892 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2592 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1891 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2591 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateValue::Text(result1891) + @retry.PredicateValue::Text(result2591) } 1 => { @@ -29039,35 +43039,35 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1893.push(lifted1892) + array2593.push(lifted2592) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result1890, values : array1893}) + @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result2590, values : array2593}) } 8 => { - let result1895 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2595 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1896 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2596 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result1895, pattern : result1896}) + @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result2595, pattern : result2596}) } 9 => { - let result1897 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2597 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1898 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2598 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result1897, pattern : result1898}) + @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result2597, pattern : result2598}) } 10 => { - let result1899 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2599 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1900 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2600 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result1899, pattern : result1900}) + @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result2599, pattern : result2600}) } 11 => { @@ -29092,11 +43092,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1902.push(lifted1901) + array2602.push(lifted2601) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @retry.PolicyNode::FilteredOn(@retry.FilteredConfig::{predicate : @retry.RetryPredicate::{nodes : array1902}, inner : mbt_ffi_load32((iter_base) + 16)}) + @retry.PolicyNode::FilteredOn(@retry.FilteredConfig::{predicate : @retry.RetryPredicate::{nodes : array2602}, inner : mbt_ffi_load32((iter_base) + 16)}) } 11 => { @@ -29113,21 +43113,21 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1905.push(lifted1904) + array2605.push(lifted2604) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) - PublicOplogEntry::SetRetryPolicy(SetRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, policy : @retry.NamedRetryPolicy::{name : result1837, priority : (mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint(), predicate : @retry.RetryPredicate::{nodes : array1869}, policy : @retry.RetryPolicy::{nodes : array1905}}}) + PublicOplogEntry::SetRetryPolicy(SetRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, policy : @retry.NamedRetryPolicy::{name : result2537, priority : (mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint(), predicate : @retry.RetryPredicate::{nodes : array2569}, policy : @retry.RetryPolicy::{nodes : array2605}}}) } 40 => { - let result1907 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2607 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - PublicOplogEntry::RemoveRetryPolicy(RemoveRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, name : result1907}) + PublicOplogEntry::RemoveRetryPolicy(RemoveRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, name : result2607}) } 41 => { - let lifted1908 = match (mbt_ffi_load8_u((iter_base) + 24)) { + let lifted2608 = match (mbt_ffi_load8_u((iter_base) + 24)) { 0 => { PublicQueuedCardEvent::Install(PublicQueuedCardEventCard::{card_id : @types.CardId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64()}}}) @@ -29139,11 +43139,11 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - PublicOplogEntry::CardEventQueued(CardEventQueuedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, event : lifted1908}) + PublicOplogEntry::CardEventQueued(CardEventQueuedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, event : lifted2608}) } 42 => { - let lifted1909 : UInt64? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2609 : UInt64? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { @@ -29152,7 +43152,7 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - PublicOplogEntry::CardInstalled(CardInstalledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, queued_event_index : lifted1909, card_id : @types.CardId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 48)).reinterpret_as_uint64()}}}) + PublicOplogEntry::CardInstalled(CardInstalledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}, queued_event_index : lifted2609, card_id : @types.CardId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 48)).reinterpret_as_uint64()}}}) } 43 => { @@ -29165,15 +43165,15 @@ pub fn GetOplog::get_next(self : GetOplog) -> Array[PublicOplogEntry]? { _ => panic() } - array1911.push(lifted1910) + array2611.push(lifted2610) } mbt_ffi_free(mbt_ffi_load32((return_area) + 4)) - Option::Some(array1911) + Option::Some(array2611) } _ => panic() } - let ret = lifted1913 + let ret = lifted2613 mbt_ffi_free(return_area) return ret @@ -29198,15 +43198,15 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn let return_area = mbt_ffi_malloc(12) wasmImportMethodSearchOplogGetNext(handle, return_area); - let lifted1913 : Array[(UInt64, PublicOplogEntry)]? = match mbt_ffi_load8_u((return_area) + 0) { + let lifted2613 : Array[(UInt64, PublicOplogEntry)]? = match mbt_ffi_load8_u((return_area) + 0) { 0 => Option::None 1 => { - let array1911 : Array[(UInt64, PublicOplogEntry)] = []; - for index1912 = 0; index1912 < (mbt_ffi_load32((return_area) + 8)); index1912 = index1912 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 4)) + (index1912 * 216) + let array2611 : Array[(UInt64, PublicOplogEntry)] = []; + for index2612 = 0; index2612 < (mbt_ffi_load32((return_area) + 8)); index2612 = index2612 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 4)) + (index2612 * 216) - let lifted1910 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2610 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) @@ -29258,9 +43258,9 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } mbt_ffi_free(mbt_ffi_load32((iter_base) + 160)) - let array179 : Array[LocalAgentConfigEntry] = []; - for index180 = 0; index180 < (mbt_ffi_load32((iter_base) + 172)); index180 = index180 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 168)) + (index180 * 40) + let array249 : Array[LocalAgentConfigEntry] = []; + for index250 = 0; index250 < (mbt_ffi_load32((iter_base) + 172)); index250 = index250 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 168)) + (index250 * 40) let array12 : Array[String] = []; for index13 = 0; index13 < (mbt_ffi_load32((iter_base) + 4)); index13 = index13 + 1 { @@ -29272,11 +43272,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - let array140 : Array[@types.SchemaTypeNode] = []; - for index141 = 0; index141 < (mbt_ffi_load32((iter_base) + 12)); index141 = index141 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index141 * 144) + let array210 : Array[@types.SchemaTypeNode] = []; + for index211 = 0; index211 < (mbt_ffi_load32((iter_base) + 12)); index211 = index211 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index211 * 144) - let lifted126 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted196 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -29287,43 +43287,743 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 2 => { - @types.SchemaTypeBody::S8Type + let lifted20 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted15 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted14 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted14) + } + _ => panic() + } + + let lifted17 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted16 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted16) + } + _ => panic() + } + + let lifted19 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result18 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result18) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted15, max : lifted17, unit : lifted19}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted20) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted27 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted22 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted21 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted21) + } + _ => panic() + } + + let lifted24 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted23 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted23) + } + _ => panic() + } + + let lifted26 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result25 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result25) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted22, max : lifted24, unit : lifted26}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted27) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted34 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted29 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted28 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted28) + } + _ => panic() + } + + let lifted31 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted30 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted30) + } + _ => panic() + } + + let lifted33 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result32 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result32) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted29, max : lifted31, unit : lifted33}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted34) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted41 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted36 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted35 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted35) + } + _ => panic() + } + + let lifted38 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted37 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted37) + } + _ => panic() + } + + let lifted40 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result39 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result39) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted36, max : lifted38, unit : lifted40}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted41) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted48 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted43 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted42 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted42) + } + _ => panic() + } + + let lifted45 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted44 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted44) + } + _ => panic() + } + + let lifted47 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result46 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result46) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted43, max : lifted45, unit : lifted47}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted48) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted55 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted50 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted49 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted49) + } + _ => panic() + } + + let lifted52 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted51 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted51) + } + _ => panic() + } + + let lifted54 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result53 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result53) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted50, max : lifted52, unit : lifted54}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted55) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted62 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted57 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted56 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted56) + } + _ => panic() + } + + let lifted59 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted58 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted58) + } + _ => panic() + } + + let lifted61 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result60 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result60) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted57, max : lifted59, unit : lifted61}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted62) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted69 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted64 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted63 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted63) + } + _ => panic() + } + + let lifted66 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted65 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted65) + } + _ => panic() + } + + let lifted68 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result67 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result67) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted64, max : lifted66, unit : lifted68}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted69) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted76 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted71 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted70 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted70) + } + _ => panic() + } + + let lifted73 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted72 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted72) + } + _ => panic() + } + + let lifted75 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result74 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result74) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted71, max : lifted73, unit : lifted75}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted76) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted83 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted78 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted77 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted77) + } + _ => panic() + } + + let lifted80 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted79 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted79) + } + _ => panic() + } + + let lifted82 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result81) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted78, max : lifted80, unit : lifted82}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted83) } 12 => { @@ -29335,59 +44035,59 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 14 => { - let array28 : Array[@types.NamedFieldType] = []; - for index29 = 0; index29 < (mbt_ffi_load32((iter_base) + 12)); index29 = index29 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index29 * 68) + let array98 : Array[@types.NamedFieldType] = []; + for index99 = 0; index99 < (mbt_ffi_load32((iter_base) + 12)); index99 = index99 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index99 * 68) - let result14 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result84 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted16 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted86 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result15 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result15) + Option::Some(result85) } _ => panic() } - let array18 : Array[String] = []; - for index19 = 0; index19 < (mbt_ffi_load32((iter_base) + 28)); index19 = index19 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index19 * 8) + let array88 : Array[String] = []; + for index89 = 0; index89 < (mbt_ffi_load32((iter_base) + 28)); index89 = index89 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index89 * 8) - let result17 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array18.push(result17) + array88.push(result87) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array21 : Array[String] = []; - for index22 = 0; index22 < (mbt_ffi_load32((iter_base) + 36)); index22 = index22 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index22 * 8) + let array91 : Array[String] = []; + for index92 = 0; index92 < (mbt_ffi_load32((iter_base) + 36)); index92 = index92 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index92 * 8) - let result20 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array21.push(result20) + array91.push(result90) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted24 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted94 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result23 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result23) + Option::Some(result93) } _ => panic() } - let lifted27 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted97 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted26 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted96 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -29402,33 +44102,33 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result25 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result95 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result25) + @types.Role::Other(result95) } _ => panic() } - Option::Some(lifted26) + Option::Some(lifted96) } _ => panic() } - array28.push(@types.NamedFieldType::{name : result14, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted16, aliases : array18, examples : array21, deprecated : lifted24, role : lifted27}}) + array98.push(@types.NamedFieldType::{name : result84, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted86, aliases : array88, examples : array91, deprecated : lifted94, role : lifted97}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array28) + @types.SchemaTypeBody::RecordType(array98) } 15 => { - let array45 : Array[@types.VariantCaseType] = []; - for index46 = 0; index46 < (mbt_ffi_load32((iter_base) + 12)); index46 = index46 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index46 * 72) + let array115 : Array[@types.VariantCaseType] = []; + for index116 = 0; index116 < (mbt_ffi_load32((iter_base) + 12)); index116 = index116 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index116 * 72) - let result30 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted31 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted101 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -29437,53 +44137,53 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted33 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted103 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result32 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result102 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result32) + Option::Some(result102) } _ => panic() } - let array35 : Array[String] = []; - for index36 = 0; index36 < (mbt_ffi_load32((iter_base) + 32)); index36 = index36 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index36 * 8) + let array105 : Array[String] = []; + for index106 = 0; index106 < (mbt_ffi_load32((iter_base) + 32)); index106 = index106 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index106 * 8) - let result34 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result104 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array35.push(result34) + array105.push(result104) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array38 : Array[String] = []; - for index39 = 0; index39 < (mbt_ffi_load32((iter_base) + 40)); index39 = index39 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index39 * 8) + let array108 : Array[String] = []; + for index109 = 0; index109 < (mbt_ffi_load32((iter_base) + 40)); index109 = index109 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index109 * 8) - let result37 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array38.push(result37) + array108.push(result107) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted41 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted111 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result40 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result40) + Option::Some(result110) } _ => panic() } - let lifted44 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted114 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted43 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted113 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -29498,63 +44198,63 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result42 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result42) + @types.Role::Other(result112) } _ => panic() } - Option::Some(lifted43) + Option::Some(lifted113) } _ => panic() } - array45.push(@types.VariantCaseType::{name : result30, payload : lifted31, metadata : @types.MetadataEnvelope::{doc : lifted33, aliases : array35, examples : array38, deprecated : lifted41, role : lifted44}}) + array115.push(@types.VariantCaseType::{name : result100, payload : lifted101, metadata : @types.MetadataEnvelope::{doc : lifted103, aliases : array105, examples : array108, deprecated : lifted111, role : lifted114}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array45) + @types.SchemaTypeBody::VariantType(array115) } 16 => { - let array48 : Array[String] = []; - for index49 = 0; index49 < (mbt_ffi_load32((iter_base) + 12)); index49 = index49 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index49 * 8) + let array118 : Array[String] = []; + for index119 = 0; index119 < (mbt_ffi_load32((iter_base) + 12)); index119 = index119 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index119 * 8) - let result47 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array48.push(result47) + array118.push(result117) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array48) + @types.SchemaTypeBody::EnumType(array118) } 17 => { - let array51 : Array[String] = []; - for index52 = 0; index52 < (mbt_ffi_load32((iter_base) + 12)); index52 = index52 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index52 * 8) + let array121 : Array[String] = []; + for index122 = 0; index122 < (mbt_ffi_load32((iter_base) + 12)); index122 = index122 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index122 * 8) - let result50 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array51.push(result50) + array121.push(result120) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array51) + @types.SchemaTypeBody::FlagsType(array121) } 18 => { - let array53 : Array[Int] = []; - for index54 = 0; index54 < (mbt_ffi_load32((iter_base) + 12)); index54 = index54 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index54 * 4) + let array123 : Array[Int] = []; + for index124 = 0; index124 < (mbt_ffi_load32((iter_base) + 12)); index124 = index124 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index124 * 4) - array53.push(mbt_ffi_load32((iter_base) + 0)) + array123.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array53) + @types.SchemaTypeBody::TupleType(array123) } 19 => { @@ -29574,7 +44274,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 23 => { - let lifted55 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted125 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -29583,7 +44283,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted56 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted126 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -29592,30 +44292,30 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted55, err : lifted56}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted125, err : lifted126}) } 24 => { - let lifted60 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted130 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array58 : Array[String] = []; - for index59 = 0; index59 < (mbt_ffi_load32((iter_base) + 16)); index59 = index59 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index59 * 8) + let array128 : Array[String] = []; + for index129 = 0; index129 < (mbt_ffi_load32((iter_base) + 16)); index129 = index129 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index129 * 8) - let result57 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array58.push(result57) + array128.push(result127) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array58) + Option::Some(array128) } _ => panic() } - let lifted61 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted131 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -29624,7 +44324,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted62 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted132 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -29633,41 +44333,41 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted64 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted134 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result63 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result133 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result63) + Option::Some(result133) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted60, min_length : lifted61, max_length : lifted62, regex : lifted64}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted130, min_length : lifted131, max_length : lifted132, regex : lifted134}) } 25 => { - let lifted68 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted138 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array66 : Array[String] = []; - for index67 = 0; index67 < (mbt_ffi_load32((iter_base) + 16)); index67 = index67 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index67 * 8) + let array136 : Array[String] = []; + for index137 = 0; index137 < (mbt_ffi_load32((iter_base) + 16)); index137 = index137 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index137 * 8) - let result65 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array66.push(result65) + array136.push(result135) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array66) + Option::Some(array136) } _ => panic() } - let lifted69 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted139 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -29676,7 +44376,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted70 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted140 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -29685,91 +44385,91 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted68, min_bytes : lifted69, max_bytes : lifted70}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted138, min_bytes : lifted139, max_bytes : lifted140}) } 26 => { - let lifted74 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted144 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array72 : Array[String] = []; - for index73 = 0; index73 < (mbt_ffi_load32((iter_base) + 20)); index73 = index73 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index73 * 8) + let array142 : Array[String] = []; + for index143 = 0; index143 < (mbt_ffi_load32((iter_base) + 20)); index143 = index143 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index143 * 8) - let result71 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array72.push(result71) + array142.push(result141) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array72) + Option::Some(array142) } _ => panic() } - let lifted78 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted148 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array76 : Array[String] = []; - for index77 = 0; index77 < (mbt_ffi_load32((iter_base) + 32)); index77 = index77 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index77 * 8) + let array146 : Array[String] = []; + for index147 = 0; index147 < (mbt_ffi_load32((iter_base) + 32)); index147 = index147 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index147 * 8) - let result75 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result145 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array76.push(result75) + array146.push(result145) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array76) + Option::Some(array146) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted74, allowed_extensions : lifted78}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted144, allowed_extensions : lifted148}) } 27 => { - let lifted82 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted152 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array80 : Array[String] = []; - for index81 = 0; index81 < (mbt_ffi_load32((iter_base) + 16)); index81 = index81 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index81 * 8) + let array150 : Array[String] = []; + for index151 = 0; index151 < (mbt_ffi_load32((iter_base) + 16)); index151 = index151 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index151 * 8) - let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array80.push(result79) + array150.push(result149) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array80) + Option::Some(array150) } _ => panic() } - let lifted86 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted156 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array84 : Array[String] = []; - for index85 = 0; index85 < (mbt_ffi_load32((iter_base) + 28)); index85 = index85 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index85 * 8) + let array154 : Array[String] = []; + for index155 = 0; index155 < (mbt_ffi_load32((iter_base) + 28)); index155 = index155 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index155 * 8) - let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array84.push(result83) + array154.push(result153) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array84) + Option::Some(array154) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted82, allowed_hosts : lifted86}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted152, allowed_hosts : lifted156}) } 28 => { @@ -29781,148 +44481,148 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 30 => { - let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array89 : Array[String] = []; - for index90 = 0; index90 < (mbt_ffi_load32((iter_base) + 20)); index90 = index90 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index90 * 8) + let array159 : Array[String] = []; + for index160 = 0; index160 < (mbt_ffi_load32((iter_base) + 20)); index160 = index160 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index160 * 8) - let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array89.push(result88) + array159.push(result158) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted92 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted162 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result91 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result161 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result91}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result161}) } _ => panic() } - let lifted94 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted164 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result163 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result93}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result163}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result87, allowed_suffixes : array89, min : lifted92, max : lifted94}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result157, allowed_suffixes : array159, min : lifted162, max : lifted164}) } 31 => { - let array118 : Array[@types.UnionBranch] = []; - for index119 = 0; index119 < (mbt_ffi_load32((iter_base) + 12)); index119 = index119 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index119 * 92) + let array188 : Array[@types.UnionBranch] = []; + for index189 = 0; index189 < (mbt_ffi_load32((iter_base) + 12)); index189 = index189 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index189 * 92) - let result95 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted104 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted174 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result96 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result96) + @types.DiscriminatorRule::Prefix(result166) } 1 => { - let result97 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result167 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result97) + @types.DiscriminatorRule::Suffix(result167) } 2 => { - let result98 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result98) + @types.DiscriminatorRule::Contains(result168) } 3 => { - let result99 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result99) + @types.DiscriminatorRule::Regex(result169) } 4 => { - let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted102 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted172 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result101 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result171 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result101) + Option::Some(result171) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result100, literal : lifted102}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result170, literal : lifted172}) } 5 => { - let result103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result103) + @types.DiscriminatorRule::FieldAbsent(result173) } _ => panic() } - let lifted106 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted176 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result105) + Option::Some(result175) } _ => panic() } - let array108 : Array[String] = []; - for index109 = 0; index109 < (mbt_ffi_load32((iter_base) + 52)); index109 = index109 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index109 * 8) + let array178 : Array[String] = []; + for index179 = 0; index179 < (mbt_ffi_load32((iter_base) + 52)); index179 = index179 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index179 * 8) - let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array108.push(result107) + array178.push(result177) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array111 : Array[String] = []; - for index112 = 0; index112 < (mbt_ffi_load32((iter_base) + 60)); index112 = index112 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index112 * 8) + let array181 : Array[String] = []; + for index182 = 0; index182 < (mbt_ffi_load32((iter_base) + 60)); index182 = index182 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index182 * 8) - let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array111.push(result110) + array181.push(result180) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted114 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted184 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result113) + Option::Some(result183) } _ => panic() } - let lifted117 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted187 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted116 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted186 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -29937,57 +44637,57 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result115) + @types.Role::Other(result185) } _ => panic() } - Option::Some(lifted116) + Option::Some(lifted186) } _ => panic() } - array118.push(@types.UnionBranch::{tag : result95, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted104, metadata : @types.MetadataEnvelope::{doc : lifted106, aliases : array108, examples : array111, deprecated : lifted114, role : lifted117}}) + array188.push(@types.UnionBranch::{tag : result165, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted174, metadata : @types.MetadataEnvelope::{doc : lifted176, aliases : array178, examples : array181, deprecated : lifted184, role : lifted187}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array118}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array188}) } 32 => { - let lifted121 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted191 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result120) + Option::Some(result190) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted121}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted191}) } 33 => { - let lifted123 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted193 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result122 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result122) + Option::Some(result192) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted123}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted193}) } 34 => { - let lifted124 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted194 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -29996,11 +44696,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::FutureType(lifted124) + @types.SchemaTypeBody::FutureType(lifted194) } 35 => { - let lifted125 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted195 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -30009,58 +44709,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::StreamType(lifted125) + @types.SchemaTypeBody::StreamType(lifted195) } _ => panic() } - let lifted128 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted198 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result127) + Option::Some(result197) } _ => panic() } - let array130 : Array[String] = []; - for index131 = 0; index131 < (mbt_ffi_load32((iter_base) + 104)); index131 = index131 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index131 * 8) + let array200 : Array[String] = []; + for index201 = 0; index201 < (mbt_ffi_load32((iter_base) + 104)); index201 = index201 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index201 * 8) - let result129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result199 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array130.push(result129) + array200.push(result199) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array133 : Array[String] = []; - for index134 = 0; index134 < (mbt_ffi_load32((iter_base) + 112)); index134 = index134 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index134 * 8) + let array203 : Array[String] = []; + for index204 = 0; index204 < (mbt_ffi_load32((iter_base) + 112)); index204 = index204 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index204 * 8) - let result132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array133.push(result132) + array203.push(result202) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted136 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted206 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result135) + Option::Some(result205) } _ => panic() } - let lifted139 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted209 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted138 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted208 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -30075,48 +44775,48 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result137) + @types.Role::Other(result207) } _ => panic() } - Option::Some(lifted138) + Option::Some(lifted208) } _ => panic() } - array140.push(@types.SchemaTypeNode::{body : lifted126, metadata : @types.MetadataEnvelope::{doc : lifted128, aliases : array130, examples : array133, deprecated : lifted136, role : lifted139}}) + array210.push(@types.SchemaTypeNode::{body : lifted196, metadata : @types.MetadataEnvelope::{doc : lifted198, aliases : array200, examples : array203, deprecated : lifted206, role : lifted209}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array145 : Array[@types.SchemaTypeDef] = []; - for index146 = 0; index146 < (mbt_ffi_load32((iter_base) + 20)); index146 = index146 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index146 * 24) + let array215 : Array[@types.SchemaTypeDef] = []; + for index216 = 0; index216 < (mbt_ffi_load32((iter_base) + 20)); index216 = index216 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index216 * 24) - let result142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result212 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted144 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted214 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result143) + Option::Some(result213) } _ => panic() } - array145.push(@types.SchemaTypeDef::{id : result142, name : lifted144, body : mbt_ffi_load32((iter_base) + 20)}) + array215.push(@types.SchemaTypeDef::{id : result212, name : lifted214, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let array177 : Array[@types.SchemaValueNode] = []; - for index178 = 0; index178 < (mbt_ffi_load32((iter_base) + 32)); index178 = index178 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index178 * 32) + let array247 : Array[@types.SchemaValueNode] = []; + for index248 = 0; index248 < (mbt_ffi_load32((iter_base) + 32)); index248 = index248 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index248 * 32) - let lifted176 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted246 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -30167,25 +44867,25 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 12 => { - let result147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result147) + @types.SchemaValueNode::StringValue(result217) } 13 => { - let array148 : Array[Int] = []; - for index149 = 0; index149 < (mbt_ffi_load32((iter_base) + 12)); index149 = index149 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index149 * 4) + let array218 : Array[Int] = []; + for index219 = 0; index219 < (mbt_ffi_load32((iter_base) + 12)); index219 = index219 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index219 * 4) - array148.push(mbt_ffi_load32((iter_base) + 0)) + array218.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array148) + @types.SchemaValueNode::RecordValue(array218) } 14 => { - let lifted150 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted220 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -30194,7 +44894,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted150}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted220}) } 15 => { @@ -30202,67 +44902,67 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 16 => { - let array151 : Array[Bool] = []; - for index152 = 0; index152 < (mbt_ffi_load32((iter_base) + 12)); index152 = index152 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index152 * 1) + let array221 : Array[Bool] = []; + for index222 = 0; index222 < (mbt_ffi_load32((iter_base) + 12)); index222 = index222 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index222 * 1) - array151.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array221.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array151) + @types.SchemaValueNode::FlagsValue(array221) } 17 => { - let array153 : Array[Int] = []; - for index154 = 0; index154 < (mbt_ffi_load32((iter_base) + 12)); index154 = index154 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index154 * 4) + let array223 : Array[Int] = []; + for index224 = 0; index224 < (mbt_ffi_load32((iter_base) + 12)); index224 = index224 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index224 * 4) - array153.push(mbt_ffi_load32((iter_base) + 0)) + array223.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array153) + @types.SchemaValueNode::TupleValue(array223) } 18 => { - let array155 : Array[Int] = []; - for index156 = 0; index156 < (mbt_ffi_load32((iter_base) + 12)); index156 = index156 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index156 * 4) + let array225 : Array[Int] = []; + for index226 = 0; index226 < (mbt_ffi_load32((iter_base) + 12)); index226 = index226 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index226 * 4) - array155.push(mbt_ffi_load32((iter_base) + 0)) + array225.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array155) + @types.SchemaValueNode::ListValue(array225) } 19 => { - let array157 : Array[Int] = []; - for index158 = 0; index158 < (mbt_ffi_load32((iter_base) + 12)); index158 = index158 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index158 * 4) + let array227 : Array[Int] = []; + for index228 = 0; index228 < (mbt_ffi_load32((iter_base) + 12)); index228 = index228 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index228 * 4) - array157.push(mbt_ffi_load32((iter_base) + 0)) + array227.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array157) + @types.SchemaValueNode::FixedListValue(array227) } 20 => { - let array159 : Array[@types.MapEntry] = []; - for index160 = 0; index160 < (mbt_ffi_load32((iter_base) + 12)); index160 = index160 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index160 * 8) + let array229 : Array[@types.MapEntry] = []; + for index230 = 0; index230 < (mbt_ffi_load32((iter_base) + 12)); index230 = index230 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index230 * 8) - array159.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array229.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array159) + @types.SchemaValueNode::MapValue(array229) } 21 => { - let lifted161 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted231 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -30271,14 +44971,14 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::OptionValue(lifted161) + @types.SchemaValueNode::OptionValue(lifted231) } 22 => { - let lifted164 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted234 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted162 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted232 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -30287,11 +44987,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::OkValue(lifted162) + @types.ResultValuePayload::OkValue(lifted232) } 1 => { - let lifted163 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted233 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -30300,58 +45000,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::ErrValue(lifted163) + @types.ResultValuePayload::ErrValue(lifted233) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted164) + @types.SchemaValueNode::ResultValue(lifted234) } 23 => { - let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted167 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted237 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result166) + Option::Some(result236) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result165, language : lifted167}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result235, language : lifted237}) } 24 => { - let result168 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result238 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted170 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted240 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result239 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result169) + Option::Some(result239) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result168, mime_type : lifted170}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result238, mime_type : lifted240}) } 25 => { - let result171 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result171) + @types.SchemaValueNode::PathValue(result241) } 26 => { - let result172 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result242 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result172) + @types.SchemaValueNode::UrlValue(result242) } 27 => { @@ -30363,21 +45063,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 29 => { - let result173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result173}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result243}) } 30 => { - let result174 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result244 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result174, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result244, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result245 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result175}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result245}) } 32 => { @@ -30386,15 +45086,15 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array177.push(lifted176) + array247.push(lifted246) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - array179.push(LocalAgentConfigEntry::{path : array12, value : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array140, defs : array145, root : mbt_ffi_load32((iter_base) + 24)}, value : @types.SchemaValueTree::{value_nodes : array177, root : mbt_ffi_load32((iter_base) + 36)}}}) + array249.push(LocalAgentConfigEntry::{path : array12, value : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array210, defs : array215, root : mbt_ffi_load32((iter_base) + 24)}, value : @types.SchemaValueTree::{value_nodes : array247, root : mbt_ffi_load32((iter_base) + 36)}}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 168)) - let lifted181 : @types.Uuid? = match mbt_ffi_load8_u((iter_base) + 176) { + let lifted251 : @types.Uuid? = match mbt_ffi_load8_u((iter_base) + 176) { 0 => Option::None 1 => { @@ -30403,11 +45103,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - PublicOplogEntry::Create(CreateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64()}}, agent_id : result}, agent_mode : AgentMode::from(mbt_ffi_load8_u((iter_base) + 56)), component_revision : (mbt_ffi_load64((iter_base) + 64)).reinterpret_as_uint64(), env : array, created_by : @types.AccountId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 88)).reinterpret_as_uint64()}}, environment_id : @host.EnvironmentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 96)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 104)).reinterpret_as_uint64()}}, parent : lifted, component_size : (mbt_ffi_load64((iter_base) + 144)).reinterpret_as_uint64(), initial_total_linear_memory_size : (mbt_ffi_load64((iter_base) + 152)).reinterpret_as_uint64(), initial_active_plugins : array9, local_agent_config : array179, original_phantom_id : lifted181, instance_id : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 200)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 208)).reinterpret_as_uint64()}}) + PublicOplogEntry::Create(CreateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64()}}, agent_id : result}, agent_mode : AgentMode::from(mbt_ffi_load8_u((iter_base) + 56)), component_revision : (mbt_ffi_load64((iter_base) + 64)).reinterpret_as_uint64(), env : array, created_by : @types.AccountId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 88)).reinterpret_as_uint64()}}, environment_id : @host.EnvironmentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 96)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 104)).reinterpret_as_uint64()}}, parent : lifted, component_size : (mbt_ffi_load64((iter_base) + 144)).reinterpret_as_uint64(), initial_total_linear_memory_size : (mbt_ffi_load64((iter_base) + 152)).reinterpret_as_uint64(), initial_active_plugins : array9, local_agent_config : array249, original_phantom_id : lifted251, instance_id : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 200)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 208)).reinterpret_as_uint64()}}) } 1 => { - let lifted182 : UInt64? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted252 : UInt64? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { @@ -30416,17 +45116,17 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - let lifted349 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted489 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let array310 : Array[@types.SchemaTypeNode] = []; - for index311 = 0; index311 < (mbt_ffi_load32((iter_base) + 64)); index311 = index311 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index311 * 144) + let array450 : Array[@types.SchemaTypeNode] = []; + for index451 = 0; index451 < (mbt_ffi_load32((iter_base) + 64)); index451 = index451 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 60)) + (index451 * 144) - let lifted296 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted436 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -30437,43 +45137,743 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 2 => { - @types.SchemaTypeBody::S8Type + let lifted260 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted255 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted254 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted254) + } + _ => panic() + } + + let lifted257 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted256 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted256) + } + _ => panic() + } + + let lifted259 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result258) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted255, max : lifted257, unit : lifted259}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted260) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted267 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted262 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted261 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted261) + } + _ => panic() + } + + let lifted264 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted263 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted263) + } + _ => panic() + } + + let lifted266 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result265) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted262, max : lifted264, unit : lifted266}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted267) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted274 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted269 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted268 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted268) + } + _ => panic() + } + + let lifted271 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted270 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted270) + } + _ => panic() + } + + let lifted273 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result272 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result272) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted269, max : lifted271, unit : lifted273}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted274) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted281 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted276 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted275 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted275) + } + _ => panic() + } + + let lifted278 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted277 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted277) + } + _ => panic() + } + + let lifted280 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result279 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result279) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted276, max : lifted278, unit : lifted280}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted281) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted288 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted283 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted282 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted282) + } + _ => panic() + } + + let lifted285 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted284 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted284) + } + _ => panic() + } + + let lifted287 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result286 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result286) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted283, max : lifted285, unit : lifted287}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted288) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted295 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted290 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted289 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted289) + } + _ => panic() + } + + let lifted292 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted291 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted291) + } + _ => panic() + } + + let lifted294 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result293 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result293) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted290, max : lifted292, unit : lifted294}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted295) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted302 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted297 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted296 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted296) + } + _ => panic() + } + + let lifted299 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted298 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted298) + } + _ => panic() + } + + let lifted301 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result300) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted297, max : lifted299, unit : lifted301}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted302) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted309 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted304 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted303 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted303) + } + _ => panic() + } + + let lifted306 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted305 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted305) + } + _ => panic() + } + + let lifted308 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result307) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted304, max : lifted306, unit : lifted308}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted309) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted316 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted311 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted310 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted310) + } + _ => panic() + } + + let lifted313 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted312 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted312) + } + _ => panic() + } + + let lifted315 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result314 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result314) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted311, max : lifted313, unit : lifted315}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted316) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted323 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted318 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted317 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted317) + } + _ => panic() + } + + let lifted320 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted319 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted319) + } + _ => panic() + } + + let lifted322 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result321 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result321) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted318, max : lifted320, unit : lifted322}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted323) } 12 => { @@ -30485,59 +45885,59 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 14 => { - let array198 : Array[@types.NamedFieldType] = []; - for index199 = 0; index199 < (mbt_ffi_load32((iter_base) + 12)); index199 = index199 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index199 * 68) + let array338 : Array[@types.NamedFieldType] = []; + for index339 = 0; index339 < (mbt_ffi_load32((iter_base) + 12)); index339 = index339 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index339 * 68) - let result184 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result324 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted186 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted326 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result185) + Option::Some(result325) } _ => panic() } - let array188 : Array[String] = []; - for index189 = 0; index189 < (mbt_ffi_load32((iter_base) + 28)); index189 = index189 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index189 * 8) + let array328 : Array[String] = []; + for index329 = 0; index329 < (mbt_ffi_load32((iter_base) + 28)); index329 = index329 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index329 * 8) - let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result327 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array188.push(result187) + array328.push(result327) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array191 : Array[String] = []; - for index192 = 0; index192 < (mbt_ffi_load32((iter_base) + 36)); index192 = index192 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index192 * 8) + let array331 : Array[String] = []; + for index332 = 0; index332 < (mbt_ffi_load32((iter_base) + 36)); index332 = index332 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index332 * 8) - let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result330 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array191.push(result190) + array331.push(result330) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted194 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted334 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result333 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result193) + Option::Some(result333) } _ => panic() } - let lifted197 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted337 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted196 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted336 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -30552,33 +45952,33 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result195) + @types.Role::Other(result335) } _ => panic() } - Option::Some(lifted196) + Option::Some(lifted336) } _ => panic() } - array198.push(@types.NamedFieldType::{name : result184, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted186, aliases : array188, examples : array191, deprecated : lifted194, role : lifted197}}) + array338.push(@types.NamedFieldType::{name : result324, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted326, aliases : array328, examples : array331, deprecated : lifted334, role : lifted337}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array198) + @types.SchemaTypeBody::RecordType(array338) } 15 => { - let array215 : Array[@types.VariantCaseType] = []; - for index216 = 0; index216 < (mbt_ffi_load32((iter_base) + 12)); index216 = index216 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index216 * 72) + let array355 : Array[@types.VariantCaseType] = []; + for index356 = 0; index356 < (mbt_ffi_load32((iter_base) + 12)); index356 = index356 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index356 * 72) - let result200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result340 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted201 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted341 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -30587,53 +45987,53 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted203 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted343 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result202) + Option::Some(result342) } _ => panic() } - let array205 : Array[String] = []; - for index206 = 0; index206 < (mbt_ffi_load32((iter_base) + 32)); index206 = index206 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index206 * 8) + let array345 : Array[String] = []; + for index346 = 0; index346 < (mbt_ffi_load32((iter_base) + 32)); index346 = index346 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index346 * 8) - let result204 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array205.push(result204) + array345.push(result344) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array208 : Array[String] = []; - for index209 = 0; index209 < (mbt_ffi_load32((iter_base) + 40)); index209 = index209 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index209 * 8) + let array348 : Array[String] = []; + for index349 = 0; index349 < (mbt_ffi_load32((iter_base) + 40)); index349 = index349 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index349 * 8) - let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array208.push(result207) + array348.push(result347) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted211 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted351 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result210 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result350 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result210) + Option::Some(result350) } _ => panic() } - let lifted214 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted354 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted213 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted353 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -30648,63 +46048,63 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result212 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result352 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result212) + @types.Role::Other(result352) } _ => panic() } - Option::Some(lifted213) + Option::Some(lifted353) } _ => panic() } - array215.push(@types.VariantCaseType::{name : result200, payload : lifted201, metadata : @types.MetadataEnvelope::{doc : lifted203, aliases : array205, examples : array208, deprecated : lifted211, role : lifted214}}) + array355.push(@types.VariantCaseType::{name : result340, payload : lifted341, metadata : @types.MetadataEnvelope::{doc : lifted343, aliases : array345, examples : array348, deprecated : lifted351, role : lifted354}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array215) + @types.SchemaTypeBody::VariantType(array355) } 16 => { - let array218 : Array[String] = []; - for index219 = 0; index219 < (mbt_ffi_load32((iter_base) + 12)); index219 = index219 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index219 * 8) + let array358 : Array[String] = []; + for index359 = 0; index359 < (mbt_ffi_load32((iter_base) + 12)); index359 = index359 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index359 * 8) - let result217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result357 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array218.push(result217) + array358.push(result357) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array218) + @types.SchemaTypeBody::EnumType(array358) } 17 => { - let array221 : Array[String] = []; - for index222 = 0; index222 < (mbt_ffi_load32((iter_base) + 12)); index222 = index222 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index222 * 8) + let array361 : Array[String] = []; + for index362 = 0; index362 < (mbt_ffi_load32((iter_base) + 12)); index362 = index362 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index362 * 8) - let result220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result360 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array221.push(result220) + array361.push(result360) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array221) + @types.SchemaTypeBody::FlagsType(array361) } 18 => { - let array223 : Array[Int] = []; - for index224 = 0; index224 < (mbt_ffi_load32((iter_base) + 12)); index224 = index224 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index224 * 4) + let array363 : Array[Int] = []; + for index364 = 0; index364 < (mbt_ffi_load32((iter_base) + 12)); index364 = index364 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index364 * 4) - array223.push(mbt_ffi_load32((iter_base) + 0)) + array363.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array223) + @types.SchemaTypeBody::TupleType(array363) } 19 => { @@ -30724,7 +46124,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 23 => { - let lifted225 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted365 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -30733,7 +46133,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted226 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted366 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -30742,30 +46142,30 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted225, err : lifted226}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted365, err : lifted366}) } 24 => { - let lifted230 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted370 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array228 : Array[String] = []; - for index229 = 0; index229 < (mbt_ffi_load32((iter_base) + 16)); index229 = index229 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index229 * 8) + let array368 : Array[String] = []; + for index369 = 0; index369 < (mbt_ffi_load32((iter_base) + 16)); index369 = index369 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index369 * 8) - let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result367 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array228.push(result227) + array368.push(result367) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array228) + Option::Some(array368) } _ => panic() } - let lifted231 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted371 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -30774,7 +46174,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted232 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted372 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -30783,41 +46183,41 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted234 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted374 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result233) + Option::Some(result373) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted230, min_length : lifted231, max_length : lifted232, regex : lifted234}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted370, min_length : lifted371, max_length : lifted372, regex : lifted374}) } 25 => { - let lifted238 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted378 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array236 : Array[String] = []; - for index237 = 0; index237 < (mbt_ffi_load32((iter_base) + 16)); index237 = index237 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index237 * 8) + let array376 : Array[String] = []; + for index377 = 0; index377 < (mbt_ffi_load32((iter_base) + 16)); index377 = index377 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index377 * 8) - let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array236.push(result235) + array376.push(result375) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array236) + Option::Some(array376) } _ => panic() } - let lifted239 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted379 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -30826,7 +46226,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted240 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted380 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -30835,91 +46235,91 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted238, min_bytes : lifted239, max_bytes : lifted240}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted378, min_bytes : lifted379, max_bytes : lifted380}) } 26 => { - let lifted244 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted384 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array242 : Array[String] = []; - for index243 = 0; index243 < (mbt_ffi_load32((iter_base) + 20)); index243 = index243 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index243 * 8) + let array382 : Array[String] = []; + for index383 = 0; index383 < (mbt_ffi_load32((iter_base) + 20)); index383 = index383 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index383 * 8) - let result241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result381 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array242.push(result241) + array382.push(result381) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array242) + Option::Some(array382) } _ => panic() } - let lifted248 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted388 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array246 : Array[String] = []; - for index247 = 0; index247 < (mbt_ffi_load32((iter_base) + 32)); index247 = index247 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index247 * 8) + let array386 : Array[String] = []; + for index387 = 0; index387 < (mbt_ffi_load32((iter_base) + 32)); index387 = index387 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index387 * 8) - let result245 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result385 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array246.push(result245) + array386.push(result385) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array246) + Option::Some(array386) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted244, allowed_extensions : lifted248}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted384, allowed_extensions : lifted388}) } 27 => { - let lifted252 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted392 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array250 : Array[String] = []; - for index251 = 0; index251 < (mbt_ffi_load32((iter_base) + 16)); index251 = index251 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index251 * 8) + let array390 : Array[String] = []; + for index391 = 0; index391 < (mbt_ffi_load32((iter_base) + 16)); index391 = index391 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index391 * 8) - let result249 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result389 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array250.push(result249) + array390.push(result389) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array250) + Option::Some(array390) } _ => panic() } - let lifted256 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted396 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array254 : Array[String] = []; - for index255 = 0; index255 < (mbt_ffi_load32((iter_base) + 28)); index255 = index255 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index255 * 8) + let array394 : Array[String] = []; + for index395 = 0; index395 < (mbt_ffi_load32((iter_base) + 28)); index395 = index395 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index395 * 8) - let result253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array254.push(result253) + array394.push(result393) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array254) + Option::Some(array394) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted252, allowed_hosts : lifted256}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted392, allowed_hosts : lifted396}) } 28 => { @@ -30931,148 +46331,148 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 30 => { - let result257 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result397 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array259 : Array[String] = []; - for index260 = 0; index260 < (mbt_ffi_load32((iter_base) + 20)); index260 = index260 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index260 * 8) + let array399 : Array[String] = []; + for index400 = 0; index400 < (mbt_ffi_load32((iter_base) + 20)); index400 = index400 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index400 * 8) - let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result398 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array259.push(result258) + array399.push(result398) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted262 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted402 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result401 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result261}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result401}) } _ => panic() } - let lifted264 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted404 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result263 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result403 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result263}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result403}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result257, allowed_suffixes : array259, min : lifted262, max : lifted264}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result397, allowed_suffixes : array399, min : lifted402, max : lifted404}) } 31 => { - let array288 : Array[@types.UnionBranch] = []; - for index289 = 0; index289 < (mbt_ffi_load32((iter_base) + 12)); index289 = index289 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index289 * 92) + let array428 : Array[@types.UnionBranch] = []; + for index429 = 0; index429 < (mbt_ffi_load32((iter_base) + 12)); index429 = index429 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index429 * 92) - let result265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result405 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted274 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted414 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result266 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result406 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result266) + @types.DiscriminatorRule::Prefix(result406) } 1 => { - let result267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result407 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result267) + @types.DiscriminatorRule::Suffix(result407) } 2 => { - let result268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result408 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result268) + @types.DiscriminatorRule::Contains(result408) } 3 => { - let result269 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result409 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result269) + @types.DiscriminatorRule::Regex(result409) } 4 => { - let result270 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result410 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted272 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted412 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result271 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result411 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result271) + Option::Some(result411) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result270, literal : lifted272}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result410, literal : lifted412}) } 5 => { - let result273 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result413 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result273) + @types.DiscriminatorRule::FieldAbsent(result413) } _ => panic() } - let lifted276 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted416 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result275 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result275) + Option::Some(result415) } _ => panic() } - let array278 : Array[String] = []; - for index279 = 0; index279 < (mbt_ffi_load32((iter_base) + 52)); index279 = index279 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index279 * 8) + let array418 : Array[String] = []; + for index419 = 0; index419 < (mbt_ffi_load32((iter_base) + 52)); index419 = index419 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index419 * 8) - let result277 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result417 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array278.push(result277) + array418.push(result417) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array281 : Array[String] = []; - for index282 = 0; index282 < (mbt_ffi_load32((iter_base) + 60)); index282 = index282 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index282 * 8) + let array421 : Array[String] = []; + for index422 = 0; index422 < (mbt_ffi_load32((iter_base) + 60)); index422 = index422 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index422 * 8) - let result280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array281.push(result280) + array421.push(result420) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted284 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted424 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result283 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result423 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result283) + Option::Some(result423) } _ => panic() } - let lifted287 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted427 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted286 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted426 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -31087,57 +46487,57 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result285 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result425 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result285) + @types.Role::Other(result425) } _ => panic() } - Option::Some(lifted286) + Option::Some(lifted426) } _ => panic() } - array288.push(@types.UnionBranch::{tag : result265, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted274, metadata : @types.MetadataEnvelope::{doc : lifted276, aliases : array278, examples : array281, deprecated : lifted284, role : lifted287}}) + array428.push(@types.UnionBranch::{tag : result405, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted414, metadata : @types.MetadataEnvelope::{doc : lifted416, aliases : array418, examples : array421, deprecated : lifted424, role : lifted427}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array288}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array428}) } 32 => { - let lifted291 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted431 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result290 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result290) + Option::Some(result430) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted291}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted431}) } 33 => { - let lifted293 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted433 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result292 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result432 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result292) + Option::Some(result432) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted293}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted433}) } 34 => { - let lifted294 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted434 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -31146,11 +46546,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::FutureType(lifted294) + @types.SchemaTypeBody::FutureType(lifted434) } 35 => { - let lifted295 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted435 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -31159,58 +46559,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::StreamType(lifted295) + @types.SchemaTypeBody::StreamType(lifted435) } _ => panic() } - let lifted298 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted438 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result297 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result437 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result297) + Option::Some(result437) } _ => panic() } - let array300 : Array[String] = []; - for index301 = 0; index301 < (mbt_ffi_load32((iter_base) + 104)); index301 = index301 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index301 * 8) + let array440 : Array[String] = []; + for index441 = 0; index441 < (mbt_ffi_load32((iter_base) + 104)); index441 = index441 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index441 * 8) - let result299 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result439 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array300.push(result299) + array440.push(result439) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array303 : Array[String] = []; - for index304 = 0; index304 < (mbt_ffi_load32((iter_base) + 112)); index304 = index304 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index304 * 8) + let array443 : Array[String] = []; + for index444 = 0; index444 < (mbt_ffi_load32((iter_base) + 112)); index444 = index444 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index444 * 8) - let result302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result442 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array303.push(result302) + array443.push(result442) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted306 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted446 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result305 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result445 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result305) + Option::Some(result445) } _ => panic() } - let lifted309 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted449 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted308 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted448 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -31225,48 +46625,48 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result447 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result307) + @types.Role::Other(result447) } _ => panic() } - Option::Some(lifted308) + Option::Some(lifted448) } _ => panic() } - array310.push(@types.SchemaTypeNode::{body : lifted296, metadata : @types.MetadataEnvelope::{doc : lifted298, aliases : array300, examples : array303, deprecated : lifted306, role : lifted309}}) + array450.push(@types.SchemaTypeNode::{body : lifted436, metadata : @types.MetadataEnvelope::{doc : lifted438, aliases : array440, examples : array443, deprecated : lifted446, role : lifted449}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 60)) - let array315 : Array[@types.SchemaTypeDef] = []; - for index316 = 0; index316 < (mbt_ffi_load32((iter_base) + 72)); index316 = index316 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index316 * 24) + let array455 : Array[@types.SchemaTypeDef] = []; + for index456 = 0; index456 < (mbt_ffi_load32((iter_base) + 72)); index456 = index456 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index456 * 24) - let result312 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted314 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted454 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result313 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result453 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result313) + Option::Some(result453) } _ => panic() } - array315.push(@types.SchemaTypeDef::{id : result312, name : lifted314, body : mbt_ffi_load32((iter_base) + 20)}) + array455.push(@types.SchemaTypeDef::{id : result452, name : lifted454, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - let array347 : Array[@types.SchemaValueNode] = []; - for index348 = 0; index348 < (mbt_ffi_load32((iter_base) + 84)); index348 = index348 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index348 * 32) + let array487 : Array[@types.SchemaValueNode] = []; + for index488 = 0; index488 < (mbt_ffi_load32((iter_base) + 84)); index488 = index488 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index488 * 32) - let lifted346 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted486 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -31317,25 +46717,25 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 12 => { - let result317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result457 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result317) + @types.SchemaValueNode::StringValue(result457) } 13 => { - let array318 : Array[Int] = []; - for index319 = 0; index319 < (mbt_ffi_load32((iter_base) + 12)); index319 = index319 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index319 * 4) + let array458 : Array[Int] = []; + for index459 = 0; index459 < (mbt_ffi_load32((iter_base) + 12)); index459 = index459 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index459 * 4) - array318.push(mbt_ffi_load32((iter_base) + 0)) + array458.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array318) + @types.SchemaValueNode::RecordValue(array458) } 14 => { - let lifted320 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted460 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -31344,7 +46744,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted320}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted460}) } 15 => { @@ -31352,67 +46752,67 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 16 => { - let array321 : Array[Bool] = []; - for index322 = 0; index322 < (mbt_ffi_load32((iter_base) + 12)); index322 = index322 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index322 * 1) + let array461 : Array[Bool] = []; + for index462 = 0; index462 < (mbt_ffi_load32((iter_base) + 12)); index462 = index462 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index462 * 1) - array321.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array461.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array321) + @types.SchemaValueNode::FlagsValue(array461) } 17 => { - let array323 : Array[Int] = []; - for index324 = 0; index324 < (mbt_ffi_load32((iter_base) + 12)); index324 = index324 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index324 * 4) + let array463 : Array[Int] = []; + for index464 = 0; index464 < (mbt_ffi_load32((iter_base) + 12)); index464 = index464 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index464 * 4) - array323.push(mbt_ffi_load32((iter_base) + 0)) + array463.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array323) + @types.SchemaValueNode::TupleValue(array463) } 18 => { - let array325 : Array[Int] = []; - for index326 = 0; index326 < (mbt_ffi_load32((iter_base) + 12)); index326 = index326 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index326 * 4) + let array465 : Array[Int] = []; + for index466 = 0; index466 < (mbt_ffi_load32((iter_base) + 12)); index466 = index466 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index466 * 4) - array325.push(mbt_ffi_load32((iter_base) + 0)) + array465.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array325) + @types.SchemaValueNode::ListValue(array465) } 19 => { - let array327 : Array[Int] = []; - for index328 = 0; index328 < (mbt_ffi_load32((iter_base) + 12)); index328 = index328 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index328 * 4) + let array467 : Array[Int] = []; + for index468 = 0; index468 < (mbt_ffi_load32((iter_base) + 12)); index468 = index468 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index468 * 4) - array327.push(mbt_ffi_load32((iter_base) + 0)) + array467.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array327) + @types.SchemaValueNode::FixedListValue(array467) } 20 => { - let array329 : Array[@types.MapEntry] = []; - for index330 = 0; index330 < (mbt_ffi_load32((iter_base) + 12)); index330 = index330 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index330 * 8) + let array469 : Array[@types.MapEntry] = []; + for index470 = 0; index470 < (mbt_ffi_load32((iter_base) + 12)); index470 = index470 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index470 * 8) - array329.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array469.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array329) + @types.SchemaValueNode::MapValue(array469) } 21 => { - let lifted331 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted471 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -31421,14 +46821,14 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::OptionValue(lifted331) + @types.SchemaValueNode::OptionValue(lifted471) } 22 => { - let lifted334 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted474 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted332 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted472 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -31437,11 +46837,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::OkValue(lifted332) + @types.ResultValuePayload::OkValue(lifted472) } 1 => { - let lifted333 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted473 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -31450,58 +46850,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::ErrValue(lifted333) + @types.ResultValuePayload::ErrValue(lifted473) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted334) + @types.SchemaValueNode::ResultValue(lifted474) } 23 => { - let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result475 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted337 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted477 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result336 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result476 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result336) + Option::Some(result476) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result335, language : lifted337}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result475, language : lifted477}) } 24 => { - let result338 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result478 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted340 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted480 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result339 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result479 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result339) + Option::Some(result479) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result338, mime_type : lifted340}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result478, mime_type : lifted480}) } 25 => { - let result341 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result481 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result341) + @types.SchemaValueNode::PathValue(result481) } 26 => { - let result342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result482 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result342) + @types.SchemaValueNode::UrlValue(result482) } 27 => { @@ -31513,21 +46913,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 29 => { - let result343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result483 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result343}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result483}) } 30 => { - let result344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result484 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result344, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result484, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result485 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result345}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result485}) } 32 => { @@ -31536,16 +46936,16 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array347.push(lifted346) + array487.push(lifted486) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array310, defs : array315, root : mbt_ffi_load32((iter_base) + 76)}, value : @types.SchemaValueTree::{value_nodes : array347, root : mbt_ffi_load32((iter_base) + 88)}}) + Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array450, defs : array455, root : mbt_ffi_load32((iter_base) + 76)}, value : @types.SchemaValueTree::{value_nodes : array487, root : mbt_ffi_load32((iter_base) + 88)}}) } _ => panic() } - let lifted352 = match (mbt_ffi_load8_u((iter_base) + 96)) { + let lifted492 = match (mbt_ffi_load8_u((iter_base) + 96)) { 0 => { WrappedFunctionType::ReadLocal @@ -31564,7 +46964,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 4 => { - let lifted350 : UInt64? = match mbt_ffi_load8_u((iter_base) + 104) { + let lifted490 : UInt64? = match mbt_ffi_load8_u((iter_base) + 104) { 0 => Option::None 1 => { @@ -31573,11 +46973,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - WrappedFunctionType::WriteRemoteBatched(lifted350) + WrappedFunctionType::WriteRemoteBatched(lifted490) } 5 => { - let lifted351 : UInt64? = match mbt_ffi_load8_u((iter_base) + 104) { + let lifted491 : UInt64? = match mbt_ffi_load8_u((iter_base) + 104) { 0 => Option::None 1 => { @@ -31586,24 +46986,24 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - WrappedFunctionType::WriteRemoteTransaction(lifted351) + WrappedFunctionType::WriteRemoteTransaction(lifted491) } _ => panic() } - PublicOplogEntry::Start(StartParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent_start_index : lifted182, function_name : result183, request : lifted349, durable_function_type : lifted352}) + PublicOplogEntry::Start(StartParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent_start_index : lifted252, function_name : result253, request : lifted489, durable_function_type : lifted492}) } 2 => { - let lifted518 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted728 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let array479 : Array[@types.SchemaTypeNode] = []; - for index480 = 0; index480 < (mbt_ffi_load32((iter_base) + 48)); index480 = index480 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index480 * 144) + let array689 : Array[@types.SchemaTypeNode] = []; + for index690 = 0; index690 < (mbt_ffi_load32((iter_base) + 48)); index690 = index690 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index690 * 144) - let lifted465 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted675 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -31614,43 +47014,743 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 2 => { - @types.SchemaTypeBody::S8Type + let lifted499 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted494 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted493 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted493) + } + _ => panic() + } + + let lifted496 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted495 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted495) + } + _ => panic() + } + + let lifted498 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result497 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result497) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted494, max : lifted496, unit : lifted498}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted499) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted506 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted501 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted500 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted500) + } + _ => panic() + } + + let lifted503 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted502 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted502) + } + _ => panic() + } + + let lifted505 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result504 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result504) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted501, max : lifted503, unit : lifted505}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted506) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted513 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted508 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted507 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted507) + } + _ => panic() + } + + let lifted510 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted509 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted509) + } + _ => panic() + } + + let lifted512 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result511) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted508, max : lifted510, unit : lifted512}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted513) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted520 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted515 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted514 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted514) + } + _ => panic() + } + + let lifted517 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted516 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted516) + } + _ => panic() + } + + let lifted519 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result518) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted515, max : lifted517, unit : lifted519}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted520) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted527 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted522 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted521 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted521) + } + _ => panic() + } + + let lifted524 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted523 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted523) + } + _ => panic() + } + + let lifted526 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result525 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result525) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted522, max : lifted524, unit : lifted526}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted527) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted534 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted529 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted528 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted528) + } + _ => panic() + } + + let lifted531 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted530 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted530) + } + _ => panic() + } + + let lifted533 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result532 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result532) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted529, max : lifted531, unit : lifted533}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted534) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted541 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted536 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted535 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted535) + } + _ => panic() + } + + let lifted538 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted537 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted537) + } + _ => panic() + } + + let lifted540 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result539 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result539) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted536, max : lifted538, unit : lifted540}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted541) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted548 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted543 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted542 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted542) + } + _ => panic() + } + + let lifted545 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted544 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted544) + } + _ => panic() + } + + let lifted547 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result546 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result546) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted543, max : lifted545, unit : lifted547}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted548) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted555 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted550 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted549 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted549) + } + _ => panic() + } + + let lifted552 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted551 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted551) + } + _ => panic() + } + + let lifted554 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result553 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result553) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted550, max : lifted552, unit : lifted554}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted555) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted562 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted557 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted556 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted556) + } + _ => panic() + } + + let lifted559 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted558 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted558) + } + _ => panic() + } + + let lifted561 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result560 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result560) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted557, max : lifted559, unit : lifted561}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted562) } 12 => { @@ -31662,59 +47762,59 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 14 => { - let array367 : Array[@types.NamedFieldType] = []; - for index368 = 0; index368 < (mbt_ffi_load32((iter_base) + 12)); index368 = index368 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index368 * 68) + let array577 : Array[@types.NamedFieldType] = []; + for index578 = 0; index578 < (mbt_ffi_load32((iter_base) + 12)); index578 = index578 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index578 * 68) - let result353 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result563 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted355 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted565 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result354 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result564 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result354) + Option::Some(result564) } _ => panic() } - let array357 : Array[String] = []; - for index358 = 0; index358 < (mbt_ffi_load32((iter_base) + 28)); index358 = index358 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index358 * 8) + let array567 : Array[String] = []; + for index568 = 0; index568 < (mbt_ffi_load32((iter_base) + 28)); index568 = index568 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index568 * 8) - let result356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array357.push(result356) + array567.push(result566) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array360 : Array[String] = []; - for index361 = 0; index361 < (mbt_ffi_load32((iter_base) + 36)); index361 = index361 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index361 * 8) + let array570 : Array[String] = []; + for index571 = 0; index571 < (mbt_ffi_load32((iter_base) + 36)); index571 = index571 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index571 * 8) - let result359 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result569 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array360.push(result359) + array570.push(result569) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted363 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted573 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result362 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result572 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result362) + Option::Some(result572) } _ => panic() } - let lifted366 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted576 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted365 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted575 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -31729,33 +47829,33 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result364 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result574 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result364) + @types.Role::Other(result574) } _ => panic() } - Option::Some(lifted365) + Option::Some(lifted575) } _ => panic() } - array367.push(@types.NamedFieldType::{name : result353, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted355, aliases : array357, examples : array360, deprecated : lifted363, role : lifted366}}) + array577.push(@types.NamedFieldType::{name : result563, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted565, aliases : array567, examples : array570, deprecated : lifted573, role : lifted576}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array367) + @types.SchemaTypeBody::RecordType(array577) } 15 => { - let array384 : Array[@types.VariantCaseType] = []; - for index385 = 0; index385 < (mbt_ffi_load32((iter_base) + 12)); index385 = index385 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index385 * 72) + let array594 : Array[@types.VariantCaseType] = []; + for index595 = 0; index595 < (mbt_ffi_load32((iter_base) + 12)); index595 = index595 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index595 * 72) - let result369 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result579 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted370 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted580 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -31764,53 +47864,53 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted372 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted582 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result371 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result581 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result371) + Option::Some(result581) } _ => panic() } - let array374 : Array[String] = []; - for index375 = 0; index375 < (mbt_ffi_load32((iter_base) + 32)); index375 = index375 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index375 * 8) + let array584 : Array[String] = []; + for index585 = 0; index585 < (mbt_ffi_load32((iter_base) + 32)); index585 = index585 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index585 * 8) - let result373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array374.push(result373) + array584.push(result583) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array377 : Array[String] = []; - for index378 = 0; index378 < (mbt_ffi_load32((iter_base) + 40)); index378 = index378 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index378 * 8) + let array587 : Array[String] = []; + for index588 = 0; index588 < (mbt_ffi_load32((iter_base) + 40)); index588 = index588 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index588 * 8) - let result376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result586 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array377.push(result376) + array587.push(result586) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted380 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted590 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result379 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result589 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result379) + Option::Some(result589) } _ => panic() } - let lifted383 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted593 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted382 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted592 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -31825,63 +47925,63 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result381 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result591 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result381) + @types.Role::Other(result591) } _ => panic() } - Option::Some(lifted382) + Option::Some(lifted592) } _ => panic() } - array384.push(@types.VariantCaseType::{name : result369, payload : lifted370, metadata : @types.MetadataEnvelope::{doc : lifted372, aliases : array374, examples : array377, deprecated : lifted380, role : lifted383}}) + array594.push(@types.VariantCaseType::{name : result579, payload : lifted580, metadata : @types.MetadataEnvelope::{doc : lifted582, aliases : array584, examples : array587, deprecated : lifted590, role : lifted593}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array384) + @types.SchemaTypeBody::VariantType(array594) } 16 => { - let array387 : Array[String] = []; - for index388 = 0; index388 < (mbt_ffi_load32((iter_base) + 12)); index388 = index388 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index388 * 8) + let array597 : Array[String] = []; + for index598 = 0; index598 < (mbt_ffi_load32((iter_base) + 12)); index598 = index598 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index598 * 8) - let result386 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result596 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array387.push(result386) + array597.push(result596) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array387) + @types.SchemaTypeBody::EnumType(array597) } 17 => { - let array390 : Array[String] = []; - for index391 = 0; index391 < (mbt_ffi_load32((iter_base) + 12)); index391 = index391 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index391 * 8) + let array600 : Array[String] = []; + for index601 = 0; index601 < (mbt_ffi_load32((iter_base) + 12)); index601 = index601 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index601 * 8) - let result389 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result599 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array390.push(result389) + array600.push(result599) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array390) + @types.SchemaTypeBody::FlagsType(array600) } 18 => { - let array392 : Array[Int] = []; - for index393 = 0; index393 < (mbt_ffi_load32((iter_base) + 12)); index393 = index393 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index393 * 4) + let array602 : Array[Int] = []; + for index603 = 0; index603 < (mbt_ffi_load32((iter_base) + 12)); index603 = index603 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index603 * 4) - array392.push(mbt_ffi_load32((iter_base) + 0)) + array602.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array392) + @types.SchemaTypeBody::TupleType(array602) } 19 => { @@ -31901,7 +48001,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 23 => { - let lifted394 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted604 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -31910,7 +48010,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted395 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted605 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -31919,30 +48019,30 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted394, err : lifted395}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted604, err : lifted605}) } 24 => { - let lifted399 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted609 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array397 : Array[String] = []; - for index398 = 0; index398 < (mbt_ffi_load32((iter_base) + 16)); index398 = index398 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index398 * 8) + let array607 : Array[String] = []; + for index608 = 0; index608 < (mbt_ffi_load32((iter_base) + 16)); index608 = index608 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index608 * 8) - let result396 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result606 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array397.push(result396) + array607.push(result606) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array397) + Option::Some(array607) } _ => panic() } - let lifted400 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted610 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -31951,7 +48051,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted401 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted611 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -31960,41 +48060,41 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted403 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted613 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result402 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result612 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result402) + Option::Some(result612) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted399, min_length : lifted400, max_length : lifted401, regex : lifted403}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted609, min_length : lifted610, max_length : lifted611, regex : lifted613}) } 25 => { - let lifted407 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted617 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array405 : Array[String] = []; - for index406 = 0; index406 < (mbt_ffi_load32((iter_base) + 16)); index406 = index406 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index406 * 8) + let array615 : Array[String] = []; + for index616 = 0; index616 < (mbt_ffi_load32((iter_base) + 16)); index616 = index616 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index616 * 8) - let result404 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result614 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array405.push(result404) + array615.push(result614) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array405) + Option::Some(array615) } _ => panic() } - let lifted408 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted618 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -32003,7 +48103,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted409 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted619 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -32012,91 +48112,91 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted407, min_bytes : lifted408, max_bytes : lifted409}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted617, min_bytes : lifted618, max_bytes : lifted619}) } 26 => { - let lifted413 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted623 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array411 : Array[String] = []; - for index412 = 0; index412 < (mbt_ffi_load32((iter_base) + 20)); index412 = index412 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index412 * 8) + let array621 : Array[String] = []; + for index622 = 0; index622 < (mbt_ffi_load32((iter_base) + 20)); index622 = index622 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index622 * 8) - let result410 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result620 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array411.push(result410) + array621.push(result620) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array411) + Option::Some(array621) } _ => panic() } - let lifted417 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted627 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array415 : Array[String] = []; - for index416 = 0; index416 < (mbt_ffi_load32((iter_base) + 32)); index416 = index416 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index416 * 8) + let array625 : Array[String] = []; + for index626 = 0; index626 < (mbt_ffi_load32((iter_base) + 32)); index626 = index626 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index626 * 8) - let result414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result624 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array415.push(result414) + array625.push(result624) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array415) + Option::Some(array625) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted413, allowed_extensions : lifted417}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted623, allowed_extensions : lifted627}) } 27 => { - let lifted421 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted631 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array419 : Array[String] = []; - for index420 = 0; index420 < (mbt_ffi_load32((iter_base) + 16)); index420 = index420 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index420 * 8) + let array629 : Array[String] = []; + for index630 = 0; index630 < (mbt_ffi_load32((iter_base) + 16)); index630 = index630 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index630 * 8) - let result418 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result628 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array419.push(result418) + array629.push(result628) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array419) + Option::Some(array629) } _ => panic() } - let lifted425 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted635 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array423 : Array[String] = []; - for index424 = 0; index424 < (mbt_ffi_load32((iter_base) + 28)); index424 = index424 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index424 * 8) + let array633 : Array[String] = []; + for index634 = 0; index634 < (mbt_ffi_load32((iter_base) + 28)); index634 = index634 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index634 * 8) - let result422 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result632 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array423.push(result422) + array633.push(result632) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array423) + Option::Some(array633) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted421, allowed_hosts : lifted425}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted631, allowed_hosts : lifted635}) } 28 => { @@ -32108,148 +48208,148 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 30 => { - let result426 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result636 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array428 : Array[String] = []; - for index429 = 0; index429 < (mbt_ffi_load32((iter_base) + 20)); index429 = index429 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index429 * 8) + let array638 : Array[String] = []; + for index639 = 0; index639 < (mbt_ffi_load32((iter_base) + 20)); index639 = index639 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index639 * 8) - let result427 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result637 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array428.push(result427) + array638.push(result637) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted431 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted641 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result640 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result430}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result640}) } _ => panic() } - let lifted433 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted643 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result432 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result642 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result432}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result642}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result426, allowed_suffixes : array428, min : lifted431, max : lifted433}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result636, allowed_suffixes : array638, min : lifted641, max : lifted643}) } 31 => { - let array457 : Array[@types.UnionBranch] = []; - for index458 = 0; index458 < (mbt_ffi_load32((iter_base) + 12)); index458 = index458 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index458 * 92) + let array667 : Array[@types.UnionBranch] = []; + for index668 = 0; index668 < (mbt_ffi_load32((iter_base) + 12)); index668 = index668 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index668 * 92) - let result434 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result644 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted443 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted653 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result435 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result645 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result435) + @types.DiscriminatorRule::Prefix(result645) } 1 => { - let result436 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result646 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result436) + @types.DiscriminatorRule::Suffix(result646) } 2 => { - let result437 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result647 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result437) + @types.DiscriminatorRule::Contains(result647) } 3 => { - let result438 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result648 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result438) + @types.DiscriminatorRule::Regex(result648) } 4 => { - let result439 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result649 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted441 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted651 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result440 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result650 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result440) + Option::Some(result650) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result439, literal : lifted441}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result649, literal : lifted651}) } 5 => { - let result442 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result652 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result442) + @types.DiscriminatorRule::FieldAbsent(result652) } _ => panic() } - let lifted445 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted655 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result444 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result654 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result444) + Option::Some(result654) } _ => panic() } - let array447 : Array[String] = []; - for index448 = 0; index448 < (mbt_ffi_load32((iter_base) + 52)); index448 = index448 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index448 * 8) + let array657 : Array[String] = []; + for index658 = 0; index658 < (mbt_ffi_load32((iter_base) + 52)); index658 = index658 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index658 * 8) - let result446 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result656 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array447.push(result446) + array657.push(result656) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array450 : Array[String] = []; - for index451 = 0; index451 < (mbt_ffi_load32((iter_base) + 60)); index451 = index451 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index451 * 8) + let array660 : Array[String] = []; + for index661 = 0; index661 < (mbt_ffi_load32((iter_base) + 60)); index661 = index661 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index661 * 8) - let result449 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result659 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array450.push(result449) + array660.push(result659) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted453 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted663 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result662 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result452) + Option::Some(result662) } _ => panic() } - let lifted456 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted666 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted455 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted665 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -32264,57 +48364,57 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result454 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result664 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result454) + @types.Role::Other(result664) } _ => panic() } - Option::Some(lifted455) + Option::Some(lifted665) } _ => panic() } - array457.push(@types.UnionBranch::{tag : result434, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted443, metadata : @types.MetadataEnvelope::{doc : lifted445, aliases : array447, examples : array450, deprecated : lifted453, role : lifted456}}) + array667.push(@types.UnionBranch::{tag : result644, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted653, metadata : @types.MetadataEnvelope::{doc : lifted655, aliases : array657, examples : array660, deprecated : lifted663, role : lifted666}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array457}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array667}) } 32 => { - let lifted460 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted670 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result459 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result669 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result459) + Option::Some(result669) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted460}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted670}) } 33 => { - let lifted462 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted672 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result461 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result461) + Option::Some(result671) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted462}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted672}) } 34 => { - let lifted463 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted673 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -32323,11 +48423,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::FutureType(lifted463) + @types.SchemaTypeBody::FutureType(lifted673) } 35 => { - let lifted464 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted674 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -32336,58 +48436,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::StreamType(lifted464) + @types.SchemaTypeBody::StreamType(lifted674) } _ => panic() } - let lifted467 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted677 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result676 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result466) + Option::Some(result676) } _ => panic() } - let array469 : Array[String] = []; - for index470 = 0; index470 < (mbt_ffi_load32((iter_base) + 104)); index470 = index470 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index470 * 8) + let array679 : Array[String] = []; + for index680 = 0; index680 < (mbt_ffi_load32((iter_base) + 104)); index680 = index680 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index680 * 8) - let result468 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result678 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array469.push(result468) + array679.push(result678) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array472 : Array[String] = []; - for index473 = 0; index473 < (mbt_ffi_load32((iter_base) + 112)); index473 = index473 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index473 * 8) + let array682 : Array[String] = []; + for index683 = 0; index683 < (mbt_ffi_load32((iter_base) + 112)); index683 = index683 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index683 * 8) - let result471 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result681 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array472.push(result471) + array682.push(result681) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted475 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted685 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result474 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result684 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result474) + Option::Some(result684) } _ => panic() } - let lifted478 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted688 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted477 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted687 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -32402,48 +48502,48 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result476 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result686 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result476) + @types.Role::Other(result686) } _ => panic() } - Option::Some(lifted477) + Option::Some(lifted687) } _ => panic() } - array479.push(@types.SchemaTypeNode::{body : lifted465, metadata : @types.MetadataEnvelope::{doc : lifted467, aliases : array469, examples : array472, deprecated : lifted475, role : lifted478}}) + array689.push(@types.SchemaTypeNode::{body : lifted675, metadata : @types.MetadataEnvelope::{doc : lifted677, aliases : array679, examples : array682, deprecated : lifted685, role : lifted688}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) - let array484 : Array[@types.SchemaTypeDef] = []; - for index485 = 0; index485 < (mbt_ffi_load32((iter_base) + 56)); index485 = index485 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index485 * 24) + let array694 : Array[@types.SchemaTypeDef] = []; + for index695 = 0; index695 < (mbt_ffi_load32((iter_base) + 56)); index695 = index695 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index695 * 24) - let result481 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result691 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted483 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted693 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result482 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result692 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result482) + Option::Some(result692) } _ => panic() } - array484.push(@types.SchemaTypeDef::{id : result481, name : lifted483, body : mbt_ffi_load32((iter_base) + 20)}) + array694.push(@types.SchemaTypeDef::{id : result691, name : lifted693, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 52)) - let array516 : Array[@types.SchemaValueNode] = []; - for index517 = 0; index517 < (mbt_ffi_load32((iter_base) + 68)); index517 = index517 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index517 * 32) + let array726 : Array[@types.SchemaValueNode] = []; + for index727 = 0; index727 < (mbt_ffi_load32((iter_base) + 68)); index727 = index727 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index727 * 32) - let lifted515 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted725 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -32494,25 +48594,25 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 12 => { - let result486 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result696 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result486) + @types.SchemaValueNode::StringValue(result696) } 13 => { - let array487 : Array[Int] = []; - for index488 = 0; index488 < (mbt_ffi_load32((iter_base) + 12)); index488 = index488 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index488 * 4) + let array697 : Array[Int] = []; + for index698 = 0; index698 < (mbt_ffi_load32((iter_base) + 12)); index698 = index698 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index698 * 4) - array487.push(mbt_ffi_load32((iter_base) + 0)) + array697.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array487) + @types.SchemaValueNode::RecordValue(array697) } 14 => { - let lifted489 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted699 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -32521,7 +48621,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted489}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted699}) } 15 => { @@ -32529,67 +48629,67 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 16 => { - let array490 : Array[Bool] = []; - for index491 = 0; index491 < (mbt_ffi_load32((iter_base) + 12)); index491 = index491 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index491 * 1) + let array700 : Array[Bool] = []; + for index701 = 0; index701 < (mbt_ffi_load32((iter_base) + 12)); index701 = index701 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index701 * 1) - array490.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array700.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array490) + @types.SchemaValueNode::FlagsValue(array700) } 17 => { - let array492 : Array[Int] = []; - for index493 = 0; index493 < (mbt_ffi_load32((iter_base) + 12)); index493 = index493 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index493 * 4) + let array702 : Array[Int] = []; + for index703 = 0; index703 < (mbt_ffi_load32((iter_base) + 12)); index703 = index703 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index703 * 4) - array492.push(mbt_ffi_load32((iter_base) + 0)) + array702.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array492) + @types.SchemaValueNode::TupleValue(array702) } 18 => { - let array494 : Array[Int] = []; - for index495 = 0; index495 < (mbt_ffi_load32((iter_base) + 12)); index495 = index495 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index495 * 4) + let array704 : Array[Int] = []; + for index705 = 0; index705 < (mbt_ffi_load32((iter_base) + 12)); index705 = index705 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index705 * 4) - array494.push(mbt_ffi_load32((iter_base) + 0)) + array704.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array494) + @types.SchemaValueNode::ListValue(array704) } 19 => { - let array496 : Array[Int] = []; - for index497 = 0; index497 < (mbt_ffi_load32((iter_base) + 12)); index497 = index497 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index497 * 4) + let array706 : Array[Int] = []; + for index707 = 0; index707 < (mbt_ffi_load32((iter_base) + 12)); index707 = index707 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index707 * 4) - array496.push(mbt_ffi_load32((iter_base) + 0)) + array706.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array496) + @types.SchemaValueNode::FixedListValue(array706) } 20 => { - let array498 : Array[@types.MapEntry] = []; - for index499 = 0; index499 < (mbt_ffi_load32((iter_base) + 12)); index499 = index499 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index499 * 8) + let array708 : Array[@types.MapEntry] = []; + for index709 = 0; index709 < (mbt_ffi_load32((iter_base) + 12)); index709 = index709 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index709 * 8) - array498.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array708.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array498) + @types.SchemaValueNode::MapValue(array708) } 21 => { - let lifted500 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted710 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -32598,14 +48698,14 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::OptionValue(lifted500) + @types.SchemaValueNode::OptionValue(lifted710) } 22 => { - let lifted503 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted713 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted501 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted711 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -32614,11 +48714,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::OkValue(lifted501) + @types.ResultValuePayload::OkValue(lifted711) } 1 => { - let lifted502 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted712 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -32627,58 +48727,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::ErrValue(lifted502) + @types.ResultValuePayload::ErrValue(lifted712) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted503) + @types.SchemaValueNode::ResultValue(lifted713) } 23 => { - let result504 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted506 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted716 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result715 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result505) + Option::Some(result715) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result504, language : lifted506}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result714, language : lifted716}) } 24 => { - let result507 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result717 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted509 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted719 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result508 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result718 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result508) + Option::Some(result718) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result507, mime_type : lifted509}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result717, mime_type : lifted719}) } 25 => { - let result510 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result720 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result510) + @types.SchemaValueNode::PathValue(result720) } 26 => { - let result511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result721 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result511) + @types.SchemaValueNode::UrlValue(result721) } 27 => { @@ -32690,21 +48790,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 29 => { - let result512 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result722 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result512}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result722}) } 30 => { - let result513 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result723 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result513, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result723, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result514 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result724 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result514}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result724}) } 32 => { @@ -32713,28 +48813,28 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array516.push(lifted515) + array726.push(lifted725) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array479, defs : array484, root : mbt_ffi_load32((iter_base) + 60)}, value : @types.SchemaValueTree::{value_nodes : array516, root : mbt_ffi_load32((iter_base) + 72)}}) + Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array689, defs : array694, root : mbt_ffi_load32((iter_base) + 60)}, value : @types.SchemaValueTree::{value_nodes : array726, root : mbt_ffi_load32((iter_base) + 72)}}) } _ => panic() } - PublicOplogEntry::End(EndParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), response : lifted518, forced_commit : (mbt_ffi_load8_u((iter_base) + 76) != 0)}) + PublicOplogEntry::End(EndParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), response : lifted728, forced_commit : (mbt_ffi_load8_u((iter_base) + 76) != 0)}) } 3 => { - let lifted684 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted964 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let array645 : Array[@types.SchemaTypeNode] = []; - for index646 = 0; index646 < (mbt_ffi_load32((iter_base) + 48)); index646 = index646 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index646 * 144) + let array925 : Array[@types.SchemaTypeNode] = []; + for index926 = 0; index926 < (mbt_ffi_load32((iter_base) + 48)); index926 = index926 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index926 * 144) - let lifted631 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted911 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -32745,43 +48845,743 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 2 => { - @types.SchemaTypeBody::S8Type + let lifted735 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted730 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted729 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted729) + } + _ => panic() + } + + let lifted732 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted731 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted731) + } + _ => panic() + } + + let lifted734 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result733 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result733) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted730, max : lifted732, unit : lifted734}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted735) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted742 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted737 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted736 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted736) + } + _ => panic() + } + + let lifted739 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted738 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted738) + } + _ => panic() + } + + let lifted741 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result740 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result740) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted737, max : lifted739, unit : lifted741}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted742) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted749 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted744 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted743 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted743) + } + _ => panic() + } + + let lifted746 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted745 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted745) + } + _ => panic() + } + + let lifted748 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result747 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result747) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted744, max : lifted746, unit : lifted748}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted749) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted756 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted751 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted750 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted750) + } + _ => panic() + } + + let lifted753 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted752 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted752) + } + _ => panic() + } + + let lifted755 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result754 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result754) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted751, max : lifted753, unit : lifted755}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted756) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted763 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted758 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted757 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted757) + } + _ => panic() + } + + let lifted760 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted759 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted759) + } + _ => panic() + } + + let lifted762 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result761 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result761) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted758, max : lifted760, unit : lifted762}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted763) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted770 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted765 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted764 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted764) + } + _ => panic() + } + + let lifted767 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted766 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted766) + } + _ => panic() + } + + let lifted769 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result768 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result768) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted765, max : lifted767, unit : lifted769}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted770) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted777 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted772 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted771 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted771) + } + _ => panic() + } + + let lifted774 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted773 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted773) + } + _ => panic() + } + + let lifted776 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result775 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result775) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted772, max : lifted774, unit : lifted776}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted777) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted784 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted779 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted778 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted778) + } + _ => panic() + } + + let lifted781 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted780 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted780) + } + _ => panic() + } + + let lifted783 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result782 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result782) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted779, max : lifted781, unit : lifted783}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted784) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted791 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted786 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted785 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted785) + } + _ => panic() + } + + let lifted788 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted787 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted787) + } + _ => panic() + } + + let lifted790 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result789 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result789) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted786, max : lifted788, unit : lifted790}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted791) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted798 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted793 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted792 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted792) + } + _ => panic() + } + + let lifted795 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted794 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted794) + } + _ => panic() + } + + let lifted797 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result796 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result796) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted793, max : lifted795, unit : lifted797}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted798) } 12 => { @@ -32793,59 +49593,59 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 14 => { - let array533 : Array[@types.NamedFieldType] = []; - for index534 = 0; index534 < (mbt_ffi_load32((iter_base) + 12)); index534 = index534 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index534 * 68) + let array813 : Array[@types.NamedFieldType] = []; + for index814 = 0; index814 < (mbt_ffi_load32((iter_base) + 12)); index814 = index814 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index814 * 68) - let result519 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result799 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted521 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted801 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result520 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result800 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result520) + Option::Some(result800) } _ => panic() } - let array523 : Array[String] = []; - for index524 = 0; index524 < (mbt_ffi_load32((iter_base) + 28)); index524 = index524 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index524 * 8) + let array803 : Array[String] = []; + for index804 = 0; index804 < (mbt_ffi_load32((iter_base) + 28)); index804 = index804 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index804 * 8) - let result522 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result802 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array523.push(result522) + array803.push(result802) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array526 : Array[String] = []; - for index527 = 0; index527 < (mbt_ffi_load32((iter_base) + 36)); index527 = index527 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index527 * 8) + let array806 : Array[String] = []; + for index807 = 0; index807 < (mbt_ffi_load32((iter_base) + 36)); index807 = index807 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index807 * 8) - let result525 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result805 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array526.push(result525) + array806.push(result805) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted529 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted809 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result528 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result808 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result528) + Option::Some(result808) } _ => panic() } - let lifted532 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted812 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted531 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted811 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -32860,33 +49660,33 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result530 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result810 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result530) + @types.Role::Other(result810) } _ => panic() } - Option::Some(lifted531) + Option::Some(lifted811) } _ => panic() } - array533.push(@types.NamedFieldType::{name : result519, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted521, aliases : array523, examples : array526, deprecated : lifted529, role : lifted532}}) + array813.push(@types.NamedFieldType::{name : result799, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted801, aliases : array803, examples : array806, deprecated : lifted809, role : lifted812}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array533) + @types.SchemaTypeBody::RecordType(array813) } 15 => { - let array550 : Array[@types.VariantCaseType] = []; - for index551 = 0; index551 < (mbt_ffi_load32((iter_base) + 12)); index551 = index551 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index551 * 72) + let array830 : Array[@types.VariantCaseType] = []; + for index831 = 0; index831 < (mbt_ffi_load32((iter_base) + 12)); index831 = index831 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index831 * 72) - let result535 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result815 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted536 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted816 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -32895,53 +49695,53 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted538 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted818 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result537 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result817 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result537) + Option::Some(result817) } _ => panic() } - let array540 : Array[String] = []; - for index541 = 0; index541 < (mbt_ffi_load32((iter_base) + 32)); index541 = index541 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index541 * 8) + let array820 : Array[String] = []; + for index821 = 0; index821 < (mbt_ffi_load32((iter_base) + 32)); index821 = index821 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index821 * 8) - let result539 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result819 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array540.push(result539) + array820.push(result819) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array543 : Array[String] = []; - for index544 = 0; index544 < (mbt_ffi_load32((iter_base) + 40)); index544 = index544 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index544 * 8) + let array823 : Array[String] = []; + for index824 = 0; index824 < (mbt_ffi_load32((iter_base) + 40)); index824 = index824 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index824 * 8) - let result542 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result822 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array543.push(result542) + array823.push(result822) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted546 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted826 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result545 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result825 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result545) + Option::Some(result825) } _ => panic() } - let lifted549 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted829 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted548 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted828 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -32956,63 +49756,63 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result547 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result827 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result547) + @types.Role::Other(result827) } _ => panic() } - Option::Some(lifted548) + Option::Some(lifted828) } _ => panic() } - array550.push(@types.VariantCaseType::{name : result535, payload : lifted536, metadata : @types.MetadataEnvelope::{doc : lifted538, aliases : array540, examples : array543, deprecated : lifted546, role : lifted549}}) + array830.push(@types.VariantCaseType::{name : result815, payload : lifted816, metadata : @types.MetadataEnvelope::{doc : lifted818, aliases : array820, examples : array823, deprecated : lifted826, role : lifted829}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array550) + @types.SchemaTypeBody::VariantType(array830) } 16 => { - let array553 : Array[String] = []; - for index554 = 0; index554 < (mbt_ffi_load32((iter_base) + 12)); index554 = index554 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index554 * 8) + let array833 : Array[String] = []; + for index834 = 0; index834 < (mbt_ffi_load32((iter_base) + 12)); index834 = index834 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index834 * 8) - let result552 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result832 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array553.push(result552) + array833.push(result832) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array553) + @types.SchemaTypeBody::EnumType(array833) } 17 => { - let array556 : Array[String] = []; - for index557 = 0; index557 < (mbt_ffi_load32((iter_base) + 12)); index557 = index557 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index557 * 8) + let array836 : Array[String] = []; + for index837 = 0; index837 < (mbt_ffi_load32((iter_base) + 12)); index837 = index837 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index837 * 8) - let result555 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result835 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array556.push(result555) + array836.push(result835) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array556) + @types.SchemaTypeBody::FlagsType(array836) } 18 => { - let array558 : Array[Int] = []; - for index559 = 0; index559 < (mbt_ffi_load32((iter_base) + 12)); index559 = index559 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index559 * 4) + let array838 : Array[Int] = []; + for index839 = 0; index839 < (mbt_ffi_load32((iter_base) + 12)); index839 = index839 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index839 * 4) - array558.push(mbt_ffi_load32((iter_base) + 0)) + array838.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array558) + @types.SchemaTypeBody::TupleType(array838) } 19 => { @@ -33032,7 +49832,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 23 => { - let lifted560 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted840 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -33041,7 +49841,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted561 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted841 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -33050,30 +49850,30 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted560, err : lifted561}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted840, err : lifted841}) } 24 => { - let lifted565 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted845 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array563 : Array[String] = []; - for index564 = 0; index564 < (mbt_ffi_load32((iter_base) + 16)); index564 = index564 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index564 * 8) + let array843 : Array[String] = []; + for index844 = 0; index844 < (mbt_ffi_load32((iter_base) + 16)); index844 = index844 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index844 * 8) - let result562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result842 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array563.push(result562) + array843.push(result842) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array563) + Option::Some(array843) } _ => panic() } - let lifted566 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted846 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -33082,7 +49882,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted567 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted847 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -33091,41 +49891,41 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted569 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted849 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result568 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result848 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result568) + Option::Some(result848) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted565, min_length : lifted566, max_length : lifted567, regex : lifted569}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted845, min_length : lifted846, max_length : lifted847, regex : lifted849}) } 25 => { - let lifted573 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted853 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array571 : Array[String] = []; - for index572 = 0; index572 < (mbt_ffi_load32((iter_base) + 16)); index572 = index572 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index572 * 8) + let array851 : Array[String] = []; + for index852 = 0; index852 < (mbt_ffi_load32((iter_base) + 16)); index852 = index852 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index852 * 8) - let result570 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result850 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array571.push(result570) + array851.push(result850) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array571) + Option::Some(array851) } _ => panic() } - let lifted574 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted854 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -33134,7 +49934,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted575 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted855 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -33143,91 +49943,91 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted573, min_bytes : lifted574, max_bytes : lifted575}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted853, min_bytes : lifted854, max_bytes : lifted855}) } 26 => { - let lifted579 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted859 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array577 : Array[String] = []; - for index578 = 0; index578 < (mbt_ffi_load32((iter_base) + 20)); index578 = index578 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index578 * 8) + let array857 : Array[String] = []; + for index858 = 0; index858 < (mbt_ffi_load32((iter_base) + 20)); index858 = index858 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index858 * 8) - let result576 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result856 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array577.push(result576) + array857.push(result856) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array577) + Option::Some(array857) } _ => panic() } - let lifted583 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted863 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array581 : Array[String] = []; - for index582 = 0; index582 < (mbt_ffi_load32((iter_base) + 32)); index582 = index582 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index582 * 8) + let array861 : Array[String] = []; + for index862 = 0; index862 < (mbt_ffi_load32((iter_base) + 32)); index862 = index862 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index862 * 8) - let result580 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result860 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array581.push(result580) + array861.push(result860) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array581) + Option::Some(array861) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted579, allowed_extensions : lifted583}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted859, allowed_extensions : lifted863}) } 27 => { - let lifted587 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted867 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array585 : Array[String] = []; - for index586 = 0; index586 < (mbt_ffi_load32((iter_base) + 16)); index586 = index586 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index586 * 8) + let array865 : Array[String] = []; + for index866 = 0; index866 < (mbt_ffi_load32((iter_base) + 16)); index866 = index866 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index866 * 8) - let result584 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result864 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array585.push(result584) + array865.push(result864) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array585) + Option::Some(array865) } _ => panic() } - let lifted591 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted871 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array589 : Array[String] = []; - for index590 = 0; index590 < (mbt_ffi_load32((iter_base) + 28)); index590 = index590 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index590 * 8) + let array869 : Array[String] = []; + for index870 = 0; index870 < (mbt_ffi_load32((iter_base) + 28)); index870 = index870 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index870 * 8) - let result588 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result868 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array589.push(result588) + array869.push(result868) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array589) + Option::Some(array869) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted587, allowed_hosts : lifted591}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted867, allowed_hosts : lifted871}) } 28 => { @@ -33239,148 +50039,148 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 30 => { - let result592 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result872 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array594 : Array[String] = []; - for index595 = 0; index595 < (mbt_ffi_load32((iter_base) + 20)); index595 = index595 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index595 * 8) + let array874 : Array[String] = []; + for index875 = 0; index875 < (mbt_ffi_load32((iter_base) + 20)); index875 = index875 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index875 * 8) - let result593 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result873 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array594.push(result593) + array874.push(result873) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted597 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted877 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result596 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result876 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result596}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result876}) } _ => panic() } - let lifted599 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted879 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result598 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result878 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result598}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result878}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result592, allowed_suffixes : array594, min : lifted597, max : lifted599}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result872, allowed_suffixes : array874, min : lifted877, max : lifted879}) } 31 => { - let array623 : Array[@types.UnionBranch] = []; - for index624 = 0; index624 < (mbt_ffi_load32((iter_base) + 12)); index624 = index624 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index624 * 92) + let array903 : Array[@types.UnionBranch] = []; + for index904 = 0; index904 < (mbt_ffi_load32((iter_base) + 12)); index904 = index904 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index904 * 92) - let result600 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result880 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted609 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted889 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result601 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result881 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result601) + @types.DiscriminatorRule::Prefix(result881) } 1 => { - let result602 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result882 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result602) + @types.DiscriminatorRule::Suffix(result882) } 2 => { - let result603 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result883 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result603) + @types.DiscriminatorRule::Contains(result883) } 3 => { - let result604 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result884 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result604) + @types.DiscriminatorRule::Regex(result884) } 4 => { - let result605 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result885 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted607 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted887 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result606 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result886 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result606) + Option::Some(result886) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result605, literal : lifted607}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result885, literal : lifted887}) } 5 => { - let result608 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result888 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result608) + @types.DiscriminatorRule::FieldAbsent(result888) } _ => panic() } - let lifted611 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted891 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result610 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result890 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result610) + Option::Some(result890) } _ => panic() } - let array613 : Array[String] = []; - for index614 = 0; index614 < (mbt_ffi_load32((iter_base) + 52)); index614 = index614 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index614 * 8) + let array893 : Array[String] = []; + for index894 = 0; index894 < (mbt_ffi_load32((iter_base) + 52)); index894 = index894 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index894 * 8) - let result612 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result892 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array613.push(result612) + array893.push(result892) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array616 : Array[String] = []; - for index617 = 0; index617 < (mbt_ffi_load32((iter_base) + 60)); index617 = index617 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index617 * 8) + let array896 : Array[String] = []; + for index897 = 0; index897 < (mbt_ffi_load32((iter_base) + 60)); index897 = index897 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index897 * 8) - let result615 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result895 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array616.push(result615) + array896.push(result895) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted619 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted899 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result618 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result898 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result618) + Option::Some(result898) } _ => panic() } - let lifted622 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted902 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted621 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted901 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -33395,57 +50195,57 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result620 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result900 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result620) + @types.Role::Other(result900) } _ => panic() } - Option::Some(lifted621) + Option::Some(lifted901) } _ => panic() } - array623.push(@types.UnionBranch::{tag : result600, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted609, metadata : @types.MetadataEnvelope::{doc : lifted611, aliases : array613, examples : array616, deprecated : lifted619, role : lifted622}}) + array903.push(@types.UnionBranch::{tag : result880, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted889, metadata : @types.MetadataEnvelope::{doc : lifted891, aliases : array893, examples : array896, deprecated : lifted899, role : lifted902}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array623}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array903}) } 32 => { - let lifted626 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted906 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result625 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result905 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result625) + Option::Some(result905) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted626}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted906}) } 33 => { - let lifted628 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted908 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result627 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result907 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result627) + Option::Some(result907) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted628}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted908}) } 34 => { - let lifted629 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted909 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -33454,11 +50254,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::FutureType(lifted629) + @types.SchemaTypeBody::FutureType(lifted909) } 35 => { - let lifted630 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted910 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -33467,58 +50267,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::StreamType(lifted630) + @types.SchemaTypeBody::StreamType(lifted910) } _ => panic() } - let lifted633 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted913 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result632 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result912 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result632) + Option::Some(result912) } _ => panic() } - let array635 : Array[String] = []; - for index636 = 0; index636 < (mbt_ffi_load32((iter_base) + 104)); index636 = index636 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index636 * 8) + let array915 : Array[String] = []; + for index916 = 0; index916 < (mbt_ffi_load32((iter_base) + 104)); index916 = index916 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index916 * 8) - let result634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result914 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array635.push(result634) + array915.push(result914) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array638 : Array[String] = []; - for index639 = 0; index639 < (mbt_ffi_load32((iter_base) + 112)); index639 = index639 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index639 * 8) + let array918 : Array[String] = []; + for index919 = 0; index919 < (mbt_ffi_load32((iter_base) + 112)); index919 = index919 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index919 * 8) - let result637 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result917 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array638.push(result637) + array918.push(result917) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted641 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted921 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result640 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result920 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result640) + Option::Some(result920) } _ => panic() } - let lifted644 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted924 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted643 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted923 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -33533,48 +50333,48 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result642 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result922 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result642) + @types.Role::Other(result922) } _ => panic() } - Option::Some(lifted643) + Option::Some(lifted923) } _ => panic() } - array645.push(@types.SchemaTypeNode::{body : lifted631, metadata : @types.MetadataEnvelope::{doc : lifted633, aliases : array635, examples : array638, deprecated : lifted641, role : lifted644}}) + array925.push(@types.SchemaTypeNode::{body : lifted911, metadata : @types.MetadataEnvelope::{doc : lifted913, aliases : array915, examples : array918, deprecated : lifted921, role : lifted924}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) - let array650 : Array[@types.SchemaTypeDef] = []; - for index651 = 0; index651 < (mbt_ffi_load32((iter_base) + 56)); index651 = index651 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index651 * 24) + let array930 : Array[@types.SchemaTypeDef] = []; + for index931 = 0; index931 < (mbt_ffi_load32((iter_base) + 56)); index931 = index931 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index931 * 24) - let result647 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result927 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted649 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted929 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result648 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result928 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result648) + Option::Some(result928) } _ => panic() } - array650.push(@types.SchemaTypeDef::{id : result647, name : lifted649, body : mbt_ffi_load32((iter_base) + 20)}) + array930.push(@types.SchemaTypeDef::{id : result927, name : lifted929, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 52)) - let array682 : Array[@types.SchemaValueNode] = []; - for index683 = 0; index683 < (mbt_ffi_load32((iter_base) + 68)); index683 = index683 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index683 * 32) + let array962 : Array[@types.SchemaValueNode] = []; + for index963 = 0; index963 < (mbt_ffi_load32((iter_base) + 68)); index963 = index963 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index963 * 32) - let lifted681 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted961 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -33625,25 +50425,25 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 12 => { - let result652 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result932 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result652) + @types.SchemaValueNode::StringValue(result932) } 13 => { - let array653 : Array[Int] = []; - for index654 = 0; index654 < (mbt_ffi_load32((iter_base) + 12)); index654 = index654 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index654 * 4) + let array933 : Array[Int] = []; + for index934 = 0; index934 < (mbt_ffi_load32((iter_base) + 12)); index934 = index934 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index934 * 4) - array653.push(mbt_ffi_load32((iter_base) + 0)) + array933.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array653) + @types.SchemaValueNode::RecordValue(array933) } 14 => { - let lifted655 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted935 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -33652,7 +50452,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted655}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted935}) } 15 => { @@ -33660,67 +50460,67 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 16 => { - let array656 : Array[Bool] = []; - for index657 = 0; index657 < (mbt_ffi_load32((iter_base) + 12)); index657 = index657 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index657 * 1) + let array936 : Array[Bool] = []; + for index937 = 0; index937 < (mbt_ffi_load32((iter_base) + 12)); index937 = index937 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index937 * 1) - array656.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array936.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array656) + @types.SchemaValueNode::FlagsValue(array936) } 17 => { - let array658 : Array[Int] = []; - for index659 = 0; index659 < (mbt_ffi_load32((iter_base) + 12)); index659 = index659 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index659 * 4) + let array938 : Array[Int] = []; + for index939 = 0; index939 < (mbt_ffi_load32((iter_base) + 12)); index939 = index939 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index939 * 4) - array658.push(mbt_ffi_load32((iter_base) + 0)) + array938.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array658) + @types.SchemaValueNode::TupleValue(array938) } 18 => { - let array660 : Array[Int] = []; - for index661 = 0; index661 < (mbt_ffi_load32((iter_base) + 12)); index661 = index661 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index661 * 4) + let array940 : Array[Int] = []; + for index941 = 0; index941 < (mbt_ffi_load32((iter_base) + 12)); index941 = index941 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index941 * 4) - array660.push(mbt_ffi_load32((iter_base) + 0)) + array940.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array660) + @types.SchemaValueNode::ListValue(array940) } 19 => { - let array662 : Array[Int] = []; - for index663 = 0; index663 < (mbt_ffi_load32((iter_base) + 12)); index663 = index663 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index663 * 4) + let array942 : Array[Int] = []; + for index943 = 0; index943 < (mbt_ffi_load32((iter_base) + 12)); index943 = index943 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index943 * 4) - array662.push(mbt_ffi_load32((iter_base) + 0)) + array942.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array662) + @types.SchemaValueNode::FixedListValue(array942) } 20 => { - let array664 : Array[@types.MapEntry] = []; - for index665 = 0; index665 < (mbt_ffi_load32((iter_base) + 12)); index665 = index665 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index665 * 8) + let array944 : Array[@types.MapEntry] = []; + for index945 = 0; index945 < (mbt_ffi_load32((iter_base) + 12)); index945 = index945 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index945 * 8) - array664.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array944.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array664) + @types.SchemaValueNode::MapValue(array944) } 21 => { - let lifted666 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted946 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -33729,14 +50529,14 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::OptionValue(lifted666) + @types.SchemaValueNode::OptionValue(lifted946) } 22 => { - let lifted669 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted949 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted667 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted947 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -33745,11 +50545,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::OkValue(lifted667) + @types.ResultValuePayload::OkValue(lifted947) } 1 => { - let lifted668 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted948 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -33758,58 +50558,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::ErrValue(lifted668) + @types.ResultValuePayload::ErrValue(lifted948) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted669) + @types.SchemaValueNode::ResultValue(lifted949) } 23 => { - let result670 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result950 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted672 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted952 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result951 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result671) + Option::Some(result951) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result670, language : lifted672}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result950, language : lifted952}) } 24 => { - let result673 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result953 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted675 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted955 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result674 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result954 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result674) + Option::Some(result954) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result673, mime_type : lifted675}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result953, mime_type : lifted955}) } 25 => { - let result676 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result956 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result676) + @types.SchemaValueNode::PathValue(result956) } 26 => { - let result677 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result957 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result677) + @types.SchemaValueNode::UrlValue(result957) } 27 => { @@ -33821,21 +50621,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 29 => { - let result678 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result958 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result678}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result958}) } 30 => { - let result679 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result959 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result679, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result959, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result680 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result960 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result680}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result960}) } 32 => { @@ -33844,29 +50644,29 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array682.push(lifted681) + array962.push(lifted961) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array645, defs : array650, root : mbt_ffi_load32((iter_base) + 60)}, value : @types.SchemaValueTree::{value_nodes : array682, root : mbt_ffi_load32((iter_base) + 72)}}) + Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array925, defs : array930, root : mbt_ffi_load32((iter_base) + 60)}, value : @types.SchemaValueTree::{value_nodes : array962, root : mbt_ffi_load32((iter_base) + 72)}}) } _ => panic() } - PublicOplogEntry::Cancelled(CancelledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), partial : lifted684}) + PublicOplogEntry::Cancelled(CancelledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, start_index : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), partial : lifted964}) } 4 => { - let lifted1059 = match (mbt_ffi_load8_u((iter_base) + 32)) { + let lifted1479 = match (mbt_ffi_load8_u((iter_base) + 32)) { 0 => { - let result685 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result965 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let array812 : Array[@types.SchemaTypeNode] = []; - for index813 = 0; index813 < (mbt_ffi_load32((iter_base) + 52)); index813 = index813 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index813 * 144) + let array1162 : Array[@types.SchemaTypeNode] = []; + for index1163 = 0; index1163 < (mbt_ffi_load32((iter_base) + 52)); index1163 = index1163 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1163 * 144) - let lifted798 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1148 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -33877,43 +50677,743 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 2 => { - @types.SchemaTypeBody::S8Type + let lifted972 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted967 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted966 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted966) + } + _ => panic() + } + + let lifted969 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted968 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted968) + } + _ => panic() + } + + let lifted971 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result970 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result970) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted967, max : lifted969, unit : lifted971}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted972) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted979 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted974 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted973 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted973) + } + _ => panic() + } + + let lifted976 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted975 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted975) + } + _ => panic() + } + + let lifted978 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result977 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result977) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted974, max : lifted976, unit : lifted978}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted979) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted986 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted981 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted980 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted980) + } + _ => panic() + } + + let lifted983 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted982 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted982) + } + _ => panic() + } + + let lifted985 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result984 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result984) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted981, max : lifted983, unit : lifted985}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted986) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted993 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted988 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted987 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted987) + } + _ => panic() + } + + let lifted990 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted989 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted989) + } + _ => panic() + } + + let lifted992 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result991 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result991) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted988, max : lifted990, unit : lifted992}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted993) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted1000 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted995 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted994 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted994) + } + _ => panic() + } + + let lifted997 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted996 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted996) + } + _ => panic() + } + + let lifted999 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result998 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result998) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted995, max : lifted997, unit : lifted999}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1000) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted1007 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1002 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1001 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1001) + } + _ => panic() + } + + let lifted1004 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1003 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1003) + } + _ => panic() + } + + let lifted1006 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1005 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1005) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1002, max : lifted1004, unit : lifted1006}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1007) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted1014 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1009 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1008 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1008) + } + _ => panic() + } + + let lifted1011 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1010 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1010) + } + _ => panic() + } + + let lifted1013 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1012 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1012) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1009, max : lifted1011, unit : lifted1013}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1014) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted1021 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1016 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1015 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1015) + } + _ => panic() + } + + let lifted1018 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1017 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1017) + } + _ => panic() + } + + let lifted1020 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1019 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1019) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1016, max : lifted1018, unit : lifted1020}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1021) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted1028 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1023 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1022 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1022) + } + _ => panic() + } + + let lifted1025 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1024 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1024) + } + _ => panic() + } + + let lifted1027 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1026 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1026) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1023, max : lifted1025, unit : lifted1027}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1028) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted1035 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1030 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1029 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1029) + } + _ => panic() + } + + let lifted1032 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1031 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1031) + } + _ => panic() + } + + let lifted1034 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1033 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1033) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1030, max : lifted1032, unit : lifted1034}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1035) } 12 => { @@ -33925,59 +51425,59 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 14 => { - let array700 : Array[@types.NamedFieldType] = []; - for index701 = 0; index701 < (mbt_ffi_load32((iter_base) + 12)); index701 = index701 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index701 * 68) + let array1050 : Array[@types.NamedFieldType] = []; + for index1051 = 0; index1051 < (mbt_ffi_load32((iter_base) + 12)); index1051 = index1051 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1051 * 68) - let result686 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1036 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted688 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1038 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result687 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1037 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result687) + Option::Some(result1037) } _ => panic() } - let array690 : Array[String] = []; - for index691 = 0; index691 < (mbt_ffi_load32((iter_base) + 28)); index691 = index691 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index691 * 8) + let array1040 : Array[String] = []; + for index1041 = 0; index1041 < (mbt_ffi_load32((iter_base) + 28)); index1041 = index1041 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1041 * 8) - let result689 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1039 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array690.push(result689) + array1040.push(result1039) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array693 : Array[String] = []; - for index694 = 0; index694 < (mbt_ffi_load32((iter_base) + 36)); index694 = index694 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index694 * 8) + let array1043 : Array[String] = []; + for index1044 = 0; index1044 < (mbt_ffi_load32((iter_base) + 36)); index1044 = index1044 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1044 * 8) - let result692 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1042 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array693.push(result692) + array1043.push(result1042) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted696 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted1046 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result695 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1045 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result695) + Option::Some(result1045) } _ => panic() } - let lifted699 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted1049 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted698 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted1048 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -33992,33 +51492,33 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result697 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result1047 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result697) + @types.Role::Other(result1047) } _ => panic() } - Option::Some(lifted698) + Option::Some(lifted1048) } _ => panic() } - array700.push(@types.NamedFieldType::{name : result686, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted688, aliases : array690, examples : array693, deprecated : lifted696, role : lifted699}}) + array1050.push(@types.NamedFieldType::{name : result1036, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1038, aliases : array1040, examples : array1043, deprecated : lifted1046, role : lifted1049}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array700) + @types.SchemaTypeBody::RecordType(array1050) } 15 => { - let array717 : Array[@types.VariantCaseType] = []; - for index718 = 0; index718 < (mbt_ffi_load32((iter_base) + 12)); index718 = index718 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index718 * 72) + let array1067 : Array[@types.VariantCaseType] = []; + for index1068 = 0; index1068 < (mbt_ffi_load32((iter_base) + 12)); index1068 = index1068 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1068 * 72) - let result702 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1052 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted703 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1053 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -34027,53 +51527,53 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted705 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1055 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result704 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1054 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result704) + Option::Some(result1054) } _ => panic() } - let array707 : Array[String] = []; - for index708 = 0; index708 < (mbt_ffi_load32((iter_base) + 32)); index708 = index708 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index708 * 8) + let array1057 : Array[String] = []; + for index1058 = 0; index1058 < (mbt_ffi_load32((iter_base) + 32)); index1058 = index1058 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1058 * 8) - let result706 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1056 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array707.push(result706) + array1057.push(result1056) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array710 : Array[String] = []; - for index711 = 0; index711 < (mbt_ffi_load32((iter_base) + 40)); index711 = index711 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index711 * 8) + let array1060 : Array[String] = []; + for index1061 = 0; index1061 < (mbt_ffi_load32((iter_base) + 40)); index1061 = index1061 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1061 * 8) - let result709 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1059 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array710.push(result709) + array1060.push(result1059) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted713 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1063 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result712 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1062 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result712) + Option::Some(result1062) } _ => panic() } - let lifted716 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1066 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted715 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1065 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -34088,63 +51588,63 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1064 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result714) + @types.Role::Other(result1064) } _ => panic() } - Option::Some(lifted715) + Option::Some(lifted1065) } _ => panic() } - array717.push(@types.VariantCaseType::{name : result702, payload : lifted703, metadata : @types.MetadataEnvelope::{doc : lifted705, aliases : array707, examples : array710, deprecated : lifted713, role : lifted716}}) + array1067.push(@types.VariantCaseType::{name : result1052, payload : lifted1053, metadata : @types.MetadataEnvelope::{doc : lifted1055, aliases : array1057, examples : array1060, deprecated : lifted1063, role : lifted1066}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array717) + @types.SchemaTypeBody::VariantType(array1067) } 16 => { - let array720 : Array[String] = []; - for index721 = 0; index721 < (mbt_ffi_load32((iter_base) + 12)); index721 = index721 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index721 * 8) + let array1070 : Array[String] = []; + for index1071 = 0; index1071 < (mbt_ffi_load32((iter_base) + 12)); index1071 = index1071 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1071 * 8) - let result719 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1069 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array720.push(result719) + array1070.push(result1069) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array720) + @types.SchemaTypeBody::EnumType(array1070) } 17 => { - let array723 : Array[String] = []; - for index724 = 0; index724 < (mbt_ffi_load32((iter_base) + 12)); index724 = index724 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index724 * 8) + let array1073 : Array[String] = []; + for index1074 = 0; index1074 < (mbt_ffi_load32((iter_base) + 12)); index1074 = index1074 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1074 * 8) - let result722 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1072 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array723.push(result722) + array1073.push(result1072) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array723) + @types.SchemaTypeBody::FlagsType(array1073) } 18 => { - let array725 : Array[Int] = []; - for index726 = 0; index726 < (mbt_ffi_load32((iter_base) + 12)); index726 = index726 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index726 * 4) + let array1075 : Array[Int] = []; + for index1076 = 0; index1076 < (mbt_ffi_load32((iter_base) + 12)); index1076 = index1076 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1076 * 4) - array725.push(mbt_ffi_load32((iter_base) + 0)) + array1075.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array725) + @types.SchemaTypeBody::TupleType(array1075) } 19 => { @@ -34164,7 +51664,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 23 => { - let lifted727 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1077 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -34173,7 +51673,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted728 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1078 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -34182,30 +51682,30 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted727, err : lifted728}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1077, err : lifted1078}) } 24 => { - let lifted732 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1082 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array730 : Array[String] = []; - for index731 = 0; index731 < (mbt_ffi_load32((iter_base) + 16)); index731 = index731 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index731 * 8) + let array1080 : Array[String] = []; + for index1081 = 0; index1081 < (mbt_ffi_load32((iter_base) + 16)); index1081 = index1081 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1081 * 8) - let result729 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1079 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array730.push(result729) + array1080.push(result1079) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array730) + Option::Some(array1080) } _ => panic() } - let lifted733 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1083 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -34214,7 +51714,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted734 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1084 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -34223,41 +51723,41 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted736 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1086 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result735 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1085 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result735) + Option::Some(result1085) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted732, min_length : lifted733, max_length : lifted734, regex : lifted736}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1082, min_length : lifted1083, max_length : lifted1084, regex : lifted1086}) } 25 => { - let lifted740 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1090 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array738 : Array[String] = []; - for index739 = 0; index739 < (mbt_ffi_load32((iter_base) + 16)); index739 = index739 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index739 * 8) + let array1088 : Array[String] = []; + for index1089 = 0; index1089 < (mbt_ffi_load32((iter_base) + 16)); index1089 = index1089 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1089 * 8) - let result737 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1087 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array738.push(result737) + array1088.push(result1087) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array738) + Option::Some(array1088) } _ => panic() } - let lifted741 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1091 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -34266,7 +51766,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted742 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1092 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -34275,91 +51775,91 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted740, min_bytes : lifted741, max_bytes : lifted742}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1090, min_bytes : lifted1091, max_bytes : lifted1092}) } 26 => { - let lifted746 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1096 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array744 : Array[String] = []; - for index745 = 0; index745 < (mbt_ffi_load32((iter_base) + 20)); index745 = index745 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index745 * 8) + let array1094 : Array[String] = []; + for index1095 = 0; index1095 < (mbt_ffi_load32((iter_base) + 20)); index1095 = index1095 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1095 * 8) - let result743 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1093 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array744.push(result743) + array1094.push(result1093) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array744) + Option::Some(array1094) } _ => panic() } - let lifted750 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1100 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array748 : Array[String] = []; - for index749 = 0; index749 < (mbt_ffi_load32((iter_base) + 32)); index749 = index749 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index749 * 8) + let array1098 : Array[String] = []; + for index1099 = 0; index1099 < (mbt_ffi_load32((iter_base) + 32)); index1099 = index1099 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1099 * 8) - let result747 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1097 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array748.push(result747) + array1098.push(result1097) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array748) + Option::Some(array1098) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted746, allowed_extensions : lifted750}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1096, allowed_extensions : lifted1100}) } 27 => { - let lifted754 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1104 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array752 : Array[String] = []; - for index753 = 0; index753 < (mbt_ffi_load32((iter_base) + 16)); index753 = index753 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index753 * 8) + let array1102 : Array[String] = []; + for index1103 = 0; index1103 < (mbt_ffi_load32((iter_base) + 16)); index1103 = index1103 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1103 * 8) - let result751 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1101 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array752.push(result751) + array1102.push(result1101) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array752) + Option::Some(array1102) } _ => panic() } - let lifted758 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1108 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array756 : Array[String] = []; - for index757 = 0; index757 < (mbt_ffi_load32((iter_base) + 28)); index757 = index757 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index757 * 8) + let array1106 : Array[String] = []; + for index1107 = 0; index1107 < (mbt_ffi_load32((iter_base) + 28)); index1107 = index1107 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1107 * 8) - let result755 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array756.push(result755) + array1106.push(result1105) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array756) + Option::Some(array1106) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted754, allowed_hosts : lifted758}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1104, allowed_hosts : lifted1108}) } 28 => { @@ -34371,148 +51871,148 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 30 => { - let result759 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array761 : Array[String] = []; - for index762 = 0; index762 < (mbt_ffi_load32((iter_base) + 20)); index762 = index762 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index762 * 8) + let array1111 : Array[String] = []; + for index1112 = 0; index1112 < (mbt_ffi_load32((iter_base) + 20)); index1112 = index1112 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1112 * 8) - let result760 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array761.push(result760) + array1111.push(result1110) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted764 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1114 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result763 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result763}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1113}) } _ => panic() } - let lifted766 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1116 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result765 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result765}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1115}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result759, allowed_suffixes : array761, min : lifted764, max : lifted766}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1109, allowed_suffixes : array1111, min : lifted1114, max : lifted1116}) } 31 => { - let array790 : Array[@types.UnionBranch] = []; - for index791 = 0; index791 < (mbt_ffi_load32((iter_base) + 12)); index791 = index791 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index791 * 92) + let array1140 : Array[@types.UnionBranch] = []; + for index1141 = 0; index1141 < (mbt_ffi_load32((iter_base) + 12)); index1141 = index1141 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1141 * 92) - let result767 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted776 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1126 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result768 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result768) + @types.DiscriminatorRule::Prefix(result1118) } 1 => { - let result769 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1119 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result769) + @types.DiscriminatorRule::Suffix(result1119) } 2 => { - let result770 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result770) + @types.DiscriminatorRule::Contains(result1120) } 3 => { - let result771 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result771) + @types.DiscriminatorRule::Regex(result1121) } 4 => { - let result772 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1122 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted774 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1124 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result773 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result773) + Option::Some(result1123) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result772, literal : lifted774}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1122, literal : lifted1124}) } 5 => { - let result775 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result775) + @types.DiscriminatorRule::FieldAbsent(result1125) } _ => panic() } - let lifted778 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1128 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result777 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result777) + Option::Some(result1127) } _ => panic() } - let array780 : Array[String] = []; - for index781 = 0; index781 < (mbt_ffi_load32((iter_base) + 52)); index781 = index781 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index781 * 8) + let array1130 : Array[String] = []; + for index1131 = 0; index1131 < (mbt_ffi_load32((iter_base) + 52)); index1131 = index1131 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1131 * 8) - let result779 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array780.push(result779) + array1130.push(result1129) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array783 : Array[String] = []; - for index784 = 0; index784 < (mbt_ffi_load32((iter_base) + 60)); index784 = index784 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index784 * 8) + let array1133 : Array[String] = []; + for index1134 = 0; index1134 < (mbt_ffi_load32((iter_base) + 60)); index1134 = index1134 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1134 * 8) - let result782 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array783.push(result782) + array1133.push(result1132) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted786 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1136 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result785 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result785) + Option::Some(result1135) } _ => panic() } - let lifted789 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1139 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted788 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1138 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -34527,57 +52027,57 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result787 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result787) + @types.Role::Other(result1137) } _ => panic() } - Option::Some(lifted788) + Option::Some(lifted1138) } _ => panic() } - array790.push(@types.UnionBranch::{tag : result767, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted776, metadata : @types.MetadataEnvelope::{doc : lifted778, aliases : array780, examples : array783, deprecated : lifted786, role : lifted789}}) + array1140.push(@types.UnionBranch::{tag : result1117, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1126, metadata : @types.MetadataEnvelope::{doc : lifted1128, aliases : array1130, examples : array1133, deprecated : lifted1136, role : lifted1139}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array790}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1140}) } 32 => { - let lifted793 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1143 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result792 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result792) + Option::Some(result1142) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted793}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1143}) } 33 => { - let lifted795 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1145 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result794 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result794) + Option::Some(result1144) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted795}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1145}) } 34 => { - let lifted796 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1146 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -34586,11 +52086,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::FutureType(lifted796) + @types.SchemaTypeBody::FutureType(lifted1146) } 35 => { - let lifted797 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1147 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -34599,58 +52099,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::StreamType(lifted797) + @types.SchemaTypeBody::StreamType(lifted1147) } _ => panic() } - let lifted800 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1150 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result799 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result799) + Option::Some(result1149) } _ => panic() } - let array802 : Array[String] = []; - for index803 = 0; index803 < (mbt_ffi_load32((iter_base) + 104)); index803 = index803 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index803 * 8) + let array1152 : Array[String] = []; + for index1153 = 0; index1153 < (mbt_ffi_load32((iter_base) + 104)); index1153 = index1153 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1153 * 8) - let result801 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array802.push(result801) + array1152.push(result1151) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array805 : Array[String] = []; - for index806 = 0; index806 < (mbt_ffi_load32((iter_base) + 112)); index806 = index806 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index806 * 8) + let array1155 : Array[String] = []; + for index1156 = 0; index1156 < (mbt_ffi_load32((iter_base) + 112)); index1156 = index1156 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1156 * 8) - let result804 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1154 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array805.push(result804) + array1155.push(result1154) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted808 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1158 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result807 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result807) + Option::Some(result1157) } _ => panic() } - let lifted811 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1161 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted810 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1160 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -34665,48 +52165,48 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result809 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1159 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result809) + @types.Role::Other(result1159) } _ => panic() } - Option::Some(lifted810) + Option::Some(lifted1160) } _ => panic() } - array812.push(@types.SchemaTypeNode::{body : lifted798, metadata : @types.MetadataEnvelope::{doc : lifted800, aliases : array802, examples : array805, deprecated : lifted808, role : lifted811}}) + array1162.push(@types.SchemaTypeNode::{body : lifted1148, metadata : @types.MetadataEnvelope::{doc : lifted1150, aliases : array1152, examples : array1155, deprecated : lifted1158, role : lifted1161}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array817 : Array[@types.SchemaTypeDef] = []; - for index818 = 0; index818 < (mbt_ffi_load32((iter_base) + 60)); index818 = index818 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index818 * 24) + let array1167 : Array[@types.SchemaTypeDef] = []; + for index1168 = 0; index1168 < (mbt_ffi_load32((iter_base) + 60)); index1168 = index1168 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1168 * 24) - let result814 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1164 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted816 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1166 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result815 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result815) + Option::Some(result1165) } _ => panic() } - array817.push(@types.SchemaTypeDef::{id : result814, name : lifted816, body : mbt_ffi_load32((iter_base) + 20)}) + array1167.push(@types.SchemaTypeDef::{id : result1164, name : lifted1166, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let array849 : Array[@types.SchemaValueNode] = []; - for index850 = 0; index850 < (mbt_ffi_load32((iter_base) + 72)); index850 = index850 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index850 * 32) + let array1199 : Array[@types.SchemaValueNode] = []; + for index1200 = 0; index1200 < (mbt_ffi_load32((iter_base) + 72)); index1200 = index1200 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index1200 * 32) - let lifted848 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1198 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -34757,25 +52257,25 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 12 => { - let result819 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result819) + @types.SchemaValueNode::StringValue(result1169) } 13 => { - let array820 : Array[Int] = []; - for index821 = 0; index821 < (mbt_ffi_load32((iter_base) + 12)); index821 = index821 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index821 * 4) + let array1170 : Array[Int] = []; + for index1171 = 0; index1171 < (mbt_ffi_load32((iter_base) + 12)); index1171 = index1171 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1171 * 4) - array820.push(mbt_ffi_load32((iter_base) + 0)) + array1170.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array820) + @types.SchemaValueNode::RecordValue(array1170) } 14 => { - let lifted822 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1172 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -34784,7 +52284,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted822}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1172}) } 15 => { @@ -34792,67 +52292,67 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 16 => { - let array823 : Array[Bool] = []; - for index824 = 0; index824 < (mbt_ffi_load32((iter_base) + 12)); index824 = index824 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index824 * 1) + let array1173 : Array[Bool] = []; + for index1174 = 0; index1174 < (mbt_ffi_load32((iter_base) + 12)); index1174 = index1174 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1174 * 1) - array823.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1173.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array823) + @types.SchemaValueNode::FlagsValue(array1173) } 17 => { - let array825 : Array[Int] = []; - for index826 = 0; index826 < (mbt_ffi_load32((iter_base) + 12)); index826 = index826 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index826 * 4) + let array1175 : Array[Int] = []; + for index1176 = 0; index1176 < (mbt_ffi_load32((iter_base) + 12)); index1176 = index1176 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1176 * 4) - array825.push(mbt_ffi_load32((iter_base) + 0)) + array1175.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array825) + @types.SchemaValueNode::TupleValue(array1175) } 18 => { - let array827 : Array[Int] = []; - for index828 = 0; index828 < (mbt_ffi_load32((iter_base) + 12)); index828 = index828 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index828 * 4) + let array1177 : Array[Int] = []; + for index1178 = 0; index1178 < (mbt_ffi_load32((iter_base) + 12)); index1178 = index1178 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1178 * 4) - array827.push(mbt_ffi_load32((iter_base) + 0)) + array1177.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array827) + @types.SchemaValueNode::ListValue(array1177) } 19 => { - let array829 : Array[Int] = []; - for index830 = 0; index830 < (mbt_ffi_load32((iter_base) + 12)); index830 = index830 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index830 * 4) + let array1179 : Array[Int] = []; + for index1180 = 0; index1180 < (mbt_ffi_load32((iter_base) + 12)); index1180 = index1180 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1180 * 4) - array829.push(mbt_ffi_load32((iter_base) + 0)) + array1179.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array829) + @types.SchemaValueNode::FixedListValue(array1179) } 20 => { - let array831 : Array[@types.MapEntry] = []; - for index832 = 0; index832 < (mbt_ffi_load32((iter_base) + 12)); index832 = index832 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index832 * 8) + let array1181 : Array[@types.MapEntry] = []; + for index1182 = 0; index1182 < (mbt_ffi_load32((iter_base) + 12)); index1182 = index1182 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1182 * 8) - array831.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1181.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array831) + @types.SchemaValueNode::MapValue(array1181) } 21 => { - let lifted833 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1183 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -34861,14 +52361,14 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::OptionValue(lifted833) + @types.SchemaValueNode::OptionValue(lifted1183) } 22 => { - let lifted836 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1186 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted834 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1184 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -34877,11 +52377,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::OkValue(lifted834) + @types.ResultValuePayload::OkValue(lifted1184) } 1 => { - let lifted835 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1185 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -34890,58 +52390,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::ErrValue(lifted835) + @types.ResultValuePayload::ErrValue(lifted1185) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted836) + @types.SchemaValueNode::ResultValue(lifted1186) } 23 => { - let result837 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted839 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1189 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result838 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result838) + Option::Some(result1188) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result837, language : lifted839}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1187, language : lifted1189}) } 24 => { - let result840 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1190 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted842 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1192 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result841 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1191 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result841) + Option::Some(result1191) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result840, mime_type : lifted842}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1190, mime_type : lifted1192}) } 25 => { - let result843 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result843) + @types.SchemaValueNode::PathValue(result1193) } 26 => { - let result844 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result844) + @types.SchemaValueNode::UrlValue(result1194) } 27 => { @@ -34953,21 +52453,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 29 => { - let result845 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result845}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1195}) } 30 => { - let result846 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result846, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1196, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result847 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result847}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1197}) } 32 => { @@ -34976,47 +52476,47 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array849.push(lifted848) + array1199.push(lifted1198) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - let result851 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) + let result1201 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) - let array853 : Array[String] = []; - for index854 = 0; index854 < (mbt_ffi_load32((iter_base) + 92)); index854 = index854 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index854 * 8) + let array1203 : Array[String] = []; + for index1204 = 0; index1204 < (mbt_ffi_load32((iter_base) + 92)); index1204 = index1204 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index1204 * 8) - let result852 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array853.push(result852) + array1203.push(result1202) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - let array868 : Array[Array[SpanData]] = []; - for index869 = 0; index869 < (mbt_ffi_load32((iter_base) + 100)); index869 = index869 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index869 * 8) + let array1218 : Array[Array[SpanData]] = []; + for index1219 = 0; index1219 < (mbt_ffi_load32((iter_base) + 100)); index1219 = index1219 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index1219 * 8) - let array866 : Array[SpanData] = []; - for index867 = 0; index867 < (mbt_ffi_load32((iter_base) + 4)); index867 = index867 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index867 * 80) + let array1216 : Array[SpanData] = []; + for index1217 = 0; index1217 < (mbt_ffi_load32((iter_base) + 4)); index1217 = index1217 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1217 * 80) - let lifted865 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1215 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result855 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted857 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted1207 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result856 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result1206 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result856) + Option::Some(result1206) } _ => panic() } - let lifted858 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted1208 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -35025,58 +52525,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let array862 : Array[@context.Attribute] = []; - for index863 = 0; index863 < (mbt_ffi_load32((iter_base) + 68)); index863 = index863 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index863 * 20) + let array1212 : Array[@context.Attribute] = []; + for index1213 = 0; index1213 < (mbt_ffi_load32((iter_base) + 68)); index1213 = index1213 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1213 * 20) - let result859 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1209 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted861 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1211 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result860 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1210 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result860) + @context.AttributeValue::String(result1210) } _ => panic() } - array862.push(@context.Attribute::{key : result859, value : lifted861}) + array1212.push(@context.Attribute::{key : result1209, value : lifted1211}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result855, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted857, linked_context : lifted858, attributes : array862, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result1205, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1207, linked_context : lifted1208, attributes : array1212, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result864 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1214 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result864}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result1214}) } _ => panic() } - array866.push(lifted865) + array1216.push(lifted1215) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array868.push(array866) + array1218.push(array1216) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 96)) - AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result685, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array812, defs : array817, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array849, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result851, trace_states : array853, invocation_context : array868}) + AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result965, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1162, defs : array1167, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array1199, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result1201, trace_states : array1203, invocation_context : array1218}) } 1 => { - let result870 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let result871 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1221 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - let array998 : Array[@types.SchemaTypeNode] = []; - for index999 = 0; index999 < (mbt_ffi_load32((iter_base) + 60)); index999 = index999 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index999 * 144) + let array1418 : Array[@types.SchemaTypeNode] = []; + for index1419 = 0; index1419 < (mbt_ffi_load32((iter_base) + 60)); index1419 = index1419 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1419 * 144) - let lifted984 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1404 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -35087,43 +52587,743 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 2 => { - @types.SchemaTypeBody::S8Type + let lifted1228 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1223 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1222 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1222) + } + _ => panic() + } + + let lifted1225 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1224 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1224) + } + _ => panic() + } + + let lifted1227 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1226) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1223, max : lifted1225, unit : lifted1227}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1228) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted1235 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1230 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1229 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1229) + } + _ => panic() + } + + let lifted1232 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1231 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1231) + } + _ => panic() + } + + let lifted1234 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1233) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1230, max : lifted1232, unit : lifted1234}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1235) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted1242 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1237 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1236 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1236) + } + _ => panic() + } + + let lifted1239 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1238 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1238) + } + _ => panic() + } + + let lifted1241 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1240 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1240) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1237, max : lifted1239, unit : lifted1241}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1242) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted1249 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1244 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1243 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1243) + } + _ => panic() + } + + let lifted1246 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1245 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1245) + } + _ => panic() + } + + let lifted1248 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1247 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1247) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1244, max : lifted1246, unit : lifted1248}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1249) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted1256 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1251 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1250 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1250) + } + _ => panic() + } + + let lifted1253 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1252 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1252) + } + _ => panic() + } + + let lifted1255 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1254 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1254) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1251, max : lifted1253, unit : lifted1255}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1256) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted1263 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1258 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1257 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1257) + } + _ => panic() + } + + let lifted1260 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1259 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1259) + } + _ => panic() + } + + let lifted1262 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1261) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1258, max : lifted1260, unit : lifted1262}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1263) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted1270 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1265 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1264 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1264) + } + _ => panic() + } + + let lifted1267 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1266 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1266) + } + _ => panic() + } + + let lifted1269 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1268) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1265, max : lifted1267, unit : lifted1269}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1270) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted1277 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1272 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1271 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1271) + } + _ => panic() + } + + let lifted1274 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1273 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1273) + } + _ => panic() + } + + let lifted1276 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1275 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1275) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1272, max : lifted1274, unit : lifted1276}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1277) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted1284 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1279 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1278 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1278) + } + _ => panic() + } + + let lifted1281 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1280 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1280) + } + _ => panic() + } + + let lifted1283 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1282 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1282) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1279, max : lifted1281, unit : lifted1283}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1284) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted1291 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1286 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1285 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1285) + } + _ => panic() + } + + let lifted1288 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1287 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1287) + } + _ => panic() + } + + let lifted1290 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1289 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1289) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1286, max : lifted1288, unit : lifted1290}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1291) } 12 => { @@ -35135,59 +53335,59 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 14 => { - let array886 : Array[@types.NamedFieldType] = []; - for index887 = 0; index887 < (mbt_ffi_load32((iter_base) + 12)); index887 = index887 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index887 * 68) + let array1306 : Array[@types.NamedFieldType] = []; + for index1307 = 0; index1307 < (mbt_ffi_load32((iter_base) + 12)); index1307 = index1307 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1307 * 68) - let result872 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1292 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted874 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1294 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result873 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1293 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result873) + Option::Some(result1293) } _ => panic() } - let array876 : Array[String] = []; - for index877 = 0; index877 < (mbt_ffi_load32((iter_base) + 28)); index877 = index877 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index877 * 8) + let array1296 : Array[String] = []; + for index1297 = 0; index1297 < (mbt_ffi_load32((iter_base) + 28)); index1297 = index1297 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1297 * 8) - let result875 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1295 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array876.push(result875) + array1296.push(result1295) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array879 : Array[String] = []; - for index880 = 0; index880 < (mbt_ffi_load32((iter_base) + 36)); index880 = index880 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index880 * 8) + let array1299 : Array[String] = []; + for index1300 = 0; index1300 < (mbt_ffi_load32((iter_base) + 36)); index1300 = index1300 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1300 * 8) - let result878 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array879.push(result878) + array1299.push(result1298) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted882 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted1302 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result881 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1301 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result881) + Option::Some(result1301) } _ => panic() } - let lifted885 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted1305 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted884 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted1304 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -35202,33 +53402,33 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result883 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result1303 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result883) + @types.Role::Other(result1303) } _ => panic() } - Option::Some(lifted884) + Option::Some(lifted1304) } _ => panic() } - array886.push(@types.NamedFieldType::{name : result872, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted874, aliases : array876, examples : array879, deprecated : lifted882, role : lifted885}}) + array1306.push(@types.NamedFieldType::{name : result1292, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1294, aliases : array1296, examples : array1299, deprecated : lifted1302, role : lifted1305}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array886) + @types.SchemaTypeBody::RecordType(array1306) } 15 => { - let array903 : Array[@types.VariantCaseType] = []; - for index904 = 0; index904 < (mbt_ffi_load32((iter_base) + 12)); index904 = index904 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index904 * 72) + let array1323 : Array[@types.VariantCaseType] = []; + for index1324 = 0; index1324 < (mbt_ffi_load32((iter_base) + 12)); index1324 = index1324 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1324 * 72) - let result888 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted889 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1309 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -35237,53 +53437,53 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted891 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1311 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result890 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1310 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result890) + Option::Some(result1310) } _ => panic() } - let array893 : Array[String] = []; - for index894 = 0; index894 < (mbt_ffi_load32((iter_base) + 32)); index894 = index894 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index894 * 8) + let array1313 : Array[String] = []; + for index1314 = 0; index1314 < (mbt_ffi_load32((iter_base) + 32)); index1314 = index1314 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1314 * 8) - let result892 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1312 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array893.push(result892) + array1313.push(result1312) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array896 : Array[String] = []; - for index897 = 0; index897 < (mbt_ffi_load32((iter_base) + 40)); index897 = index897 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index897 * 8) + let array1316 : Array[String] = []; + for index1317 = 0; index1317 < (mbt_ffi_load32((iter_base) + 40)); index1317 = index1317 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1317 * 8) - let result895 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1315 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array896.push(result895) + array1316.push(result1315) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted899 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1319 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result898 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1318 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result898) + Option::Some(result1318) } _ => panic() } - let lifted902 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1322 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted901 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1321 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -35298,63 +53498,63 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result900 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1320 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result900) + @types.Role::Other(result1320) } _ => panic() } - Option::Some(lifted901) + Option::Some(lifted1321) } _ => panic() } - array903.push(@types.VariantCaseType::{name : result888, payload : lifted889, metadata : @types.MetadataEnvelope::{doc : lifted891, aliases : array893, examples : array896, deprecated : lifted899, role : lifted902}}) + array1323.push(@types.VariantCaseType::{name : result1308, payload : lifted1309, metadata : @types.MetadataEnvelope::{doc : lifted1311, aliases : array1313, examples : array1316, deprecated : lifted1319, role : lifted1322}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array903) + @types.SchemaTypeBody::VariantType(array1323) } 16 => { - let array906 : Array[String] = []; - for index907 = 0; index907 < (mbt_ffi_load32((iter_base) + 12)); index907 = index907 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index907 * 8) + let array1326 : Array[String] = []; + for index1327 = 0; index1327 < (mbt_ffi_load32((iter_base) + 12)); index1327 = index1327 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1327 * 8) - let result905 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array906.push(result905) + array1326.push(result1325) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array906) + @types.SchemaTypeBody::EnumType(array1326) } 17 => { - let array909 : Array[String] = []; - for index910 = 0; index910 < (mbt_ffi_load32((iter_base) + 12)); index910 = index910 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index910 * 8) + let array1329 : Array[String] = []; + for index1330 = 0; index1330 < (mbt_ffi_load32((iter_base) + 12)); index1330 = index1330 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1330 * 8) - let result908 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1328 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array909.push(result908) + array1329.push(result1328) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array909) + @types.SchemaTypeBody::FlagsType(array1329) } 18 => { - let array911 : Array[Int] = []; - for index912 = 0; index912 < (mbt_ffi_load32((iter_base) + 12)); index912 = index912 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index912 * 4) + let array1331 : Array[Int] = []; + for index1332 = 0; index1332 < (mbt_ffi_load32((iter_base) + 12)); index1332 = index1332 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1332 * 4) - array911.push(mbt_ffi_load32((iter_base) + 0)) + array1331.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array911) + @types.SchemaTypeBody::TupleType(array1331) } 19 => { @@ -35374,7 +53574,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 23 => { - let lifted913 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1333 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -35383,7 +53583,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted914 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1334 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -35392,30 +53592,30 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted913, err : lifted914}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1333, err : lifted1334}) } 24 => { - let lifted918 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1338 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array916 : Array[String] = []; - for index917 = 0; index917 < (mbt_ffi_load32((iter_base) + 16)); index917 = index917 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index917 * 8) + let array1336 : Array[String] = []; + for index1337 = 0; index1337 < (mbt_ffi_load32((iter_base) + 16)); index1337 = index1337 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1337 * 8) - let result915 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array916.push(result915) + array1336.push(result1335) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array916) + Option::Some(array1336) } _ => panic() } - let lifted919 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1339 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -35424,7 +53624,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted920 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1340 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -35433,41 +53633,41 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted922 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1342 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result921 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1341 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result921) + Option::Some(result1341) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted918, min_length : lifted919, max_length : lifted920, regex : lifted922}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1338, min_length : lifted1339, max_length : lifted1340, regex : lifted1342}) } 25 => { - let lifted926 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1346 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array924 : Array[String] = []; - for index925 = 0; index925 < (mbt_ffi_load32((iter_base) + 16)); index925 = index925 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index925 * 8) + let array1344 : Array[String] = []; + for index1345 = 0; index1345 < (mbt_ffi_load32((iter_base) + 16)); index1345 = index1345 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1345 * 8) - let result923 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array924.push(result923) + array1344.push(result1343) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array924) + Option::Some(array1344) } _ => panic() } - let lifted927 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1347 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -35476,7 +53676,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted928 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1348 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -35485,91 +53685,91 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted926, min_bytes : lifted927, max_bytes : lifted928}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1346, min_bytes : lifted1347, max_bytes : lifted1348}) } 26 => { - let lifted932 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1352 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array930 : Array[String] = []; - for index931 = 0; index931 < (mbt_ffi_load32((iter_base) + 20)); index931 = index931 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index931 * 8) + let array1350 : Array[String] = []; + for index1351 = 0; index1351 < (mbt_ffi_load32((iter_base) + 20)); index1351 = index1351 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1351 * 8) - let result929 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1349 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array930.push(result929) + array1350.push(result1349) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array930) + Option::Some(array1350) } _ => panic() } - let lifted936 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1356 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array934 : Array[String] = []; - for index935 = 0; index935 < (mbt_ffi_load32((iter_base) + 32)); index935 = index935 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index935 * 8) + let array1354 : Array[String] = []; + for index1355 = 0; index1355 < (mbt_ffi_load32((iter_base) + 32)); index1355 = index1355 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1355 * 8) - let result933 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1353 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array934.push(result933) + array1354.push(result1353) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array934) + Option::Some(array1354) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted932, allowed_extensions : lifted936}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1352, allowed_extensions : lifted1356}) } 27 => { - let lifted940 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1360 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array938 : Array[String] = []; - for index939 = 0; index939 < (mbt_ffi_load32((iter_base) + 16)); index939 = index939 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index939 * 8) + let array1358 : Array[String] = []; + for index1359 = 0; index1359 < (mbt_ffi_load32((iter_base) + 16)); index1359 = index1359 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1359 * 8) - let result937 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1357 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array938.push(result937) + array1358.push(result1357) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array938) + Option::Some(array1358) } _ => panic() } - let lifted944 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1364 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array942 : Array[String] = []; - for index943 = 0; index943 < (mbt_ffi_load32((iter_base) + 28)); index943 = index943 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index943 * 8) + let array1362 : Array[String] = []; + for index1363 = 0; index1363 < (mbt_ffi_load32((iter_base) + 28)); index1363 = index1363 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1363 * 8) - let result941 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1361 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array942.push(result941) + array1362.push(result1361) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array942) + Option::Some(array1362) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted940, allowed_hosts : lifted944}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1360, allowed_hosts : lifted1364}) } 28 => { @@ -35581,148 +53781,148 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 30 => { - let result945 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1365 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array947 : Array[String] = []; - for index948 = 0; index948 < (mbt_ffi_load32((iter_base) + 20)); index948 = index948 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index948 * 8) + let array1367 : Array[String] = []; + for index1368 = 0; index1368 < (mbt_ffi_load32((iter_base) + 20)); index1368 = index1368 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1368 * 8) - let result946 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1366 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array947.push(result946) + array1367.push(result1366) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted950 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1370 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result949 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1369 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result949}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1369}) } _ => panic() } - let lifted952 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1372 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result951 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1371 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result951}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1371}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result945, allowed_suffixes : array947, min : lifted950, max : lifted952}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1365, allowed_suffixes : array1367, min : lifted1370, max : lifted1372}) } 31 => { - let array976 : Array[@types.UnionBranch] = []; - for index977 = 0; index977 < (mbt_ffi_load32((iter_base) + 12)); index977 = index977 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index977 * 92) + let array1396 : Array[@types.UnionBranch] = []; + for index1397 = 0; index1397 < (mbt_ffi_load32((iter_base) + 12)); index1397 = index1397 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1397 * 92) - let result953 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted962 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1382 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result954 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1374 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result954) + @types.DiscriminatorRule::Prefix(result1374) } 1 => { - let result955 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result955) + @types.DiscriminatorRule::Suffix(result1375) } 2 => { - let result956 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result956) + @types.DiscriminatorRule::Contains(result1376) } 3 => { - let result957 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1377 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result957) + @types.DiscriminatorRule::Regex(result1377) } 4 => { - let result958 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1378 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted960 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1380 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result959 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1379 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result959) + Option::Some(result1379) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result958, literal : lifted960}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1378, literal : lifted1380}) } 5 => { - let result961 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1381 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result961) + @types.DiscriminatorRule::FieldAbsent(result1381) } _ => panic() } - let lifted964 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1384 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result963 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result963) + Option::Some(result1383) } _ => panic() } - let array966 : Array[String] = []; - for index967 = 0; index967 < (mbt_ffi_load32((iter_base) + 52)); index967 = index967 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index967 * 8) + let array1386 : Array[String] = []; + for index1387 = 0; index1387 < (mbt_ffi_load32((iter_base) + 52)); index1387 = index1387 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1387 * 8) - let result965 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1385 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array966.push(result965) + array1386.push(result1385) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array969 : Array[String] = []; - for index970 = 0; index970 < (mbt_ffi_load32((iter_base) + 60)); index970 = index970 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index970 * 8) + let array1389 : Array[String] = []; + for index1390 = 0; index1390 < (mbt_ffi_load32((iter_base) + 60)); index1390 = index1390 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1390 * 8) - let result968 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1388 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array969.push(result968) + array1389.push(result1388) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted972 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1392 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result971 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1391 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result971) + Option::Some(result1391) } _ => panic() } - let lifted975 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1395 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted974 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1394 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -35737,57 +53937,57 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result973 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result973) + @types.Role::Other(result1393) } _ => panic() } - Option::Some(lifted974) + Option::Some(lifted1394) } _ => panic() } - array976.push(@types.UnionBranch::{tag : result953, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted962, metadata : @types.MetadataEnvelope::{doc : lifted964, aliases : array966, examples : array969, deprecated : lifted972, role : lifted975}}) + array1396.push(@types.UnionBranch::{tag : result1373, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1382, metadata : @types.MetadataEnvelope::{doc : lifted1384, aliases : array1386, examples : array1389, deprecated : lifted1392, role : lifted1395}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array976}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1396}) } 32 => { - let lifted979 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1399 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result978 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1398 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result978) + Option::Some(result1398) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted979}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1399}) } 33 => { - let lifted981 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1401 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result980 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1400 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result980) + Option::Some(result1400) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted981}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1401}) } 34 => { - let lifted982 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1402 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -35796,11 +53996,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::FutureType(lifted982) + @types.SchemaTypeBody::FutureType(lifted1402) } 35 => { - let lifted983 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1403 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -35809,58 +54009,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::StreamType(lifted983) + @types.SchemaTypeBody::StreamType(lifted1403) } _ => panic() } - let lifted986 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1406 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result985 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1405 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result985) + Option::Some(result1405) } _ => panic() } - let array988 : Array[String] = []; - for index989 = 0; index989 < (mbt_ffi_load32((iter_base) + 104)); index989 = index989 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index989 * 8) + let array1408 : Array[String] = []; + for index1409 = 0; index1409 < (mbt_ffi_load32((iter_base) + 104)); index1409 = index1409 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1409 * 8) - let result987 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1407 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array988.push(result987) + array1408.push(result1407) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array991 : Array[String] = []; - for index992 = 0; index992 < (mbt_ffi_load32((iter_base) + 112)); index992 = index992 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index992 * 8) + let array1411 : Array[String] = []; + for index1412 = 0; index1412 < (mbt_ffi_load32((iter_base) + 112)); index1412 = index1412 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1412 * 8) - let result990 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1410 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array991.push(result990) + array1411.push(result1410) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted994 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1414 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result993 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1413 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result993) + Option::Some(result1413) } _ => panic() } - let lifted997 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1417 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted996 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1416 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -35875,48 +54075,48 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result995 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result995) + @types.Role::Other(result1415) } _ => panic() } - Option::Some(lifted996) + Option::Some(lifted1416) } _ => panic() } - array998.push(@types.SchemaTypeNode::{body : lifted984, metadata : @types.MetadataEnvelope::{doc : lifted986, aliases : array988, examples : array991, deprecated : lifted994, role : lifted997}}) + array1418.push(@types.SchemaTypeNode::{body : lifted1404, metadata : @types.MetadataEnvelope::{doc : lifted1406, aliases : array1408, examples : array1411, deprecated : lifted1414, role : lifted1417}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let array1003 : Array[@types.SchemaTypeDef] = []; - for index1004 = 0; index1004 < (mbt_ffi_load32((iter_base) + 68)); index1004 = index1004 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1004 * 24) + let array1423 : Array[@types.SchemaTypeDef] = []; + for index1424 = 0; index1424 < (mbt_ffi_load32((iter_base) + 68)); index1424 = index1424 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1424 * 24) - let result1000 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1002 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1422 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1001 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1001) + Option::Some(result1421) } _ => panic() } - array1003.push(@types.SchemaTypeDef::{id : result1000, name : lifted1002, body : mbt_ffi_load32((iter_base) + 20)}) + array1423.push(@types.SchemaTypeDef::{id : result1420, name : lifted1422, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - let array1035 : Array[@types.SchemaValueNode] = []; - for index1036 = 0; index1036 < (mbt_ffi_load32((iter_base) + 80)); index1036 = index1036 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 76)) + (index1036 * 32) + let array1455 : Array[@types.SchemaValueNode] = []; + for index1456 = 0; index1456 < (mbt_ffi_load32((iter_base) + 80)); index1456 = index1456 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 76)) + (index1456 * 32) - let lifted1034 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1454 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -35967,25 +54167,25 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 12 => { - let result1005 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1425 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1005) + @types.SchemaValueNode::StringValue(result1425) } 13 => { - let array1006 : Array[Int] = []; - for index1007 = 0; index1007 < (mbt_ffi_load32((iter_base) + 12)); index1007 = index1007 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1007 * 4) + let array1426 : Array[Int] = []; + for index1427 = 0; index1427 < (mbt_ffi_load32((iter_base) + 12)); index1427 = index1427 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1427 * 4) - array1006.push(mbt_ffi_load32((iter_base) + 0)) + array1426.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1006) + @types.SchemaValueNode::RecordValue(array1426) } 14 => { - let lifted1008 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1428 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -35994,7 +54194,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1008}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1428}) } 15 => { @@ -36002,67 +54202,67 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 16 => { - let array1009 : Array[Bool] = []; - for index1010 = 0; index1010 < (mbt_ffi_load32((iter_base) + 12)); index1010 = index1010 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1010 * 1) + let array1429 : Array[Bool] = []; + for index1430 = 0; index1430 < (mbt_ffi_load32((iter_base) + 12)); index1430 = index1430 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1430 * 1) - array1009.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1429.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1009) + @types.SchemaValueNode::FlagsValue(array1429) } 17 => { - let array1011 : Array[Int] = []; - for index1012 = 0; index1012 < (mbt_ffi_load32((iter_base) + 12)); index1012 = index1012 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1012 * 4) + let array1431 : Array[Int] = []; + for index1432 = 0; index1432 < (mbt_ffi_load32((iter_base) + 12)); index1432 = index1432 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1432 * 4) - array1011.push(mbt_ffi_load32((iter_base) + 0)) + array1431.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1011) + @types.SchemaValueNode::TupleValue(array1431) } 18 => { - let array1013 : Array[Int] = []; - for index1014 = 0; index1014 < (mbt_ffi_load32((iter_base) + 12)); index1014 = index1014 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1014 * 4) + let array1433 : Array[Int] = []; + for index1434 = 0; index1434 < (mbt_ffi_load32((iter_base) + 12)); index1434 = index1434 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1434 * 4) - array1013.push(mbt_ffi_load32((iter_base) + 0)) + array1433.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1013) + @types.SchemaValueNode::ListValue(array1433) } 19 => { - let array1015 : Array[Int] = []; - for index1016 = 0; index1016 < (mbt_ffi_load32((iter_base) + 12)); index1016 = index1016 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1016 * 4) + let array1435 : Array[Int] = []; + for index1436 = 0; index1436 < (mbt_ffi_load32((iter_base) + 12)); index1436 = index1436 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1436 * 4) - array1015.push(mbt_ffi_load32((iter_base) + 0)) + array1435.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1015) + @types.SchemaValueNode::FixedListValue(array1435) } 20 => { - let array1017 : Array[@types.MapEntry] = []; - for index1018 = 0; index1018 < (mbt_ffi_load32((iter_base) + 12)); index1018 = index1018 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1018 * 8) + let array1437 : Array[@types.MapEntry] = []; + for index1438 = 0; index1438 < (mbt_ffi_load32((iter_base) + 12)); index1438 = index1438 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1438 * 8) - array1017.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1437.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1017) + @types.SchemaValueNode::MapValue(array1437) } 21 => { - let lifted1019 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1439 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -36071,14 +54271,14 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1019) + @types.SchemaValueNode::OptionValue(lifted1439) } 22 => { - let lifted1022 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1442 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1020 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1440 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -36087,11 +54287,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::OkValue(lifted1020) + @types.ResultValuePayload::OkValue(lifted1440) } 1 => { - let lifted1021 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1441 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -36100,58 +54300,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1021) + @types.ResultValuePayload::ErrValue(lifted1441) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1022) + @types.SchemaValueNode::ResultValue(lifted1442) } 23 => { - let result1023 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1443 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1025 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1445 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1024 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1444 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1024) + Option::Some(result1444) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1023, language : lifted1025}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1443, language : lifted1445}) } 24 => { - let result1026 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1446 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1028 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1448 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1027 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1447 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1027) + Option::Some(result1447) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1026, mime_type : lifted1028}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1446, mime_type : lifted1448}) } 25 => { - let result1029 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1449 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1029) + @types.SchemaValueNode::PathValue(result1449) } 26 => { - let result1030 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1450 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1030) + @types.SchemaValueNode::UrlValue(result1450) } 27 => { @@ -36163,21 +54363,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 29 => { - let result1031 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1451 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1031}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1451}) } 30 => { - let result1032 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1032, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1452, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1033 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1453 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1033}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1453}) } 32 => { @@ -36186,47 +54386,47 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1035.push(lifted1034) + array1455.push(lifted1454) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 76)) - let result1037 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) + let result1457 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) - let array1039 : Array[String] = []; - for index1040 = 0; index1040 < (mbt_ffi_load32((iter_base) + 100)); index1040 = index1040 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index1040 * 8) + let array1459 : Array[String] = []; + for index1460 = 0; index1460 < (mbt_ffi_load32((iter_base) + 100)); index1460 = index1460 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index1460 * 8) - let result1038 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1458 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1039.push(result1038) + array1459.push(result1458) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 96)) - let array1054 : Array[Array[SpanData]] = []; - for index1055 = 0; index1055 < (mbt_ffi_load32((iter_base) + 108)); index1055 = index1055 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 104)) + (index1055 * 8) + let array1474 : Array[Array[SpanData]] = []; + for index1475 = 0; index1475 < (mbt_ffi_load32((iter_base) + 108)); index1475 = index1475 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 104)) + (index1475 * 8) - let array1052 : Array[SpanData] = []; - for index1053 = 0; index1053 < (mbt_ffi_load32((iter_base) + 4)); index1053 = index1053 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1053 * 80) + let array1472 : Array[SpanData] = []; + for index1473 = 0; index1473 < (mbt_ffi_load32((iter_base) + 4)); index1473 = index1473 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1473 * 80) - let lifted1051 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1471 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1041 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1461 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1043 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted1463 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result1042 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result1462 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result1042) + Option::Some(result1462) } _ => panic() } - let lifted1044 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted1464 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -36235,46 +54435,46 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let array1048 : Array[@context.Attribute] = []; - for index1049 = 0; index1049 < (mbt_ffi_load32((iter_base) + 68)); index1049 = index1049 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1049 * 20) + let array1468 : Array[@context.Attribute] = []; + for index1469 = 0; index1469 < (mbt_ffi_load32((iter_base) + 68)); index1469 = index1469 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1469 * 20) - let result1045 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1465 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1047 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1467 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result1046 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result1046) + @context.AttributeValue::String(result1466) } _ => panic() } - array1048.push(@context.Attribute::{key : result1045, value : lifted1047}) + array1468.push(@context.Attribute::{key : result1465, value : lifted1467}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result1041, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1043, linked_context : lifted1044, attributes : array1048, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result1461, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1463, linked_context : lifted1464, attributes : array1468, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result1050 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1470 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result1050}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result1470}) } _ => panic() } - array1052.push(lifted1051) + array1472.push(lifted1471) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array1054.push(array1052) + array1474.push(array1472) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 104)) - AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result870, method_name : result871, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array998, defs : array1003, root : mbt_ffi_load32((iter_base) + 72)}, value : @types.SchemaValueTree::{value_nodes : array1035, root : mbt_ffi_load32((iter_base) + 84)}}, trace_id : result1037, trace_states : array1039, invocation_context : array1054}) + AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result1220, method_name : result1221, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1418, defs : array1423, root : mbt_ffi_load32((iter_base) + 72)}, value : @types.SchemaValueTree::{value_nodes : array1455, root : mbt_ffi_load32((iter_base) + 84)}}, trace_id : result1457, trace_states : array1459, invocation_context : array1474}) } 2 => { @@ -36282,17 +54482,17 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1056 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1476 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let result1057 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1477 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result1056, mime_type : result1057}}) + AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result1476, mime_type : result1477}}) } 4 => { - let result1058 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1478 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result1058}) + AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result1478}) } 5 => { @@ -36301,18 +54501,18 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - PublicOplogEntry::AgentInvocationStarted(AgentInvocationStartedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, invocation : lifted1059}) + PublicOplogEntry::AgentInvocationStarted(AgentInvocationStartedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, invocation : lifted1479}) } 5 => { - let lifted1396 = match (mbt_ffi_load8_u((iter_base) + 32)) { + let lifted1956 = match (mbt_ffi_load8_u((iter_base) + 32)) { 0 => { - let array1186 : Array[@types.SchemaTypeNode] = []; - for index1187 = 0; index1187 < (mbt_ffi_load32((iter_base) + 40)); index1187 = index1187 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1187 * 144) + let array1676 : Array[@types.SchemaTypeNode] = []; + for index1677 = 0; index1677 < (mbt_ffi_load32((iter_base) + 40)); index1677 = index1677 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1677 * 144) - let lifted1172 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1662 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -36323,43 +54523,743 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 2 => { - @types.SchemaTypeBody::S8Type + let lifted1486 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1481 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1480 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1480) + } + _ => panic() + } + + let lifted1483 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1482 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1482) + } + _ => panic() + } + + let lifted1485 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1484 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1484) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1481, max : lifted1483, unit : lifted1485}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1486) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted1493 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1488 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1487 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1487) + } + _ => panic() + } + + let lifted1490 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1489 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1489) + } + _ => panic() + } + + let lifted1492 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1491 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1491) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1488, max : lifted1490, unit : lifted1492}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1493) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted1500 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1495 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1494 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1494) + } + _ => panic() + } + + let lifted1497 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1496 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1496) + } + _ => panic() + } + + let lifted1499 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1498 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1498) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1495, max : lifted1497, unit : lifted1499}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1500) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted1507 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1502 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1501 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1501) + } + _ => panic() + } + + let lifted1504 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1503 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1503) + } + _ => panic() + } + + let lifted1506 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1505) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1502, max : lifted1504, unit : lifted1506}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1507) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted1514 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1509 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1508 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1508) + } + _ => panic() + } + + let lifted1511 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1510 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1510) + } + _ => panic() + } + + let lifted1513 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1512 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1512) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1509, max : lifted1511, unit : lifted1513}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1514) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted1521 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1516 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1515 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1515) + } + _ => panic() + } + + let lifted1518 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1517 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1517) + } + _ => panic() + } + + let lifted1520 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1519 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1519) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1516, max : lifted1518, unit : lifted1520}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1521) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted1528 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1523 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1522 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1522) + } + _ => panic() + } + + let lifted1525 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1524 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1524) + } + _ => panic() + } + + let lifted1527 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1526 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1526) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1523, max : lifted1525, unit : lifted1527}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1528) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted1535 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1530 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1529 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1529) + } + _ => panic() + } + + let lifted1532 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1531 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1531) + } + _ => panic() + } + + let lifted1534 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1533) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1530, max : lifted1532, unit : lifted1534}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1535) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted1542 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1537 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1536 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1536) + } + _ => panic() + } + + let lifted1539 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1538 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1538) + } + _ => panic() + } + + let lifted1541 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1540 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1540) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1537, max : lifted1539, unit : lifted1541}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1542) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted1549 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1544 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1543 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1543) + } + _ => panic() + } + + let lifted1546 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1545 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1545) + } + _ => panic() + } + + let lifted1548 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1547 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1547) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1544, max : lifted1546, unit : lifted1548}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1549) } 12 => { @@ -36371,59 +55271,59 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 14 => { - let array1074 : Array[@types.NamedFieldType] = []; - for index1075 = 0; index1075 < (mbt_ffi_load32((iter_base) + 12)); index1075 = index1075 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1075 * 68) + let array1564 : Array[@types.NamedFieldType] = []; + for index1565 = 0; index1565 < (mbt_ffi_load32((iter_base) + 12)); index1565 = index1565 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1565 * 68) - let result1060 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1550 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1062 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1552 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result1061 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1551 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result1061) + Option::Some(result1551) } _ => panic() } - let array1064 : Array[String] = []; - for index1065 = 0; index1065 < (mbt_ffi_load32((iter_base) + 28)); index1065 = index1065 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1065 * 8) + let array1554 : Array[String] = []; + for index1555 = 0; index1555 < (mbt_ffi_load32((iter_base) + 28)); index1555 = index1555 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1555 * 8) - let result1063 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1553 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1064.push(result1063) + array1554.push(result1553) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array1067 : Array[String] = []; - for index1068 = 0; index1068 < (mbt_ffi_load32((iter_base) + 36)); index1068 = index1068 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1068 * 8) + let array1557 : Array[String] = []; + for index1558 = 0; index1558 < (mbt_ffi_load32((iter_base) + 36)); index1558 = index1558 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1558 * 8) - let result1066 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1067.push(result1066) + array1557.push(result1556) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted1070 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted1560 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result1069 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1559 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result1069) + Option::Some(result1559) } _ => panic() } - let lifted1073 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted1563 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted1072 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted1562 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -36438,33 +55338,33 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1071 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result1561 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1071) + @types.Role::Other(result1561) } _ => panic() } - Option::Some(lifted1072) + Option::Some(lifted1562) } _ => panic() } - array1074.push(@types.NamedFieldType::{name : result1060, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1062, aliases : array1064, examples : array1067, deprecated : lifted1070, role : lifted1073}}) + array1564.push(@types.NamedFieldType::{name : result1550, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1552, aliases : array1554, examples : array1557, deprecated : lifted1560, role : lifted1563}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array1074) + @types.SchemaTypeBody::RecordType(array1564) } 15 => { - let array1091 : Array[@types.VariantCaseType] = []; - for index1092 = 0; index1092 < (mbt_ffi_load32((iter_base) + 12)); index1092 = index1092 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1092 * 72) + let array1581 : Array[@types.VariantCaseType] = []; + for index1582 = 0; index1582 < (mbt_ffi_load32((iter_base) + 12)); index1582 = index1582 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1582 * 72) - let result1076 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1077 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1567 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -36473,53 +55373,53 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1079 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1569 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1078 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1568 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1078) + Option::Some(result1568) } _ => panic() } - let array1081 : Array[String] = []; - for index1082 = 0; index1082 < (mbt_ffi_load32((iter_base) + 32)); index1082 = index1082 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1082 * 8) + let array1571 : Array[String] = []; + for index1572 = 0; index1572 < (mbt_ffi_load32((iter_base) + 32)); index1572 = index1572 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1572 * 8) - let result1080 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1570 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1081.push(result1080) + array1571.push(result1570) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1084 : Array[String] = []; - for index1085 = 0; index1085 < (mbt_ffi_load32((iter_base) + 40)); index1085 = index1085 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1085 * 8) + let array1574 : Array[String] = []; + for index1575 = 0; index1575 < (mbt_ffi_load32((iter_base) + 40)); index1575 = index1575 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1575 * 8) - let result1083 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1573 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1084.push(result1083) + array1574.push(result1573) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1087 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1577 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1086 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1576 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1086) + Option::Some(result1576) } _ => panic() } - let lifted1090 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1580 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1089 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1579 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -36534,63 +55434,63 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1088 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1578 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1088) + @types.Role::Other(result1578) } _ => panic() } - Option::Some(lifted1089) + Option::Some(lifted1579) } _ => panic() } - array1091.push(@types.VariantCaseType::{name : result1076, payload : lifted1077, metadata : @types.MetadataEnvelope::{doc : lifted1079, aliases : array1081, examples : array1084, deprecated : lifted1087, role : lifted1090}}) + array1581.push(@types.VariantCaseType::{name : result1566, payload : lifted1567, metadata : @types.MetadataEnvelope::{doc : lifted1569, aliases : array1571, examples : array1574, deprecated : lifted1577, role : lifted1580}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1091) + @types.SchemaTypeBody::VariantType(array1581) } 16 => { - let array1094 : Array[String] = []; - for index1095 = 0; index1095 < (mbt_ffi_load32((iter_base) + 12)); index1095 = index1095 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1095 * 8) + let array1584 : Array[String] = []; + for index1585 = 0; index1585 < (mbt_ffi_load32((iter_base) + 12)); index1585 = index1585 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1585 * 8) - let result1093 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1094.push(result1093) + array1584.push(result1583) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1094) + @types.SchemaTypeBody::EnumType(array1584) } 17 => { - let array1097 : Array[String] = []; - for index1098 = 0; index1098 < (mbt_ffi_load32((iter_base) + 12)); index1098 = index1098 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1098 * 8) + let array1587 : Array[String] = []; + for index1588 = 0; index1588 < (mbt_ffi_load32((iter_base) + 12)); index1588 = index1588 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1588 * 8) - let result1096 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1586 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1097.push(result1096) + array1587.push(result1586) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1097) + @types.SchemaTypeBody::FlagsType(array1587) } 18 => { - let array1099 : Array[Int] = []; - for index1100 = 0; index1100 < (mbt_ffi_load32((iter_base) + 12)); index1100 = index1100 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1100 * 4) + let array1589 : Array[Int] = []; + for index1590 = 0; index1590 < (mbt_ffi_load32((iter_base) + 12)); index1590 = index1590 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1590 * 4) - array1099.push(mbt_ffi_load32((iter_base) + 0)) + array1589.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1099) + @types.SchemaTypeBody::TupleType(array1589) } 19 => { @@ -36610,7 +55510,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 23 => { - let lifted1101 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1591 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -36619,7 +55519,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1102 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1592 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -36628,30 +55528,30 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1101, err : lifted1102}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1591, err : lifted1592}) } 24 => { - let lifted1106 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1596 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1104 : Array[String] = []; - for index1105 = 0; index1105 < (mbt_ffi_load32((iter_base) + 16)); index1105 = index1105 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1105 * 8) + let array1594 : Array[String] = []; + for index1595 = 0; index1595 < (mbt_ffi_load32((iter_base) + 16)); index1595 = index1595 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1595 * 8) - let result1103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1593 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1104.push(result1103) + array1594.push(result1593) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1104) + Option::Some(array1594) } _ => panic() } - let lifted1107 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1597 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -36660,7 +55560,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1108 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1598 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -36669,41 +55569,41 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1110 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1600 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1599 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1109) + Option::Some(result1599) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1106, min_length : lifted1107, max_length : lifted1108, regex : lifted1110}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1596, min_length : lifted1597, max_length : lifted1598, regex : lifted1600}) } 25 => { - let lifted1114 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1604 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1112 : Array[String] = []; - for index1113 = 0; index1113 < (mbt_ffi_load32((iter_base) + 16)); index1113 = index1113 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1113 * 8) + let array1602 : Array[String] = []; + for index1603 = 0; index1603 < (mbt_ffi_load32((iter_base) + 16)); index1603 = index1603 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1603 * 8) - let result1111 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1601 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1112.push(result1111) + array1602.push(result1601) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1112) + Option::Some(array1602) } _ => panic() } - let lifted1115 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1605 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -36712,7 +55612,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1116 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1606 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -36721,91 +55621,91 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1114, min_bytes : lifted1115, max_bytes : lifted1116}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1604, min_bytes : lifted1605, max_bytes : lifted1606}) } 26 => { - let lifted1120 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1610 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1118 : Array[String] = []; - for index1119 = 0; index1119 < (mbt_ffi_load32((iter_base) + 20)); index1119 = index1119 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1119 * 8) + let array1608 : Array[String] = []; + for index1609 = 0; index1609 < (mbt_ffi_load32((iter_base) + 20)); index1609 = index1609 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1609 * 8) - let result1117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1607 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1118.push(result1117) + array1608.push(result1607) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1118) + Option::Some(array1608) } _ => panic() } - let lifted1124 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1614 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1122 : Array[String] = []; - for index1123 = 0; index1123 < (mbt_ffi_load32((iter_base) + 32)); index1123 = index1123 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1123 * 8) + let array1612 : Array[String] = []; + for index1613 = 0; index1613 < (mbt_ffi_load32((iter_base) + 32)); index1613 = index1613 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1613 * 8) - let result1121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1611 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1122.push(result1121) + array1612.push(result1611) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1122) + Option::Some(array1612) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1120, allowed_extensions : lifted1124}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1610, allowed_extensions : lifted1614}) } 27 => { - let lifted1128 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1618 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1126 : Array[String] = []; - for index1127 = 0; index1127 < (mbt_ffi_load32((iter_base) + 16)); index1127 = index1127 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1127 * 8) + let array1616 : Array[String] = []; + for index1617 = 0; index1617 < (mbt_ffi_load32((iter_base) + 16)); index1617 = index1617 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1617 * 8) - let result1125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1615 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1126.push(result1125) + array1616.push(result1615) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1126) + Option::Some(array1616) } _ => panic() } - let lifted1132 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1622 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1130 : Array[String] = []; - for index1131 = 0; index1131 < (mbt_ffi_load32((iter_base) + 28)); index1131 = index1131 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1131 * 8) + let array1620 : Array[String] = []; + for index1621 = 0; index1621 < (mbt_ffi_load32((iter_base) + 28)); index1621 = index1621 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1621 * 8) - let result1129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1619 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1130.push(result1129) + array1620.push(result1619) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1130) + Option::Some(array1620) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1128, allowed_hosts : lifted1132}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1618, allowed_hosts : lifted1622}) } 28 => { @@ -36817,148 +55717,148 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 30 => { - let result1133 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1623 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1135 : Array[String] = []; - for index1136 = 0; index1136 < (mbt_ffi_load32((iter_base) + 20)); index1136 = index1136 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1136 * 8) + let array1625 : Array[String] = []; + for index1626 = 0; index1626 < (mbt_ffi_load32((iter_base) + 20)); index1626 = index1626 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1626 * 8) - let result1134 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1624 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1135.push(result1134) + array1625.push(result1624) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1138 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1628 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1627 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1137}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1627}) } _ => panic() } - let lifted1140 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1630 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1629 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1139}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1629}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1133, allowed_suffixes : array1135, min : lifted1138, max : lifted1140}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1623, allowed_suffixes : array1625, min : lifted1628, max : lifted1630}) } 31 => { - let array1164 : Array[@types.UnionBranch] = []; - for index1165 = 0; index1165 < (mbt_ffi_load32((iter_base) + 12)); index1165 = index1165 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1165 * 92) + let array1654 : Array[@types.UnionBranch] = []; + for index1655 = 0; index1655 < (mbt_ffi_load32((iter_base) + 12)); index1655 = index1655 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1655 * 92) - let result1141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1631 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1150 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1640 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1632 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1142) + @types.DiscriminatorRule::Prefix(result1632) } 1 => { - let result1143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1633 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1143) + @types.DiscriminatorRule::Suffix(result1633) } 2 => { - let result1144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1144) + @types.DiscriminatorRule::Contains(result1634) } 3 => { - let result1145 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1635 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1145) + @types.DiscriminatorRule::Regex(result1635) } 4 => { - let result1146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1636 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1148 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1638 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1637 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1147) + Option::Some(result1637) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1146, literal : lifted1148}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1636, literal : lifted1638}) } 5 => { - let result1149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1639 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1149) + @types.DiscriminatorRule::FieldAbsent(result1639) } _ => panic() } - let lifted1152 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1642 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1641 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1151) + Option::Some(result1641) } _ => panic() } - let array1154 : Array[String] = []; - for index1155 = 0; index1155 < (mbt_ffi_load32((iter_base) + 52)); index1155 = index1155 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1155 * 8) + let array1644 : Array[String] = []; + for index1645 = 0; index1645 < (mbt_ffi_load32((iter_base) + 52)); index1645 = index1645 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1645 * 8) - let result1153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1643 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1154.push(result1153) + array1644.push(result1643) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1157 : Array[String] = []; - for index1158 = 0; index1158 < (mbt_ffi_load32((iter_base) + 60)); index1158 = index1158 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1158 * 8) + let array1647 : Array[String] = []; + for index1648 = 0; index1648 < (mbt_ffi_load32((iter_base) + 60)); index1648 = index1648 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1648 * 8) - let result1156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1646 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1157.push(result1156) + array1647.push(result1646) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1160 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1650 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1159 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1649 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1159) + Option::Some(result1649) } _ => panic() } - let lifted1163 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1653 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1162 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1652 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -36973,57 +55873,57 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1161 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1651 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1161) + @types.Role::Other(result1651) } _ => panic() } - Option::Some(lifted1162) + Option::Some(lifted1652) } _ => panic() } - array1164.push(@types.UnionBranch::{tag : result1141, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1150, metadata : @types.MetadataEnvelope::{doc : lifted1152, aliases : array1154, examples : array1157, deprecated : lifted1160, role : lifted1163}}) + array1654.push(@types.UnionBranch::{tag : result1631, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1640, metadata : @types.MetadataEnvelope::{doc : lifted1642, aliases : array1644, examples : array1647, deprecated : lifted1650, role : lifted1653}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1164}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1654}) } 32 => { - let lifted1167 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1657 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1656 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1166) + Option::Some(result1656) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1167}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1657}) } 33 => { - let lifted1169 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1659 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1658 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1168) + Option::Some(result1658) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1169}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1659}) } 34 => { - let lifted1170 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1660 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -37032,11 +55932,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1170) + @types.SchemaTypeBody::FutureType(lifted1660) } 35 => { - let lifted1171 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1661 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -37045,58 +55945,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1171) + @types.SchemaTypeBody::StreamType(lifted1661) } _ => panic() } - let lifted1174 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1664 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1663 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1173) + Option::Some(result1663) } _ => panic() } - let array1176 : Array[String] = []; - for index1177 = 0; index1177 < (mbt_ffi_load32((iter_base) + 104)); index1177 = index1177 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1177 * 8) + let array1666 : Array[String] = []; + for index1667 = 0; index1667 < (mbt_ffi_load32((iter_base) + 104)); index1667 = index1667 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1667 * 8) - let result1175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1665 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1176.push(result1175) + array1666.push(result1665) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1179 : Array[String] = []; - for index1180 = 0; index1180 < (mbt_ffi_load32((iter_base) + 112)); index1180 = index1180 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1180 * 8) + let array1669 : Array[String] = []; + for index1670 = 0; index1670 < (mbt_ffi_load32((iter_base) + 112)); index1670 = index1670 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1670 * 8) - let result1178 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1668 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1179.push(result1178) + array1669.push(result1668) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1182 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1672 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1181 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1181) + Option::Some(result1671) } _ => panic() } - let lifted1185 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1675 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1184 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1674 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -37111,48 +56011,48 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1673 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1183) + @types.Role::Other(result1673) } _ => panic() } - Option::Some(lifted1184) + Option::Some(lifted1674) } _ => panic() } - array1186.push(@types.SchemaTypeNode::{body : lifted1172, metadata : @types.MetadataEnvelope::{doc : lifted1174, aliases : array1176, examples : array1179, deprecated : lifted1182, role : lifted1185}}) + array1676.push(@types.SchemaTypeNode::{body : lifted1662, metadata : @types.MetadataEnvelope::{doc : lifted1664, aliases : array1666, examples : array1669, deprecated : lifted1672, role : lifted1675}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array1191 : Array[@types.SchemaTypeDef] = []; - for index1192 = 0; index1192 < (mbt_ffi_load32((iter_base) + 48)); index1192 = index1192 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index1192 * 24) + let array1681 : Array[@types.SchemaTypeDef] = []; + for index1682 = 0; index1682 < (mbt_ffi_load32((iter_base) + 48)); index1682 = index1682 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index1682 * 24) - let result1188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1678 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1190 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1680 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1679 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1189) + Option::Some(result1679) } _ => panic() } - array1191.push(@types.SchemaTypeDef::{id : result1188, name : lifted1190, body : mbt_ffi_load32((iter_base) + 20)}) + array1681.push(@types.SchemaTypeDef::{id : result1678, name : lifted1680, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) - let array1223 : Array[@types.SchemaValueNode] = []; - for index1224 = 0; index1224 < (mbt_ffi_load32((iter_base) + 60)); index1224 = index1224 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1224 * 32) + let array1713 : Array[@types.SchemaValueNode] = []; + for index1714 = 0; index1714 < (mbt_ffi_load32((iter_base) + 60)); index1714 = index1714 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1714 * 32) - let lifted1222 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1712 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -37203,25 +56103,25 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 12 => { - let result1193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1683 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1193) + @types.SchemaValueNode::StringValue(result1683) } 13 => { - let array1194 : Array[Int] = []; - for index1195 = 0; index1195 < (mbt_ffi_load32((iter_base) + 12)); index1195 = index1195 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1195 * 4) + let array1684 : Array[Int] = []; + for index1685 = 0; index1685 < (mbt_ffi_load32((iter_base) + 12)); index1685 = index1685 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1685 * 4) - array1194.push(mbt_ffi_load32((iter_base) + 0)) + array1684.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1194) + @types.SchemaValueNode::RecordValue(array1684) } 14 => { - let lifted1196 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1686 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -37230,7 +56130,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1196}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1686}) } 15 => { @@ -37238,67 +56138,67 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 16 => { - let array1197 : Array[Bool] = []; - for index1198 = 0; index1198 < (mbt_ffi_load32((iter_base) + 12)); index1198 = index1198 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1198 * 1) + let array1687 : Array[Bool] = []; + for index1688 = 0; index1688 < (mbt_ffi_load32((iter_base) + 12)); index1688 = index1688 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1688 * 1) - array1197.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1687.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1197) + @types.SchemaValueNode::FlagsValue(array1687) } 17 => { - let array1199 : Array[Int] = []; - for index1200 = 0; index1200 < (mbt_ffi_load32((iter_base) + 12)); index1200 = index1200 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1200 * 4) + let array1689 : Array[Int] = []; + for index1690 = 0; index1690 < (mbt_ffi_load32((iter_base) + 12)); index1690 = index1690 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1690 * 4) - array1199.push(mbt_ffi_load32((iter_base) + 0)) + array1689.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1199) + @types.SchemaValueNode::TupleValue(array1689) } 18 => { - let array1201 : Array[Int] = []; - for index1202 = 0; index1202 < (mbt_ffi_load32((iter_base) + 12)); index1202 = index1202 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1202 * 4) + let array1691 : Array[Int] = []; + for index1692 = 0; index1692 < (mbt_ffi_load32((iter_base) + 12)); index1692 = index1692 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1692 * 4) - array1201.push(mbt_ffi_load32((iter_base) + 0)) + array1691.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1201) + @types.SchemaValueNode::ListValue(array1691) } 19 => { - let array1203 : Array[Int] = []; - for index1204 = 0; index1204 < (mbt_ffi_load32((iter_base) + 12)); index1204 = index1204 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1204 * 4) + let array1693 : Array[Int] = []; + for index1694 = 0; index1694 < (mbt_ffi_load32((iter_base) + 12)); index1694 = index1694 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1694 * 4) - array1203.push(mbt_ffi_load32((iter_base) + 0)) + array1693.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1203) + @types.SchemaValueNode::FixedListValue(array1693) } 20 => { - let array1205 : Array[@types.MapEntry] = []; - for index1206 = 0; index1206 < (mbt_ffi_load32((iter_base) + 12)); index1206 = index1206 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1206 * 8) + let array1695 : Array[@types.MapEntry] = []; + for index1696 = 0; index1696 < (mbt_ffi_load32((iter_base) + 12)); index1696 = index1696 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1696 * 8) - array1205.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1695.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1205) + @types.SchemaValueNode::MapValue(array1695) } 21 => { - let lifted1207 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1697 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -37307,14 +56207,14 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1207) + @types.SchemaValueNode::OptionValue(lifted1697) } 22 => { - let lifted1210 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1700 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1208 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1698 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -37323,11 +56223,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::OkValue(lifted1208) + @types.ResultValuePayload::OkValue(lifted1698) } 1 => { - let lifted1209 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1699 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -37336,58 +56236,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1209) + @types.ResultValuePayload::ErrValue(lifted1699) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1210) + @types.SchemaValueNode::ResultValue(lifted1700) } 23 => { - let result1211 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1701 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1213 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1703 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1212 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1702 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1212) + Option::Some(result1702) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1211, language : lifted1213}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1701, language : lifted1703}) } 24 => { - let result1214 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1704 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1216 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1706 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1215 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1705 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1215) + Option::Some(result1705) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1214, mime_type : lifted1216}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1704, mime_type : lifted1706}) } 25 => { - let result1217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1707 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1217) + @types.SchemaValueNode::PathValue(result1707) } 26 => { - let result1218 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1708 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1218) + @types.SchemaValueNode::UrlValue(result1708) } 27 => { @@ -37399,21 +56299,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 29 => { - let result1219 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1709 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1219}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1709}) } 30 => { - let result1220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1710 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1220, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1710, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1221 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1711 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1221}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1711}) } 32 => { @@ -37422,19 +56322,19 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1223.push(lifted1222) + array1713.push(lifted1712) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - AgentInvocationResult::AgentInitialization(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1186, defs : array1191, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array1223, root : mbt_ffi_load32((iter_base) + 64)}}}) + AgentInvocationResult::AgentInitialization(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1676, defs : array1681, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array1713, root : mbt_ffi_load32((iter_base) + 64)}}}) } 1 => { - let array1351 : Array[@types.SchemaTypeNode] = []; - for index1352 = 0; index1352 < (mbt_ffi_load32((iter_base) + 40)); index1352 = index1352 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1352 * 144) + let array1911 : Array[@types.SchemaTypeNode] = []; + for index1912 = 0; index1912 < (mbt_ffi_load32((iter_base) + 40)); index1912 = index1912 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1912 * 144) - let lifted1337 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1897 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -37445,43 +56345,743 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 2 => { - @types.SchemaTypeBody::S8Type + let lifted1721 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1716 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1715 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1715) + } + _ => panic() + } + + let lifted1718 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1717 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1717) + } + _ => panic() + } + + let lifted1720 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1719 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1719) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1716, max : lifted1718, unit : lifted1720}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1721) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted1728 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1723 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1722 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1722) + } + _ => panic() + } + + let lifted1725 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1724 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1724) + } + _ => panic() + } + + let lifted1727 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1726 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1726) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1723, max : lifted1725, unit : lifted1727}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1728) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted1735 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1730 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1729 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1729) + } + _ => panic() + } + + let lifted1732 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1731 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1731) + } + _ => panic() + } + + let lifted1734 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1733 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1733) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1730, max : lifted1732, unit : lifted1734}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1735) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted1742 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1737 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1736 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1736) + } + _ => panic() + } + + let lifted1739 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1738 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1738) + } + _ => panic() + } + + let lifted1741 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1740 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1740) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1737, max : lifted1739, unit : lifted1741}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1742) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted1749 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1744 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1743 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1743) + } + _ => panic() + } + + let lifted1746 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1745 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1745) + } + _ => panic() + } + + let lifted1748 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1747 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1747) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1744, max : lifted1746, unit : lifted1748}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1749) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted1756 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1751 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1750 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1750) + } + _ => panic() + } + + let lifted1753 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1752 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1752) + } + _ => panic() + } + + let lifted1755 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1754 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1754) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1751, max : lifted1753, unit : lifted1755}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted1756) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted1763 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1758 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1757 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1757) + } + _ => panic() + } + + let lifted1760 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1759 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1759) + } + _ => panic() + } + + let lifted1762 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1761 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1761) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1758, max : lifted1760, unit : lifted1762}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted1763) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted1770 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1765 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1764 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1764) + } + _ => panic() + } + + let lifted1767 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1766 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1766) + } + _ => panic() + } + + let lifted1769 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1768 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1768) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1765, max : lifted1767, unit : lifted1769}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted1770) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted1777 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1772 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1771 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1771) + } + _ => panic() + } + + let lifted1774 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1773 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1773) + } + _ => panic() + } + + let lifted1776 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1775 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1775) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1772, max : lifted1774, unit : lifted1776}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted1777) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted1784 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1779 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1778 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1778) + } + _ => panic() + } + + let lifted1781 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1780 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1780) + } + _ => panic() + } + + let lifted1783 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1782 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1782) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1779, max : lifted1781, unit : lifted1783}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted1784) } 12 => { @@ -37493,59 +57093,59 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 14 => { - let array1239 : Array[@types.NamedFieldType] = []; - for index1240 = 0; index1240 < (mbt_ffi_load32((iter_base) + 12)); index1240 = index1240 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1240 * 68) + let array1799 : Array[@types.NamedFieldType] = []; + for index1800 = 0; index1800 < (mbt_ffi_load32((iter_base) + 12)); index1800 = index1800 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1800 * 68) - let result1225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1785 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1227 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1787 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result1226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1786 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result1226) + Option::Some(result1786) } _ => panic() } - let array1229 : Array[String] = []; - for index1230 = 0; index1230 < (mbt_ffi_load32((iter_base) + 28)); index1230 = index1230 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1230 * 8) + let array1789 : Array[String] = []; + for index1790 = 0; index1790 < (mbt_ffi_load32((iter_base) + 28)); index1790 = index1790 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1790 * 8) - let result1228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1788 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1229.push(result1228) + array1789.push(result1788) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array1232 : Array[String] = []; - for index1233 = 0; index1233 < (mbt_ffi_load32((iter_base) + 36)); index1233 = index1233 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1233 * 8) + let array1792 : Array[String] = []; + for index1793 = 0; index1793 < (mbt_ffi_load32((iter_base) + 36)); index1793 = index1793 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1793 * 8) - let result1231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1791 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1232.push(result1231) + array1792.push(result1791) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted1235 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted1795 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result1234 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1794 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result1234) + Option::Some(result1794) } _ => panic() } - let lifted1238 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted1798 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted1237 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted1797 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -37560,33 +57160,33 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result1796 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1236) + @types.Role::Other(result1796) } _ => panic() } - Option::Some(lifted1237) + Option::Some(lifted1797) } _ => panic() } - array1239.push(@types.NamedFieldType::{name : result1225, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1227, aliases : array1229, examples : array1232, deprecated : lifted1235, role : lifted1238}}) + array1799.push(@types.NamedFieldType::{name : result1785, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1787, aliases : array1789, examples : array1792, deprecated : lifted1795, role : lifted1798}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array1239) + @types.SchemaTypeBody::RecordType(array1799) } 15 => { - let array1256 : Array[@types.VariantCaseType] = []; - for index1257 = 0; index1257 < (mbt_ffi_load32((iter_base) + 12)); index1257 = index1257 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1257 * 72) + let array1816 : Array[@types.VariantCaseType] = []; + for index1817 = 0; index1817 < (mbt_ffi_load32((iter_base) + 12)); index1817 = index1817 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1817 * 72) - let result1241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1801 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1242 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1802 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -37595,53 +57195,53 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1244 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1804 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1803 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1243) + Option::Some(result1803) } _ => panic() } - let array1246 : Array[String] = []; - for index1247 = 0; index1247 < (mbt_ffi_load32((iter_base) + 32)); index1247 = index1247 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1247 * 8) + let array1806 : Array[String] = []; + for index1807 = 0; index1807 < (mbt_ffi_load32((iter_base) + 32)); index1807 = index1807 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1807 * 8) - let result1245 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1805 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1246.push(result1245) + array1806.push(result1805) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1249 : Array[String] = []; - for index1250 = 0; index1250 < (mbt_ffi_load32((iter_base) + 40)); index1250 = index1250 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1250 * 8) + let array1809 : Array[String] = []; + for index1810 = 0; index1810 < (mbt_ffi_load32((iter_base) + 40)); index1810 = index1810 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1810 * 8) - let result1248 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1808 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1249.push(result1248) + array1809.push(result1808) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1252 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted1812 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1251 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result1811 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1251) + Option::Some(result1811) } _ => panic() } - let lifted1255 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1815 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1254 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted1814 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -37656,63 +57256,63 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result1813 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1253) + @types.Role::Other(result1813) } _ => panic() } - Option::Some(lifted1254) + Option::Some(lifted1814) } _ => panic() } - array1256.push(@types.VariantCaseType::{name : result1241, payload : lifted1242, metadata : @types.MetadataEnvelope::{doc : lifted1244, aliases : array1246, examples : array1249, deprecated : lifted1252, role : lifted1255}}) + array1816.push(@types.VariantCaseType::{name : result1801, payload : lifted1802, metadata : @types.MetadataEnvelope::{doc : lifted1804, aliases : array1806, examples : array1809, deprecated : lifted1812, role : lifted1815}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1256) + @types.SchemaTypeBody::VariantType(array1816) } 16 => { - let array1259 : Array[String] = []; - for index1260 = 0; index1260 < (mbt_ffi_load32((iter_base) + 12)); index1260 = index1260 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1260 * 8) + let array1819 : Array[String] = []; + for index1820 = 0; index1820 < (mbt_ffi_load32((iter_base) + 12)); index1820 = index1820 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1820 * 8) - let result1258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1818 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1259.push(result1258) + array1819.push(result1818) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1259) + @types.SchemaTypeBody::EnumType(array1819) } 17 => { - let array1262 : Array[String] = []; - for index1263 = 0; index1263 < (mbt_ffi_load32((iter_base) + 12)); index1263 = index1263 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1263 * 8) + let array1822 : Array[String] = []; + for index1823 = 0; index1823 < (mbt_ffi_load32((iter_base) + 12)); index1823 = index1823 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1823 * 8) - let result1261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1821 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1262.push(result1261) + array1822.push(result1821) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1262) + @types.SchemaTypeBody::FlagsType(array1822) } 18 => { - let array1264 : Array[Int] = []; - for index1265 = 0; index1265 < (mbt_ffi_load32((iter_base) + 12)); index1265 = index1265 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1265 * 4) + let array1824 : Array[Int] = []; + for index1825 = 0; index1825 < (mbt_ffi_load32((iter_base) + 12)); index1825 = index1825 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1825 * 4) - array1264.push(mbt_ffi_load32((iter_base) + 0)) + array1824.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1264) + @types.SchemaTypeBody::TupleType(array1824) } 19 => { @@ -37732,7 +57332,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 23 => { - let lifted1266 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1826 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -37741,7 +57341,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1267 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1827 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -37750,30 +57350,30 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1266, err : lifted1267}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1826, err : lifted1827}) } 24 => { - let lifted1271 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1831 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1269 : Array[String] = []; - for index1270 = 0; index1270 < (mbt_ffi_load32((iter_base) + 16)); index1270 = index1270 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1270 * 8) + let array1829 : Array[String] = []; + for index1830 = 0; index1830 < (mbt_ffi_load32((iter_base) + 16)); index1830 = index1830 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1830 * 8) - let result1268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1828 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1269.push(result1268) + array1829.push(result1828) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1269) + Option::Some(array1829) } _ => panic() } - let lifted1272 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1832 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -37782,7 +57382,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1273 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1833 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -37791,41 +57391,41 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1275 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1835 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1274 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1834 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1274) + Option::Some(result1834) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1271, min_length : lifted1272, max_length : lifted1273, regex : lifted1275}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1831, min_length : lifted1832, max_length : lifted1833, regex : lifted1835}) } 25 => { - let lifted1279 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1839 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1277 : Array[String] = []; - for index1278 = 0; index1278 < (mbt_ffi_load32((iter_base) + 16)); index1278 = index1278 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1278 * 8) + let array1837 : Array[String] = []; + for index1838 = 0; index1838 < (mbt_ffi_load32((iter_base) + 16)); index1838 = index1838 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1838 * 8) - let result1276 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1836 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1277.push(result1276) + array1837.push(result1836) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1277) + Option::Some(array1837) } _ => panic() } - let lifted1280 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1840 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -37834,7 +57434,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1281 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted1841 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -37843,91 +57443,91 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1279, min_bytes : lifted1280, max_bytes : lifted1281}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1839, min_bytes : lifted1840, max_bytes : lifted1841}) } 26 => { - let lifted1285 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1845 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1283 : Array[String] = []; - for index1284 = 0; index1284 < (mbt_ffi_load32((iter_base) + 20)); index1284 = index1284 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1284 * 8) + let array1843 : Array[String] = []; + for index1844 = 0; index1844 < (mbt_ffi_load32((iter_base) + 20)); index1844 = index1844 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1844 * 8) - let result1282 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1842 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1283.push(result1282) + array1843.push(result1842) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1283) + Option::Some(array1843) } _ => panic() } - let lifted1289 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1849 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1287 : Array[String] = []; - for index1288 = 0; index1288 < (mbt_ffi_load32((iter_base) + 32)); index1288 = index1288 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1288 * 8) + let array1847 : Array[String] = []; + for index1848 = 0; index1848 < (mbt_ffi_load32((iter_base) + 32)); index1848 = index1848 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1848 * 8) - let result1286 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1846 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1287.push(result1286) + array1847.push(result1846) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1287) + Option::Some(array1847) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1285, allowed_extensions : lifted1289}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1845, allowed_extensions : lifted1849}) } 27 => { - let lifted1293 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1853 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1291 : Array[String] = []; - for index1292 = 0; index1292 < (mbt_ffi_load32((iter_base) + 16)); index1292 = index1292 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1292 * 8) + let array1851 : Array[String] = []; + for index1852 = 0; index1852 < (mbt_ffi_load32((iter_base) + 16)); index1852 = index1852 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1852 * 8) - let result1290 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1850 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1291.push(result1290) + array1851.push(result1850) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1291) + Option::Some(array1851) } _ => panic() } - let lifted1297 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted1857 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1295 : Array[String] = []; - for index1296 = 0; index1296 < (mbt_ffi_load32((iter_base) + 28)); index1296 = index1296 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1296 * 8) + let array1855 : Array[String] = []; + for index1856 = 0; index1856 < (mbt_ffi_load32((iter_base) + 28)); index1856 = index1856 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1856 * 8) - let result1294 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1854 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1295.push(result1294) + array1855.push(result1854) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1295) + Option::Some(array1855) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1293, allowed_hosts : lifted1297}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1853, allowed_hosts : lifted1857}) } 28 => { @@ -37939,148 +57539,148 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 30 => { - let result1298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1858 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1300 : Array[String] = []; - for index1301 = 0; index1301 < (mbt_ffi_load32((iter_base) + 20)); index1301 = index1301 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1301 * 8) + let array1860 : Array[String] = []; + for index1861 = 0; index1861 < (mbt_ffi_load32((iter_base) + 20)); index1861 = index1861 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1861 * 8) - let result1299 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1859 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1300.push(result1299) + array1860.push(result1859) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1303 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1863 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1862 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1302}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1862}) } _ => panic() } - let lifted1305 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted1865 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result1864 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1304}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1864}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1298, allowed_suffixes : array1300, min : lifted1303, max : lifted1305}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1858, allowed_suffixes : array1860, min : lifted1863, max : lifted1865}) } 31 => { - let array1329 : Array[@types.UnionBranch] = []; - for index1330 = 0; index1330 < (mbt_ffi_load32((iter_base) + 12)); index1330 = index1330 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1330 * 92) + let array1889 : Array[@types.UnionBranch] = []; + for index1890 = 0; index1890 < (mbt_ffi_load32((iter_base) + 12)); index1890 = index1890 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1890 * 92) - let result1306 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1866 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1315 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted1875 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1867 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1307) + @types.DiscriminatorRule::Prefix(result1867) } 1 => { - let result1308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1868 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1308) + @types.DiscriminatorRule::Suffix(result1868) } 2 => { - let result1309 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1869 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1309) + @types.DiscriminatorRule::Contains(result1869) } 3 => { - let result1310 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1870 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1310) + @types.DiscriminatorRule::Regex(result1870) } 4 => { - let result1311 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1871 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1313 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted1873 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1312 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result1872 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1312) + Option::Some(result1872) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1311, literal : lifted1313}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1871, literal : lifted1873}) } 5 => { - let result1314 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result1874 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1314) + @types.DiscriminatorRule::FieldAbsent(result1874) } _ => panic() } - let lifted1317 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1877 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1316 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1876 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1316) + Option::Some(result1876) } _ => panic() } - let array1319 : Array[String] = []; - for index1320 = 0; index1320 < (mbt_ffi_load32((iter_base) + 52)); index1320 = index1320 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1320 * 8) + let array1879 : Array[String] = []; + for index1880 = 0; index1880 < (mbt_ffi_load32((iter_base) + 52)); index1880 = index1880 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1880 * 8) - let result1318 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1878 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1319.push(result1318) + array1879.push(result1878) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1322 : Array[String] = []; - for index1323 = 0; index1323 < (mbt_ffi_load32((iter_base) + 60)); index1323 = index1323 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1323 * 8) + let array1882 : Array[String] = []; + for index1883 = 0; index1883 < (mbt_ffi_load32((iter_base) + 60)); index1883 = index1883 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1883 * 8) - let result1321 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1881 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1322.push(result1321) + array1882.push(result1881) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1325 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted1885 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1324 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result1884 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1324) + Option::Some(result1884) } _ => panic() } - let lifted1328 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted1888 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1327 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted1887 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -38095,57 +57695,57 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1326 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result1886 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1326) + @types.Role::Other(result1886) } _ => panic() } - Option::Some(lifted1327) + Option::Some(lifted1887) } _ => panic() } - array1329.push(@types.UnionBranch::{tag : result1306, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1315, metadata : @types.MetadataEnvelope::{doc : lifted1317, aliases : array1319, examples : array1322, deprecated : lifted1325, role : lifted1328}}) + array1889.push(@types.UnionBranch::{tag : result1866, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1875, metadata : @types.MetadataEnvelope::{doc : lifted1877, aliases : array1879, examples : array1882, deprecated : lifted1885, role : lifted1888}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1329}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1889}) } 32 => { - let lifted1332 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1892 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1331 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1891 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1331) + Option::Some(result1891) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1332}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1892}) } 33 => { - let lifted1334 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1894 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1333 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1893 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1333) + Option::Some(result1893) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1334}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1894}) } 34 => { - let lifted1335 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1895 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -38154,11 +57754,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1335) + @types.SchemaTypeBody::FutureType(lifted1895) } 35 => { - let lifted1336 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1896 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -38167,58 +57767,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1336) + @types.SchemaTypeBody::StreamType(lifted1896) } _ => panic() } - let lifted1339 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted1899 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1338 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result1898 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1338) + Option::Some(result1898) } _ => panic() } - let array1341 : Array[String] = []; - for index1342 = 0; index1342 < (mbt_ffi_load32((iter_base) + 104)); index1342 = index1342 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1342 * 8) + let array1901 : Array[String] = []; + for index1902 = 0; index1902 < (mbt_ffi_load32((iter_base) + 104)); index1902 = index1902 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1902 * 8) - let result1340 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1900 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1341.push(result1340) + array1901.push(result1900) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1344 : Array[String] = []; - for index1345 = 0; index1345 < (mbt_ffi_load32((iter_base) + 112)); index1345 = index1345 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1345 * 8) + let array1904 : Array[String] = []; + for index1905 = 0; index1905 < (mbt_ffi_load32((iter_base) + 112)); index1905 = index1905 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1905 * 8) - let result1343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1903 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1344.push(result1343) + array1904.push(result1903) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1347 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted1907 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1346 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result1906 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1346) + Option::Some(result1906) } _ => panic() } - let lifted1350 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted1910 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1349 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted1909 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -38233,48 +57833,48 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1348 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result1908 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1348) + @types.Role::Other(result1908) } _ => panic() } - Option::Some(lifted1349) + Option::Some(lifted1909) } _ => panic() } - array1351.push(@types.SchemaTypeNode::{body : lifted1337, metadata : @types.MetadataEnvelope::{doc : lifted1339, aliases : array1341, examples : array1344, deprecated : lifted1347, role : lifted1350}}) + array1911.push(@types.SchemaTypeNode::{body : lifted1897, metadata : @types.MetadataEnvelope::{doc : lifted1899, aliases : array1901, examples : array1904, deprecated : lifted1907, role : lifted1910}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array1356 : Array[@types.SchemaTypeDef] = []; - for index1357 = 0; index1357 < (mbt_ffi_load32((iter_base) + 48)); index1357 = index1357 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index1357 * 24) + let array1916 : Array[@types.SchemaTypeDef] = []; + for index1917 = 0; index1917 < (mbt_ffi_load32((iter_base) + 48)); index1917 = index1917 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index1917 * 24) - let result1353 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result1913 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1355 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1915 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1354 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result1914 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1354) + Option::Some(result1914) } _ => panic() } - array1356.push(@types.SchemaTypeDef::{id : result1353, name : lifted1355, body : mbt_ffi_load32((iter_base) + 20)}) + array1916.push(@types.SchemaTypeDef::{id : result1913, name : lifted1915, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) - let array1388 : Array[@types.SchemaValueNode] = []; - for index1389 = 0; index1389 < (mbt_ffi_load32((iter_base) + 60)); index1389 = index1389 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1389 * 32) + let array1948 : Array[@types.SchemaValueNode] = []; + for index1949 = 0; index1949 < (mbt_ffi_load32((iter_base) + 60)); index1949 = index1949 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1949 * 32) - let lifted1387 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1947 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -38325,25 +57925,25 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 12 => { - let result1358 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1918 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1358) + @types.SchemaValueNode::StringValue(result1918) } 13 => { - let array1359 : Array[Int] = []; - for index1360 = 0; index1360 < (mbt_ffi_load32((iter_base) + 12)); index1360 = index1360 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1360 * 4) + let array1919 : Array[Int] = []; + for index1920 = 0; index1920 < (mbt_ffi_load32((iter_base) + 12)); index1920 = index1920 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1920 * 4) - array1359.push(mbt_ffi_load32((iter_base) + 0)) + array1919.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1359) + @types.SchemaValueNode::RecordValue(array1919) } 14 => { - let lifted1361 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1921 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -38352,7 +57952,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1361}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1921}) } 15 => { @@ -38360,67 +57960,67 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 16 => { - let array1362 : Array[Bool] = []; - for index1363 = 0; index1363 < (mbt_ffi_load32((iter_base) + 12)); index1363 = index1363 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1363 * 1) + let array1922 : Array[Bool] = []; + for index1923 = 0; index1923 < (mbt_ffi_load32((iter_base) + 12)); index1923 = index1923 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1923 * 1) - array1362.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array1922.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1362) + @types.SchemaValueNode::FlagsValue(array1922) } 17 => { - let array1364 : Array[Int] = []; - for index1365 = 0; index1365 < (mbt_ffi_load32((iter_base) + 12)); index1365 = index1365 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1365 * 4) + let array1924 : Array[Int] = []; + for index1925 = 0; index1925 < (mbt_ffi_load32((iter_base) + 12)); index1925 = index1925 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1925 * 4) - array1364.push(mbt_ffi_load32((iter_base) + 0)) + array1924.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1364) + @types.SchemaValueNode::TupleValue(array1924) } 18 => { - let array1366 : Array[Int] = []; - for index1367 = 0; index1367 < (mbt_ffi_load32((iter_base) + 12)); index1367 = index1367 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1367 * 4) + let array1926 : Array[Int] = []; + for index1927 = 0; index1927 < (mbt_ffi_load32((iter_base) + 12)); index1927 = index1927 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1927 * 4) - array1366.push(mbt_ffi_load32((iter_base) + 0)) + array1926.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1366) + @types.SchemaValueNode::ListValue(array1926) } 19 => { - let array1368 : Array[Int] = []; - for index1369 = 0; index1369 < (mbt_ffi_load32((iter_base) + 12)); index1369 = index1369 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1369 * 4) + let array1928 : Array[Int] = []; + for index1929 = 0; index1929 < (mbt_ffi_load32((iter_base) + 12)); index1929 = index1929 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1929 * 4) - array1368.push(mbt_ffi_load32((iter_base) + 0)) + array1928.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1368) + @types.SchemaValueNode::FixedListValue(array1928) } 20 => { - let array1370 : Array[@types.MapEntry] = []; - for index1371 = 0; index1371 < (mbt_ffi_load32((iter_base) + 12)); index1371 = index1371 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1371 * 8) + let array1930 : Array[@types.MapEntry] = []; + for index1931 = 0; index1931 < (mbt_ffi_load32((iter_base) + 12)); index1931 = index1931 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1931 * 8) - array1370.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array1930.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1370) + @types.SchemaValueNode::MapValue(array1930) } 21 => { - let lifted1372 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted1932 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -38429,14 +58029,14 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1372) + @types.SchemaValueNode::OptionValue(lifted1932) } 22 => { - let lifted1375 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted1935 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1373 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1933 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -38445,11 +58045,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::OkValue(lifted1373) + @types.ResultValuePayload::OkValue(lifted1933) } 1 => { - let lifted1374 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted1934 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -38458,58 +58058,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1374) + @types.ResultValuePayload::ErrValue(lifted1934) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1375) + @types.SchemaValueNode::ResultValue(lifted1935) } 23 => { - let result1376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1936 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1378 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1938 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1377 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1937 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1377) + Option::Some(result1937) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1376, language : lifted1378}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1936, language : lifted1938}) } 24 => { - let result1379 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1939 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1381 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted1941 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1940 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1380) + Option::Some(result1940) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1379, mime_type : lifted1381}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1939, mime_type : lifted1941}) } 25 => { - let result1382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1942 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1382) + @types.SchemaValueNode::PathValue(result1942) } 26 => { - let result1383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1943 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1383) + @types.SchemaValueNode::UrlValue(result1943) } 27 => { @@ -38521,21 +58121,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 29 => { - let result1384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result1944 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1384}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1944}) } 30 => { - let result1385 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1945 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1385, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1945, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1386 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result1946 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1386}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1946}) } 32 => { @@ -38544,11 +58144,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1388.push(lifted1387) + array1948.push(lifted1947) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - AgentInvocationResult::AgentMethod(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1351, defs : array1356, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array1388, root : mbt_ffi_load32((iter_base) + 64)}}}) + AgentInvocationResult::AgentMethod(AgentInvocationOutputParameters::{output : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1911, defs : array1916, root : mbt_ffi_load32((iter_base) + 52)}, value : @types.SchemaValueTree::{value_nodes : array1948, root : mbt_ffi_load32((iter_base) + 64)}}}) } 2 => { @@ -38556,57 +58156,57 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let lifted1391 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1951 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1390 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1950 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1390) + Option::Some(result1950) } _ => panic() } - AgentInvocationResult::LoadSnapshot(FallibleResultParameters::{error : lifted1391}) + AgentInvocationResult::LoadSnapshot(FallibleResultParameters::{error : lifted1951}) } 4 => { - let result1392 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result1952 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - let result1393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result1953 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - AgentInvocationResult::SaveSnapshot(SaveSnapshotResultParameters::{snapshot : SnapshotData::{data : result1392, mime_type : result1393}}) + AgentInvocationResult::SaveSnapshot(SaveSnapshotResultParameters::{snapshot : SnapshotData::{data : result1952, mime_type : result1953}}) } 5 => { - let lifted1395 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted1955 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1394 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1954 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1394) + Option::Some(result1954) } _ => panic() } - AgentInvocationResult::ProcessOplogEntries(FallibleResultParameters::{error : lifted1395}) + AgentInvocationResult::ProcessOplogEntries(FallibleResultParameters::{error : lifted1955}) } _ => panic() } - let lifted1398 : String? = match mbt_ffi_load8_u((iter_base) + 68) { + let lifted1958 : String? = match mbt_ffi_load8_u((iter_base) + 68) { 0 => Option::None 1 => { - let result1397 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 72), mbt_ffi_load32((iter_base) + 76)) + let result1957 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 72), mbt_ffi_load32((iter_base) + 76)) - Option::Some(result1397) + Option::Some(result1957) } _ => panic() } - PublicOplogEntry::AgentInvocationFinished(AgentInvocationFinishedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, result : lifted1396, method_name : lifted1398, consumed_fuel : mbt_ffi_load64((iter_base) + 80), component_revision : (mbt_ffi_load64((iter_base) + 88)).reinterpret_as_uint64()}) + PublicOplogEntry::AgentInvocationFinished(AgentInvocationFinishedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, result : lifted1956, method_name : lifted1958, consumed_fuel : mbt_ffi_load64((iter_base) + 80), component_revision : (mbt_ffi_load64((iter_base) + 88)).reinterpret_as_uint64()}) } 6 => { @@ -38614,17 +58214,17 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 7 => { - let result1399 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result1959 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let lifted1403 : RetryPolicyState? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted1963 : RetryPolicyState? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let array1401 : Array[StateNode] = []; - for index1402 = 0; index1402 < (mbt_ffi_load32((iter_base) + 60)); index1402 = index1402 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1402 * 16) + let array1961 : Array[StateNode] = []; + for index1962 = 0; index1962 < (mbt_ffi_load32((iter_base) + 60)); index1962 = index1962 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1962 * 16) - let lifted1400 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted1960 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { StateNode::Counter((mbt_ffi_load32((iter_base) + 4)).reinterpret_as_uint()) @@ -38652,16 +58252,16 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1401.push(lifted1400) + array1961.push(lifted1960) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - Option::Some(RetryPolicyState::{nodes : array1401}) + Option::Some(RetryPolicyState::{nodes : array1961}) } _ => panic() } - PublicOplogEntry::Error(ErrorParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, error : result1399, retry_from : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64(), inside_atomic_region : (mbt_ffi_load8_u((iter_base) + 48) != 0), retry_policy_state : lifted1403}) + PublicOplogEntry::Error(ErrorParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, error : result1959, retry_from : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64(), inside_atomic_region : (mbt_ffi_load8_u((iter_base) + 48) != 0), retry_policy_state : lifted1963}) } 8 => { @@ -38689,16 +58289,16 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 14 => { - let lifted1778 = match (mbt_ffi_load8_u((iter_base) + 32)) { + let lifted2478 = match (mbt_ffi_load8_u((iter_base) + 32)) { 0 => { - let result1404 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result1964 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let array1531 : Array[@types.SchemaTypeNode] = []; - for index1532 = 0; index1532 < (mbt_ffi_load32((iter_base) + 52)); index1532 = index1532 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1532 * 144) + let array2161 : Array[@types.SchemaTypeNode] = []; + for index2162 = 0; index2162 < (mbt_ffi_load32((iter_base) + 52)); index2162 = index2162 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2162 * 144) - let lifted1517 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2147 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -38709,43 +58309,743 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 2 => { - @types.SchemaTypeBody::S8Type + let lifted1971 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1966 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1965 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1965) + } + _ => panic() + } + + let lifted1968 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1967 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1967) + } + _ => panic() + } + + let lifted1970 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1969 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1969) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1966, max : lifted1968, unit : lifted1970}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted1971) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted1978 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1973 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1972 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1972) + } + _ => panic() + } + + let lifted1975 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1974 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1974) + } + _ => panic() + } + + let lifted1977 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1976 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1976) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1973, max : lifted1975, unit : lifted1977}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted1978) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted1985 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1980 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1979 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1979) + } + _ => panic() + } + + let lifted1982 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1981 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1981) + } + _ => panic() + } + + let lifted1984 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1983 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1983) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1980, max : lifted1982, unit : lifted1984}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted1985) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted1992 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1987 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1986 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1986) + } + _ => panic() + } + + let lifted1989 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1988 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1988) + } + _ => panic() + } + + let lifted1991 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1990 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1990) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1987, max : lifted1989, unit : lifted1991}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted1992) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted1999 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted1994 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted1993 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1993) + } + _ => panic() + } + + let lifted1996 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1995 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1995) + } + _ => panic() + } + + let lifted1998 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result1997 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result1997) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted1994, max : lifted1996, unit : lifted1998}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted1999) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted2006 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2001 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2000 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2000) + } + _ => panic() + } + + let lifted2003 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2002 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2002) + } + _ => panic() + } + + let lifted2005 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2004 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2004) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2001, max : lifted2003, unit : lifted2005}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted2006) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted2013 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2008 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2007 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2007) + } + _ => panic() + } + + let lifted2010 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2009 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2009) + } + _ => panic() + } + + let lifted2012 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2011 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2011) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2008, max : lifted2010, unit : lifted2012}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2013) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted2020 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2015 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2014 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2014) + } + _ => panic() + } + + let lifted2017 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2016 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2016) + } + _ => panic() + } + + let lifted2019 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2018 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2018) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2015, max : lifted2017, unit : lifted2019}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2020) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted2027 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2022 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2021 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2021) + } + _ => panic() + } + + let lifted2024 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2023 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2023) + } + _ => panic() + } + + let lifted2026 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2025 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2025) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2022, max : lifted2024, unit : lifted2026}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2027) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted2034 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2029 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2028 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2028) + } + _ => panic() + } + + let lifted2031 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2030 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2030) + } + _ => panic() + } + + let lifted2033 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2032 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2032) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2029, max : lifted2031, unit : lifted2033}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2034) } 12 => { @@ -38757,59 +59057,59 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 14 => { - let array1419 : Array[@types.NamedFieldType] = []; - for index1420 = 0; index1420 < (mbt_ffi_load32((iter_base) + 12)); index1420 = index1420 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1420 * 68) + let array2049 : Array[@types.NamedFieldType] = []; + for index2050 = 0; index2050 < (mbt_ffi_load32((iter_base) + 12)); index2050 = index2050 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2050 * 68) - let result1405 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2035 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1407 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2037 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result1406 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2036 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result1406) + Option::Some(result2036) } _ => panic() } - let array1409 : Array[String] = []; - for index1410 = 0; index1410 < (mbt_ffi_load32((iter_base) + 28)); index1410 = index1410 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1410 * 8) + let array2039 : Array[String] = []; + for index2040 = 0; index2040 < (mbt_ffi_load32((iter_base) + 28)); index2040 = index2040 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2040 * 8) - let result1408 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2038 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1409.push(result1408) + array2039.push(result2038) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array1412 : Array[String] = []; - for index1413 = 0; index1413 < (mbt_ffi_load32((iter_base) + 36)); index1413 = index1413 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1413 * 8) + let array2042 : Array[String] = []; + for index2043 = 0; index2043 < (mbt_ffi_load32((iter_base) + 36)); index2043 = index2043 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index2043 * 8) - let result1411 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2041 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1412.push(result1411) + array2042.push(result2041) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted1415 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted2045 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result1414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2044 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result1414) + Option::Some(result2044) } _ => panic() } - let lifted1418 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted2048 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted1417 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted2047 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -38824,33 +59124,33 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1416 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result2046 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1416) + @types.Role::Other(result2046) } _ => panic() } - Option::Some(lifted1417) + Option::Some(lifted2047) } _ => panic() } - array1419.push(@types.NamedFieldType::{name : result1405, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1407, aliases : array1409, examples : array1412, deprecated : lifted1415, role : lifted1418}}) + array2049.push(@types.NamedFieldType::{name : result2035, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted2037, aliases : array2039, examples : array2042, deprecated : lifted2045, role : lifted2048}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array1419) + @types.SchemaTypeBody::RecordType(array2049) } 15 => { - let array1436 : Array[@types.VariantCaseType] = []; - for index1437 = 0; index1437 < (mbt_ffi_load32((iter_base) + 12)); index1437 = index1437 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1437 * 72) + let array2066 : Array[@types.VariantCaseType] = []; + for index2067 = 0; index2067 < (mbt_ffi_load32((iter_base) + 12)); index2067 = index2067 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2067 * 72) - let result1421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2051 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1422 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2052 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -38859,53 +59159,53 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1424 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2054 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1423 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2053 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1423) + Option::Some(result2053) } _ => panic() } - let array1426 : Array[String] = []; - for index1427 = 0; index1427 < (mbt_ffi_load32((iter_base) + 32)); index1427 = index1427 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1427 * 8) + let array2056 : Array[String] = []; + for index2057 = 0; index2057 < (mbt_ffi_load32((iter_base) + 32)); index2057 = index2057 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2057 * 8) - let result1425 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2055 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1426.push(result1425) + array2056.push(result2055) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1429 : Array[String] = []; - for index1430 = 0; index1430 < (mbt_ffi_load32((iter_base) + 40)); index1430 = index1430 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1430 * 8) + let array2059 : Array[String] = []; + for index2060 = 0; index2060 < (mbt_ffi_load32((iter_base) + 40)); index2060 = index2060 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2060 * 8) - let result1428 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2058 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1429.push(result1428) + array2059.push(result2058) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1432 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted2062 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1431 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2061 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1431) + Option::Some(result2061) } _ => panic() } - let lifted1435 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2065 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1434 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted2064 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -38920,63 +59220,63 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1433 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result2063 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1433) + @types.Role::Other(result2063) } _ => panic() } - Option::Some(lifted1434) + Option::Some(lifted2064) } _ => panic() } - array1436.push(@types.VariantCaseType::{name : result1421, payload : lifted1422, metadata : @types.MetadataEnvelope::{doc : lifted1424, aliases : array1426, examples : array1429, deprecated : lifted1432, role : lifted1435}}) + array2066.push(@types.VariantCaseType::{name : result2051, payload : lifted2052, metadata : @types.MetadataEnvelope::{doc : lifted2054, aliases : array2056, examples : array2059, deprecated : lifted2062, role : lifted2065}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1436) + @types.SchemaTypeBody::VariantType(array2066) } 16 => { - let array1439 : Array[String] = []; - for index1440 = 0; index1440 < (mbt_ffi_load32((iter_base) + 12)); index1440 = index1440 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1440 * 8) + let array2069 : Array[String] = []; + for index2070 = 0; index2070 < (mbt_ffi_load32((iter_base) + 12)); index2070 = index2070 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2070 * 8) - let result1438 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2068 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1439.push(result1438) + array2069.push(result2068) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1439) + @types.SchemaTypeBody::EnumType(array2069) } 17 => { - let array1442 : Array[String] = []; - for index1443 = 0; index1443 < (mbt_ffi_load32((iter_base) + 12)); index1443 = index1443 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1443 * 8) + let array2072 : Array[String] = []; + for index2073 = 0; index2073 < (mbt_ffi_load32((iter_base) + 12)); index2073 = index2073 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2073 * 8) - let result1441 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2071 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1442.push(result1441) + array2072.push(result2071) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1442) + @types.SchemaTypeBody::FlagsType(array2072) } 18 => { - let array1444 : Array[Int] = []; - for index1445 = 0; index1445 < (mbt_ffi_load32((iter_base) + 12)); index1445 = index1445 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1445 * 4) + let array2074 : Array[Int] = []; + for index2075 = 0; index2075 < (mbt_ffi_load32((iter_base) + 12)); index2075 = index2075 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2075 * 4) - array1444.push(mbt_ffi_load32((iter_base) + 0)) + array2074.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1444) + @types.SchemaTypeBody::TupleType(array2074) } 19 => { @@ -38996,7 +59296,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 23 => { - let lifted1446 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2076 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -39005,7 +59305,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1447 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2077 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -39014,30 +59314,30 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1446, err : lifted1447}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted2076, err : lifted2077}) } 24 => { - let lifted1451 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2081 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1449 : Array[String] = []; - for index1450 = 0; index1450 < (mbt_ffi_load32((iter_base) + 16)); index1450 = index1450 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1450 * 8) + let array2079 : Array[String] = []; + for index2080 = 0; index2080 < (mbt_ffi_load32((iter_base) + 16)); index2080 = index2080 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2080 * 8) - let result1448 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2078 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1449.push(result1448) + array2079.push(result2078) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1449) + Option::Some(array2079) } _ => panic() } - let lifted1452 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2082 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -39046,7 +59346,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1453 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2083 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -39055,41 +59355,41 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1455 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2085 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1454 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2084 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1454) + Option::Some(result2084) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1451, min_length : lifted1452, max_length : lifted1453, regex : lifted1455}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted2081, min_length : lifted2082, max_length : lifted2083, regex : lifted2085}) } 25 => { - let lifted1459 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2089 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1457 : Array[String] = []; - for index1458 = 0; index1458 < (mbt_ffi_load32((iter_base) + 16)); index1458 = index1458 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1458 * 8) + let array2087 : Array[String] = []; + for index2088 = 0; index2088 < (mbt_ffi_load32((iter_base) + 16)); index2088 = index2088 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2088 * 8) - let result1456 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2086 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1457.push(result1456) + array2087.push(result2086) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1457) + Option::Some(array2087) } _ => panic() } - let lifted1460 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2090 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -39098,7 +59398,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1461 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2091 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -39107,91 +59407,91 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1459, min_bytes : lifted1460, max_bytes : lifted1461}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted2089, min_bytes : lifted2090, max_bytes : lifted2091}) } 26 => { - let lifted1465 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2095 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1463 : Array[String] = []; - for index1464 = 0; index1464 < (mbt_ffi_load32((iter_base) + 20)); index1464 = index1464 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1464 * 8) + let array2093 : Array[String] = []; + for index2094 = 0; index2094 < (mbt_ffi_load32((iter_base) + 20)); index2094 = index2094 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2094 * 8) - let result1462 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2092 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1463.push(result1462) + array2093.push(result2092) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1463) + Option::Some(array2093) } _ => panic() } - let lifted1469 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2099 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1467 : Array[String] = []; - for index1468 = 0; index1468 < (mbt_ffi_load32((iter_base) + 32)); index1468 = index1468 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1468 * 8) + let array2097 : Array[String] = []; + for index2098 = 0; index2098 < (mbt_ffi_load32((iter_base) + 32)); index2098 = index2098 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2098 * 8) - let result1466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2096 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1467.push(result1466) + array2097.push(result2096) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1467) + Option::Some(array2097) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1465, allowed_extensions : lifted1469}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted2095, allowed_extensions : lifted2099}) } 27 => { - let lifted1473 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2103 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1471 : Array[String] = []; - for index1472 = 0; index1472 < (mbt_ffi_load32((iter_base) + 16)); index1472 = index1472 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1472 * 8) + let array2101 : Array[String] = []; + for index2102 = 0; index2102 < (mbt_ffi_load32((iter_base) + 16)); index2102 = index2102 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2102 * 8) - let result1470 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1471.push(result1470) + array2101.push(result2100) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1471) + Option::Some(array2101) } _ => panic() } - let lifted1477 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2107 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1475 : Array[String] = []; - for index1476 = 0; index1476 < (mbt_ffi_load32((iter_base) + 28)); index1476 = index1476 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1476 * 8) + let array2105 : Array[String] = []; + for index2106 = 0; index2106 < (mbt_ffi_load32((iter_base) + 28)); index2106 = index2106 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2106 * 8) - let result1474 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2104 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1475.push(result1474) + array2105.push(result2104) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1475) + Option::Some(array2105) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1473, allowed_hosts : lifted1477}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted2103, allowed_hosts : lifted2107}) } 28 => { @@ -39203,148 +59503,148 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 30 => { - let result1478 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2108 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1480 : Array[String] = []; - for index1481 = 0; index1481 < (mbt_ffi_load32((iter_base) + 20)); index1481 = index1481 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1481 * 8) + let array2110 : Array[String] = []; + for index2111 = 0; index2111 < (mbt_ffi_load32((iter_base) + 20)); index2111 = index2111 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2111 * 8) - let result1479 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1480.push(result1479) + array2110.push(result2109) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1483 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2113 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1482 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1482}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result2112}) } _ => panic() } - let lifted1485 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2115 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1484 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result2114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1484}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result2114}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1478, allowed_suffixes : array1480, min : lifted1483, max : lifted1485}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result2108, allowed_suffixes : array2110, min : lifted2113, max : lifted2115}) } 31 => { - let array1509 : Array[@types.UnionBranch] = []; - for index1510 = 0; index1510 < (mbt_ffi_load32((iter_base) + 12)); index1510 = index1510 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1510 * 92) + let array2139 : Array[@types.UnionBranch] = []; + for index2140 = 0; index2140 < (mbt_ffi_load32((iter_base) + 12)); index2140 = index2140 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2140 * 92) - let result1486 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2116 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1495 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted2125 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1487 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1487) + @types.DiscriminatorRule::Prefix(result2117) } 1 => { - let result1488 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1488) + @types.DiscriminatorRule::Suffix(result2118) } 2 => { - let result1489 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2119 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1489) + @types.DiscriminatorRule::Contains(result2119) } 3 => { - let result1490 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1490) + @types.DiscriminatorRule::Regex(result2120) } 4 => { - let result1491 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2121 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1493 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2123 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1492 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2122 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1492) + Option::Some(result2122) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1491, literal : lifted1493}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result2121, literal : lifted2123}) } 5 => { - let result1494 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2124 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1494) + @types.DiscriminatorRule::FieldAbsent(result2124) } _ => panic() } - let lifted1497 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2127 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1496 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1496) + Option::Some(result2126) } _ => panic() } - let array1499 : Array[String] = []; - for index1500 = 0; index1500 < (mbt_ffi_load32((iter_base) + 52)); index1500 = index1500 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1500 * 8) + let array2129 : Array[String] = []; + for index2130 = 0; index2130 < (mbt_ffi_load32((iter_base) + 52)); index2130 = index2130 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2130 * 8) - let result1498 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2128 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1499.push(result1498) + array2129.push(result2128) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1502 : Array[String] = []; - for index1503 = 0; index1503 < (mbt_ffi_load32((iter_base) + 60)); index1503 = index1503 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1503 * 8) + let array2132 : Array[String] = []; + for index2133 = 0; index2133 < (mbt_ffi_load32((iter_base) + 60)); index2133 = index2133 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2133 * 8) - let result1501 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2131 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1502.push(result1501) + array2132.push(result2131) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1505 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted2135 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1504 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result2134 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1504) + Option::Some(result2134) } _ => panic() } - let lifted1508 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted2138 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1507 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted2137 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -39359,57 +59659,57 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1506 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result2136 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1506) + @types.Role::Other(result2136) } _ => panic() } - Option::Some(lifted1507) + Option::Some(lifted2137) } _ => panic() } - array1509.push(@types.UnionBranch::{tag : result1486, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1495, metadata : @types.MetadataEnvelope::{doc : lifted1497, aliases : array1499, examples : array1502, deprecated : lifted1505, role : lifted1508}}) + array2139.push(@types.UnionBranch::{tag : result2116, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted2125, metadata : @types.MetadataEnvelope::{doc : lifted2127, aliases : array2129, examples : array2132, deprecated : lifted2135, role : lifted2138}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1509}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array2139}) } 32 => { - let lifted1512 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2142 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1511) + Option::Some(result2141) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1512}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted2142}) } 33 => { - let lifted1514 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2144 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1513 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1513) + Option::Some(result2143) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1514}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted2144}) } 34 => { - let lifted1515 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2145 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -39418,11 +59718,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1515) + @types.SchemaTypeBody::FutureType(lifted2145) } 35 => { - let lifted1516 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2146 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -39431,58 +59731,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1516) + @types.SchemaTypeBody::StreamType(lifted2146) } _ => panic() } - let lifted1519 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted2149 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result2148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1518) + Option::Some(result2148) } _ => panic() } - let array1521 : Array[String] = []; - for index1522 = 0; index1522 < (mbt_ffi_load32((iter_base) + 104)); index1522 = index1522 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1522 * 8) + let array2151 : Array[String] = []; + for index2152 = 0; index2152 < (mbt_ffi_load32((iter_base) + 104)); index2152 = index2152 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index2152 * 8) - let result1520 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1521.push(result1520) + array2151.push(result2150) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1524 : Array[String] = []; - for index1525 = 0; index1525 < (mbt_ffi_load32((iter_base) + 112)); index1525 = index1525 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1525 * 8) + let array2154 : Array[String] = []; + for index2155 = 0; index2155 < (mbt_ffi_load32((iter_base) + 112)); index2155 = index2155 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index2155 * 8) - let result1523 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1524.push(result1523) + array2154.push(result2153) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1527 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted2157 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1526 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result2156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1526) + Option::Some(result2156) } _ => panic() } - let lifted1530 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted2160 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1529 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted2159 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -39497,48 +59797,48 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1528 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result2158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1528) + @types.Role::Other(result2158) } _ => panic() } - Option::Some(lifted1529) + Option::Some(lifted2159) } _ => panic() } - array1531.push(@types.SchemaTypeNode::{body : lifted1517, metadata : @types.MetadataEnvelope::{doc : lifted1519, aliases : array1521, examples : array1524, deprecated : lifted1527, role : lifted1530}}) + array2161.push(@types.SchemaTypeNode::{body : lifted2147, metadata : @types.MetadataEnvelope::{doc : lifted2149, aliases : array2151, examples : array2154, deprecated : lifted2157, role : lifted2160}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1536 : Array[@types.SchemaTypeDef] = []; - for index1537 = 0; index1537 < (mbt_ffi_load32((iter_base) + 60)); index1537 = index1537 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1537 * 24) + let array2166 : Array[@types.SchemaTypeDef] = []; + for index2167 = 0; index2167 < (mbt_ffi_load32((iter_base) + 60)); index2167 = index2167 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2167 * 24) - let result1533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2163 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1535 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2165 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1534 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2164 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1534) + Option::Some(result2164) } _ => panic() } - array1536.push(@types.SchemaTypeDef::{id : result1533, name : lifted1535, body : mbt_ffi_load32((iter_base) + 20)}) + array2166.push(@types.SchemaTypeDef::{id : result2163, name : lifted2165, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let array1568 : Array[@types.SchemaValueNode] = []; - for index1569 = 0; index1569 < (mbt_ffi_load32((iter_base) + 72)); index1569 = index1569 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index1569 * 32) + let array2198 : Array[@types.SchemaValueNode] = []; + for index2199 = 0; index2199 < (mbt_ffi_load32((iter_base) + 72)); index2199 = index2199 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index2199 * 32) - let lifted1567 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2197 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -39589,25 +59889,25 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 12 => { - let result1538 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1538) + @types.SchemaValueNode::StringValue(result2168) } 13 => { - let array1539 : Array[Int] = []; - for index1540 = 0; index1540 < (mbt_ffi_load32((iter_base) + 12)); index1540 = index1540 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1540 * 4) + let array2169 : Array[Int] = []; + for index2170 = 0; index2170 < (mbt_ffi_load32((iter_base) + 12)); index2170 = index2170 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2170 * 4) - array1539.push(mbt_ffi_load32((iter_base) + 0)) + array2169.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1539) + @types.SchemaValueNode::RecordValue(array2169) } 14 => { - let lifted1541 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2171 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -39616,7 +59916,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1541}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted2171}) } 15 => { @@ -39624,67 +59924,67 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 16 => { - let array1542 : Array[Bool] = []; - for index1543 = 0; index1543 < (mbt_ffi_load32((iter_base) + 12)); index1543 = index1543 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1543 * 1) + let array2172 : Array[Bool] = []; + for index2173 = 0; index2173 < (mbt_ffi_load32((iter_base) + 12)); index2173 = index2173 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2173 * 1) - array1542.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array2172.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1542) + @types.SchemaValueNode::FlagsValue(array2172) } 17 => { - let array1544 : Array[Int] = []; - for index1545 = 0; index1545 < (mbt_ffi_load32((iter_base) + 12)); index1545 = index1545 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1545 * 4) + let array2174 : Array[Int] = []; + for index2175 = 0; index2175 < (mbt_ffi_load32((iter_base) + 12)); index2175 = index2175 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2175 * 4) - array1544.push(mbt_ffi_load32((iter_base) + 0)) + array2174.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1544) + @types.SchemaValueNode::TupleValue(array2174) } 18 => { - let array1546 : Array[Int] = []; - for index1547 = 0; index1547 < (mbt_ffi_load32((iter_base) + 12)); index1547 = index1547 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1547 * 4) + let array2176 : Array[Int] = []; + for index2177 = 0; index2177 < (mbt_ffi_load32((iter_base) + 12)); index2177 = index2177 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2177 * 4) - array1546.push(mbt_ffi_load32((iter_base) + 0)) + array2176.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1546) + @types.SchemaValueNode::ListValue(array2176) } 19 => { - let array1548 : Array[Int] = []; - for index1549 = 0; index1549 < (mbt_ffi_load32((iter_base) + 12)); index1549 = index1549 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1549 * 4) + let array2178 : Array[Int] = []; + for index2179 = 0; index2179 < (mbt_ffi_load32((iter_base) + 12)); index2179 = index2179 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2179 * 4) - array1548.push(mbt_ffi_load32((iter_base) + 0)) + array2178.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1548) + @types.SchemaValueNode::FixedListValue(array2178) } 20 => { - let array1550 : Array[@types.MapEntry] = []; - for index1551 = 0; index1551 < (mbt_ffi_load32((iter_base) + 12)); index1551 = index1551 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1551 * 8) + let array2180 : Array[@types.MapEntry] = []; + for index2181 = 0; index2181 < (mbt_ffi_load32((iter_base) + 12)); index2181 = index2181 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2181 * 8) - array1550.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array2180.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1550) + @types.SchemaValueNode::MapValue(array2180) } 21 => { - let lifted1552 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2182 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -39693,14 +59993,14 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1552) + @types.SchemaValueNode::OptionValue(lifted2182) } 22 => { - let lifted1555 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2185 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1553 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2183 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -39709,11 +60009,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::OkValue(lifted1553) + @types.ResultValuePayload::OkValue(lifted2183) } 1 => { - let lifted1554 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2184 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -39722,58 +60022,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1554) + @types.ResultValuePayload::ErrValue(lifted2184) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1555) + @types.SchemaValueNode::ResultValue(lifted2185) } 23 => { - let result1556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2186 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1558 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2188 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1557 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1557) + Option::Some(result2187) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1556, language : lifted1558}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result2186, language : lifted2188}) } 24 => { - let result1559 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2189 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1561 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2191 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1560 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1560) + Option::Some(result2190) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1559, mime_type : lifted1561}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result2189, mime_type : lifted2191}) } 25 => { - let result1562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1562) + @types.SchemaValueNode::PathValue(result2192) } 26 => { - let result1563 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1563) + @types.SchemaValueNode::UrlValue(result2193) } 27 => { @@ -39785,21 +60085,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 29 => { - let result1564 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1564}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result2194}) } 30 => { - let result1565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1565, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result2195, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1566}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result2196}) } 32 => { @@ -39808,47 +60108,47 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1568.push(lifted1567) + array2198.push(lifted2197) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - let result1570 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) + let result2200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) - let array1572 : Array[String] = []; - for index1573 = 0; index1573 < (mbt_ffi_load32((iter_base) + 92)); index1573 = index1573 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index1573 * 8) + let array2202 : Array[String] = []; + for index2203 = 0; index2203 < (mbt_ffi_load32((iter_base) + 92)); index2203 = index2203 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 88)) + (index2203 * 8) - let result1571 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2201 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1572.push(result1571) + array2202.push(result2201) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 88)) - let array1587 : Array[Array[SpanData]] = []; - for index1588 = 0; index1588 < (mbt_ffi_load32((iter_base) + 100)); index1588 = index1588 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index1588 * 8) + let array2217 : Array[Array[SpanData]] = []; + for index2218 = 0; index2218 < (mbt_ffi_load32((iter_base) + 100)); index2218 = index2218 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index2218 * 8) - let array1585 : Array[SpanData] = []; - for index1586 = 0; index1586 < (mbt_ffi_load32((iter_base) + 4)); index1586 = index1586 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1586 * 80) + let array2215 : Array[SpanData] = []; + for index2216 = 0; index2216 < (mbt_ffi_load32((iter_base) + 4)); index2216 = index2216 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index2216 * 80) - let lifted1584 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2214 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1574 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2204 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1576 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted2206 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result1575 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result1575) + Option::Some(result2205) } _ => panic() } - let lifted1577 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted2207 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -39857,58 +60157,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let array1581 : Array[@context.Attribute] = []; - for index1582 = 0; index1582 < (mbt_ffi_load32((iter_base) + 68)); index1582 = index1582 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1582 * 20) + let array2211 : Array[@context.Attribute] = []; + for index2212 = 0; index2212 < (mbt_ffi_load32((iter_base) + 68)); index2212 = index2212 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index2212 * 20) - let result1578 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2208 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1580 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2210 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result1579 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2209 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result1579) + @context.AttributeValue::String(result2209) } _ => panic() } - array1581.push(@context.Attribute::{key : result1578, value : lifted1580}) + array2211.push(@context.Attribute::{key : result2208, value : lifted2210}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result1574, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1576, linked_context : lifted1577, attributes : array1581, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result2204, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted2206, linked_context : lifted2207, attributes : array2211, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result1583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2213 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result1583}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result2213}) } _ => panic() } - array1585.push(lifted1584) + array2215.push(lifted2214) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array1587.push(array1585) + array2217.push(array2215) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 96)) - AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result1404, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1531, defs : array1536, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array1568, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result1570, trace_states : array1572, invocation_context : array1587}) + AgentInvocation::AgentInitialization(AgentInitializationParameters::{idempotency_key : result1964, constructor_parameters : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array2161, defs : array2166, root : mbt_ffi_load32((iter_base) + 64)}, value : @types.SchemaValueTree::{value_nodes : array2198, root : mbt_ffi_load32((iter_base) + 76)}}, trace_id : result2200, trace_states : array2202, invocation_context : array2217}) } 1 => { - let result1589 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2219 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let result1590 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2220 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - let array1717 : Array[@types.SchemaTypeNode] = []; - for index1718 = 0; index1718 < (mbt_ffi_load32((iter_base) + 60)); index1718 = index1718 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1718 * 144) + let array2417 : Array[@types.SchemaTypeNode] = []; + for index2418 = 0; index2418 < (mbt_ffi_load32((iter_base) + 60)); index2418 = index2418 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2418 * 144) - let lifted1703 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2403 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -39919,43 +60219,743 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 2 => { - @types.SchemaTypeBody::S8Type + let lifted2227 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2222 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2221 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2221) + } + _ => panic() + } + + let lifted2224 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2223 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2223) + } + _ => panic() + } + + let lifted2226 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2225) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2222, max : lifted2224, unit : lifted2226}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted2227) } 3 => { - @types.SchemaTypeBody::S16Type + let lifted2234 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2229 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2228 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2228) + } + _ => panic() + } + + let lifted2231 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2230 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2230) + } + _ => panic() + } + + let lifted2233 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2232 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2232) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2229, max : lifted2231, unit : lifted2233}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted2234) } 4 => { - @types.SchemaTypeBody::S32Type + let lifted2241 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2236 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2235 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2235) + } + _ => panic() + } + + let lifted2238 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2237 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2237) + } + _ => panic() + } + + let lifted2240 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2239 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2239) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2236, max : lifted2238, unit : lifted2240}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted2241) } 5 => { - @types.SchemaTypeBody::S64Type + let lifted2248 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2243 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2242 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2242) + } + _ => panic() + } + + let lifted2245 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2244 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2244) + } + _ => panic() + } + + let lifted2247 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2246 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2246) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2243, max : lifted2245, unit : lifted2247}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted2248) } 6 => { - @types.SchemaTypeBody::U8Type + let lifted2255 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2250 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2249 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2249) + } + _ => panic() + } + + let lifted2252 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2251 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2251) + } + _ => panic() + } + + let lifted2254 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2253) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2250, max : lifted2252, unit : lifted2254}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted2255) } 7 => { - @types.SchemaTypeBody::U16Type + let lifted2262 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2257 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2256 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2256) + } + _ => panic() + } + + let lifted2259 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2258 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2258) + } + _ => panic() + } + + let lifted2261 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2260 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2260) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2257, max : lifted2259, unit : lifted2261}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted2262) } 8 => { - @types.SchemaTypeBody::U32Type + let lifted2269 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2264 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2263 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2263) + } + _ => panic() + } + + let lifted2266 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2265 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2265) + } + _ => panic() + } + + let lifted2268 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2267) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2264, max : lifted2266, unit : lifted2268}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted2269) } 9 => { - @types.SchemaTypeBody::U64Type + let lifted2276 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2271 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2270 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2270) + } + _ => panic() + } + + let lifted2273 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2272 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2272) + } + _ => panic() + } + + let lifted2275 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2274 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2274) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2271, max : lifted2273, unit : lifted2275}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted2276) } 10 => { - @types.SchemaTypeBody::F32Type + let lifted2283 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2278 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2277 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2277) + } + _ => panic() + } + + let lifted2280 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2279 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2279) + } + _ => panic() + } + + let lifted2282 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2281 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2281) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2278, max : lifted2280, unit : lifted2282}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted2283) } 11 => { - @types.SchemaTypeBody::F64Type + let lifted2290 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted2285 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted2284 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2284) + } + _ => panic() + } + + let lifted2287 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted2286 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted2286) + } + _ => panic() + } + + let lifted2289 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result2288 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result2288) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted2285, max : lifted2287, unit : lifted2289}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted2290) } 12 => { @@ -39967,59 +60967,59 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 14 => { - let array1605 : Array[@types.NamedFieldType] = []; - for index1606 = 0; index1606 < (mbt_ffi_load32((iter_base) + 12)); index1606 = index1606 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1606 * 68) + let array2305 : Array[@types.NamedFieldType] = []; + for index2306 = 0; index2306 < (mbt_ffi_load32((iter_base) + 12)); index2306 = index2306 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2306 * 68) - let result1591 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2291 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1593 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2293 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result1592 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2292 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result1592) + Option::Some(result2292) } _ => panic() } - let array1595 : Array[String] = []; - for index1596 = 0; index1596 < (mbt_ffi_load32((iter_base) + 28)); index1596 = index1596 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1596 * 8) + let array2295 : Array[String] = []; + for index2296 = 0; index2296 < (mbt_ffi_load32((iter_base) + 28)); index2296 = index2296 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2296 * 8) - let result1594 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2294 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1595.push(result1594) + array2295.push(result2294) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array1598 : Array[String] = []; - for index1599 = 0; index1599 < (mbt_ffi_load32((iter_base) + 36)); index1599 = index1599 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index1599 * 8) + let array2298 : Array[String] = []; + for index2299 = 0; index2299 < (mbt_ffi_load32((iter_base) + 36)); index2299 = index2299 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index2299 * 8) - let result1597 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2297 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1598.push(result1597) + array2298.push(result2297) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted1601 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted2301 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result1600 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result1600) + Option::Some(result2300) } _ => panic() } - let lifted1604 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted2304 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted1603 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted2303 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -40034,33 +61034,33 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1602 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result2302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result1602) + @types.Role::Other(result2302) } _ => panic() } - Option::Some(lifted1603) + Option::Some(lifted2303) } _ => panic() } - array1605.push(@types.NamedFieldType::{name : result1591, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted1593, aliases : array1595, examples : array1598, deprecated : lifted1601, role : lifted1604}}) + array2305.push(@types.NamedFieldType::{name : result2291, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted2293, aliases : array2295, examples : array2298, deprecated : lifted2301, role : lifted2304}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array1605) + @types.SchemaTypeBody::RecordType(array2305) } 15 => { - let array1622 : Array[@types.VariantCaseType] = []; - for index1623 = 0; index1623 < (mbt_ffi_load32((iter_base) + 12)); index1623 = index1623 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1623 * 72) + let array2322 : Array[@types.VariantCaseType] = []; + for index2323 = 0; index2323 < (mbt_ffi_load32((iter_base) + 12)); index2323 = index2323 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2323 * 72) - let result1607 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1608 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2308 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -40069,53 +61069,53 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1610 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2310 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1609 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2309 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1609) + Option::Some(result2309) } _ => panic() } - let array1612 : Array[String] = []; - for index1613 = 0; index1613 < (mbt_ffi_load32((iter_base) + 32)); index1613 = index1613 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1613 * 8) + let array2312 : Array[String] = []; + for index2313 = 0; index2313 < (mbt_ffi_load32((iter_base) + 32)); index2313 = index2313 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2313 * 8) - let result1611 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2311 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1612.push(result1611) + array2312.push(result2311) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array1615 : Array[String] = []; - for index1616 = 0; index1616 < (mbt_ffi_load32((iter_base) + 40)); index1616 = index1616 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1616 * 8) + let array2315 : Array[String] = []; + for index2316 = 0; index2316 < (mbt_ffi_load32((iter_base) + 40)); index2316 = index2316 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2316 * 8) - let result1614 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2314 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1615.push(result1614) + array2315.push(result2314) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted1618 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted2318 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result1617 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result1617) + Option::Some(result2317) } _ => panic() } - let lifted1621 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2321 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted1620 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted2320 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -40130,63 +61130,63 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1619 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result2319 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result1619) + @types.Role::Other(result2319) } _ => panic() } - Option::Some(lifted1620) + Option::Some(lifted2320) } _ => panic() } - array1622.push(@types.VariantCaseType::{name : result1607, payload : lifted1608, metadata : @types.MetadataEnvelope::{doc : lifted1610, aliases : array1612, examples : array1615, deprecated : lifted1618, role : lifted1621}}) + array2322.push(@types.VariantCaseType::{name : result2307, payload : lifted2308, metadata : @types.MetadataEnvelope::{doc : lifted2310, aliases : array2312, examples : array2315, deprecated : lifted2318, role : lifted2321}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array1622) + @types.SchemaTypeBody::VariantType(array2322) } 16 => { - let array1625 : Array[String] = []; - for index1626 = 0; index1626 < (mbt_ffi_load32((iter_base) + 12)); index1626 = index1626 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1626 * 8) + let array2325 : Array[String] = []; + for index2326 = 0; index2326 < (mbt_ffi_load32((iter_base) + 12)); index2326 = index2326 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2326 * 8) - let result1624 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2324 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1625.push(result1624) + array2325.push(result2324) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array1625) + @types.SchemaTypeBody::EnumType(array2325) } 17 => { - let array1628 : Array[String] = []; - for index1629 = 0; index1629 < (mbt_ffi_load32((iter_base) + 12)); index1629 = index1629 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1629 * 8) + let array2328 : Array[String] = []; + for index2329 = 0; index2329 < (mbt_ffi_load32((iter_base) + 12)); index2329 = index2329 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2329 * 8) - let result1627 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2327 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1628.push(result1627) + array2328.push(result2327) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array1628) + @types.SchemaTypeBody::FlagsType(array2328) } 18 => { - let array1630 : Array[Int] = []; - for index1631 = 0; index1631 < (mbt_ffi_load32((iter_base) + 12)); index1631 = index1631 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1631 * 4) + let array2330 : Array[Int] = []; + for index2331 = 0; index2331 < (mbt_ffi_load32((iter_base) + 12)); index2331 = index2331 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2331 * 4) - array1630.push(mbt_ffi_load32((iter_base) + 0)) + array2330.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array1630) + @types.SchemaTypeBody::TupleType(array2330) } 19 => { @@ -40206,7 +61206,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 23 => { - let lifted1632 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2332 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -40215,7 +61215,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1633 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2333 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -40224,30 +61224,30 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted1632, err : lifted1633}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted2332, err : lifted2333}) } 24 => { - let lifted1637 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2337 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1635 : Array[String] = []; - for index1636 = 0; index1636 < (mbt_ffi_load32((iter_base) + 16)); index1636 = index1636 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1636 * 8) + let array2335 : Array[String] = []; + for index2336 = 0; index2336 < (mbt_ffi_load32((iter_base) + 16)); index2336 = index2336 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2336 * 8) - let result1634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2334 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1635.push(result1634) + array2335.push(result2334) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1635) + Option::Some(array2335) } _ => panic() } - let lifted1638 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2338 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -40256,7 +61256,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1639 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2339 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -40265,41 +61265,41 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1641 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2341 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1640 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2340 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1640) + Option::Some(result2340) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted1637, min_length : lifted1638, max_length : lifted1639, regex : lifted1641}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted2337, min_length : lifted2338, max_length : lifted2339, regex : lifted2341}) } 25 => { - let lifted1645 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2345 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1643 : Array[String] = []; - for index1644 = 0; index1644 < (mbt_ffi_load32((iter_base) + 16)); index1644 = index1644 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1644 * 8) + let array2343 : Array[String] = []; + for index2344 = 0; index2344 < (mbt_ffi_load32((iter_base) + 16)); index2344 = index2344 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2344 * 8) - let result1642 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1643.push(result1642) + array2343.push(result2342) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1643) + Option::Some(array2343) } _ => panic() } - let lifted1646 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2346 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -40308,7 +61308,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let lifted1647 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted2347 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -40317,91 +61317,91 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted1645, min_bytes : lifted1646, max_bytes : lifted1647}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted2345, min_bytes : lifted2346, max_bytes : lifted2347}) } 26 => { - let lifted1651 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2351 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array1649 : Array[String] = []; - for index1650 = 0; index1650 < (mbt_ffi_load32((iter_base) + 20)); index1650 = index1650 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1650 * 8) + let array2349 : Array[String] = []; + for index2350 = 0; index2350 < (mbt_ffi_load32((iter_base) + 20)); index2350 = index2350 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2350 * 8) - let result1648 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2348 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1649.push(result1648) + array2349.push(result2348) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array1649) + Option::Some(array2349) } _ => panic() } - let lifted1655 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2355 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array1653 : Array[String] = []; - for index1654 = 0; index1654 < (mbt_ffi_load32((iter_base) + 32)); index1654 = index1654 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index1654 * 8) + let array2353 : Array[String] = []; + for index2354 = 0; index2354 < (mbt_ffi_load32((iter_base) + 32)); index2354 = index2354 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index2354 * 8) - let result1652 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2352 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1653.push(result1652) + array2353.push(result2352) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array1653) + Option::Some(array2353) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted1651, allowed_extensions : lifted1655}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted2351, allowed_extensions : lifted2355}) } 27 => { - let lifted1659 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2359 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array1657 : Array[String] = []; - for index1658 = 0; index1658 < (mbt_ffi_load32((iter_base) + 16)); index1658 = index1658 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index1658 * 8) + let array2357 : Array[String] = []; + for index2358 = 0; index2358 < (mbt_ffi_load32((iter_base) + 16)); index2358 = index2358 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index2358 * 8) - let result1656 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1657.push(result1656) + array2357.push(result2356) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array1657) + Option::Some(array2357) } _ => panic() } - let lifted1663 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted2363 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array1661 : Array[String] = []; - for index1662 = 0; index1662 < (mbt_ffi_load32((iter_base) + 28)); index1662 = index1662 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index1662 * 8) + let array2361 : Array[String] = []; + for index2362 = 0; index2362 < (mbt_ffi_load32((iter_base) + 28)); index2362 = index2362 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index2362 * 8) - let result1660 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2360 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1661.push(result1660) + array2361.push(result2360) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array1661) + Option::Some(array2361) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted1659, allowed_hosts : lifted1663}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted2359, allowed_hosts : lifted2363}) } 28 => { @@ -40413,148 +61413,148 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 30 => { - let result1664 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2364 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1666 : Array[String] = []; - for index1667 = 0; index1667 < (mbt_ffi_load32((iter_base) + 20)); index1667 = index1667 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1667 * 8) + let array2366 : Array[String] = []; + for index2367 = 0; index2367 < (mbt_ffi_load32((iter_base) + 20)); index2367 = index2367 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2367 * 8) - let result1665 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2365 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1666.push(result1665) + array2366.push(result2365) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted1669 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2369 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1668 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2368 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result1668}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result2368}) } _ => panic() } - let lifted1671 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted2371 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result1670 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result2370 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result1670}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result2370}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result1664, allowed_suffixes : array1666, min : lifted1669, max : lifted1671}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result2364, allowed_suffixes : array2366, min : lifted2369, max : lifted2371}) } 31 => { - let array1695 : Array[@types.UnionBranch] = []; - for index1696 = 0; index1696 < (mbt_ffi_load32((iter_base) + 12)); index1696 = index1696 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1696 * 92) + let array2395 : Array[@types.UnionBranch] = []; + for index2396 = 0; index2396 < (mbt_ffi_load32((iter_base) + 12)); index2396 = index2396 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2396 * 92) - let result1672 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2372 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1681 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted2381 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result1673 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result1673) + @types.DiscriminatorRule::Prefix(result2373) } 1 => { - let result1674 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2374 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result1674) + @types.DiscriminatorRule::Suffix(result2374) } 2 => { - let result1675 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result1675) + @types.DiscriminatorRule::Contains(result2375) } 3 => { - let result1676 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result1676) + @types.DiscriminatorRule::Regex(result2376) } 4 => { - let result1677 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2377 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted1679 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted2379 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result1678 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2378 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result1678) + Option::Some(result2378) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result1677, literal : lifted1679}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result2377, literal : lifted2379}) } 5 => { - let result1680 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result1680) + @types.DiscriminatorRule::FieldAbsent(result2380) } _ => panic() } - let lifted1683 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted2383 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result1682 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result1682) + Option::Some(result2382) } _ => panic() } - let array1685 : Array[String] = []; - for index1686 = 0; index1686 < (mbt_ffi_load32((iter_base) + 52)); index1686 = index1686 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1686 * 8) + let array2385 : Array[String] = []; + for index2386 = 0; index2386 < (mbt_ffi_load32((iter_base) + 52)); index2386 = index2386 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2386 * 8) - let result1684 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1685.push(result1684) + array2385.push(result2384) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array1688 : Array[String] = []; - for index1689 = 0; index1689 < (mbt_ffi_load32((iter_base) + 60)); index1689 = index1689 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index1689 * 8) + let array2388 : Array[String] = []; + for index2389 = 0; index2389 < (mbt_ffi_load32((iter_base) + 60)); index2389 = index2389 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index2389 * 8) - let result1687 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2387 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1688.push(result1687) + array2388.push(result2387) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted1691 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted2391 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result1690 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result2390 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result1690) + Option::Some(result2390) } _ => panic() } - let lifted1694 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted2394 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted1693 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted2393 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -40569,57 +61569,57 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1692 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result2392 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result1692) + @types.Role::Other(result2392) } _ => panic() } - Option::Some(lifted1693) + Option::Some(lifted2393) } _ => panic() } - array1695.push(@types.UnionBranch::{tag : result1672, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted1681, metadata : @types.MetadataEnvelope::{doc : lifted1683, aliases : array1685, examples : array1688, deprecated : lifted1691, role : lifted1694}}) + array2395.push(@types.UnionBranch::{tag : result2372, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted2381, metadata : @types.MetadataEnvelope::{doc : lifted2383, aliases : array2385, examples : array2388, deprecated : lifted2391, role : lifted2394}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array1695}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array2395}) } 32 => { - let lifted1698 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2398 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1697 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2397 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1697) + Option::Some(result2397) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted1698}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted2398}) } 33 => { - let lifted1700 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2400 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1699 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2399 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1699) + Option::Some(result2399) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted1700}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted2400}) } 34 => { - let lifted1701 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2401 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -40628,11 +61628,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::FutureType(lifted1701) + @types.SchemaTypeBody::FutureType(lifted2401) } 35 => { - let lifted1702 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2402 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -40641,58 +61641,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaTypeBody::StreamType(lifted1702) + @types.SchemaTypeBody::StreamType(lifted2402) } _ => panic() } - let lifted1705 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted2405 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result1704 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result2404 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result1704) + Option::Some(result2404) } _ => panic() } - let array1707 : Array[String] = []; - for index1708 = 0; index1708 < (mbt_ffi_load32((iter_base) + 104)); index1708 = index1708 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index1708 * 8) + let array2407 : Array[String] = []; + for index2408 = 0; index2408 < (mbt_ffi_load32((iter_base) + 104)); index2408 = index2408 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index2408 * 8) - let result1706 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2406 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1707.push(result1706) + array2407.push(result2406) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array1710 : Array[String] = []; - for index1711 = 0; index1711 < (mbt_ffi_load32((iter_base) + 112)); index1711 = index1711 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index1711 * 8) + let array2410 : Array[String] = []; + for index2411 = 0; index2411 < (mbt_ffi_load32((iter_base) + 112)); index2411 = index2411 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index2411 * 8) - let result1709 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2409 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1710.push(result1709) + array2410.push(result2409) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted1713 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted2413 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result1712 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result2412 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result1712) + Option::Some(result2412) } _ => panic() } - let lifted1716 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted2416 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted1715 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted2415 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -40707,48 +61707,48 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result2414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result1714) + @types.Role::Other(result2414) } _ => panic() } - Option::Some(lifted1715) + Option::Some(lifted2415) } _ => panic() } - array1717.push(@types.SchemaTypeNode::{body : lifted1703, metadata : @types.MetadataEnvelope::{doc : lifted1705, aliases : array1707, examples : array1710, deprecated : lifted1713, role : lifted1716}}) + array2417.push(@types.SchemaTypeNode::{body : lifted2403, metadata : @types.MetadataEnvelope::{doc : lifted2405, aliases : array2407, examples : array2410, deprecated : lifted2413, role : lifted2416}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let array1722 : Array[@types.SchemaTypeDef] = []; - for index1723 = 0; index1723 < (mbt_ffi_load32((iter_base) + 68)); index1723 = index1723 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1723 * 24) + let array2422 : Array[@types.SchemaTypeDef] = []; + for index2423 = 0; index2423 < (mbt_ffi_load32((iter_base) + 68)); index2423 = index2423 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index2423 * 24) - let result1719 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2419 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1721 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2421 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result1720 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result1720) + Option::Some(result2420) } _ => panic() } - array1722.push(@types.SchemaTypeDef::{id : result1719, name : lifted1721, body : mbt_ffi_load32((iter_base) + 20)}) + array2422.push(@types.SchemaTypeDef::{id : result2419, name : lifted2421, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - let array1754 : Array[@types.SchemaValueNode] = []; - for index1755 = 0; index1755 < (mbt_ffi_load32((iter_base) + 80)); index1755 = index1755 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 76)) + (index1755 * 32) + let array2454 : Array[@types.SchemaValueNode] = []; + for index2455 = 0; index2455 < (mbt_ffi_load32((iter_base) + 80)); index2455 = index2455 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 76)) + (index2455 * 32) - let lifted1753 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2453 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -40799,25 +61799,25 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 12 => { - let result1724 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2424 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result1724) + @types.SchemaValueNode::StringValue(result2424) } 13 => { - let array1725 : Array[Int] = []; - for index1726 = 0; index1726 < (mbt_ffi_load32((iter_base) + 12)); index1726 = index1726 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1726 * 4) + let array2425 : Array[Int] = []; + for index2426 = 0; index2426 < (mbt_ffi_load32((iter_base) + 12)); index2426 = index2426 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2426 * 4) - array1725.push(mbt_ffi_load32((iter_base) + 0)) + array2425.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array1725) + @types.SchemaValueNode::RecordValue(array2425) } 14 => { - let lifted1727 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2427 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -40826,7 +61826,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted1727}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted2427}) } 15 => { @@ -40834,67 +61834,67 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 16 => { - let array1728 : Array[Bool] = []; - for index1729 = 0; index1729 < (mbt_ffi_load32((iter_base) + 12)); index1729 = index1729 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1729 * 1) + let array2428 : Array[Bool] = []; + for index2429 = 0; index2429 < (mbt_ffi_load32((iter_base) + 12)); index2429 = index2429 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2429 * 1) - array1728.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array2428.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array1728) + @types.SchemaValueNode::FlagsValue(array2428) } 17 => { - let array1730 : Array[Int] = []; - for index1731 = 0; index1731 < (mbt_ffi_load32((iter_base) + 12)); index1731 = index1731 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1731 * 4) + let array2430 : Array[Int] = []; + for index2431 = 0; index2431 < (mbt_ffi_load32((iter_base) + 12)); index2431 = index2431 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2431 * 4) - array1730.push(mbt_ffi_load32((iter_base) + 0)) + array2430.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array1730) + @types.SchemaValueNode::TupleValue(array2430) } 18 => { - let array1732 : Array[Int] = []; - for index1733 = 0; index1733 < (mbt_ffi_load32((iter_base) + 12)); index1733 = index1733 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1733 * 4) + let array2432 : Array[Int] = []; + for index2433 = 0; index2433 < (mbt_ffi_load32((iter_base) + 12)); index2433 = index2433 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2433 * 4) - array1732.push(mbt_ffi_load32((iter_base) + 0)) + array2432.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array1732) + @types.SchemaValueNode::ListValue(array2432) } 19 => { - let array1734 : Array[Int] = []; - for index1735 = 0; index1735 < (mbt_ffi_load32((iter_base) + 12)); index1735 = index1735 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1735 * 4) + let array2434 : Array[Int] = []; + for index2435 = 0; index2435 < (mbt_ffi_load32((iter_base) + 12)); index2435 = index2435 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2435 * 4) - array1734.push(mbt_ffi_load32((iter_base) + 0)) + array2434.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array1734) + @types.SchemaValueNode::FixedListValue(array2434) } 20 => { - let array1736 : Array[@types.MapEntry] = []; - for index1737 = 0; index1737 < (mbt_ffi_load32((iter_base) + 12)); index1737 = index1737 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1737 * 8) + let array2436 : Array[@types.MapEntry] = []; + for index2437 = 0; index2437 < (mbt_ffi_load32((iter_base) + 12)); index2437 = index2437 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2437 * 8) - array1736.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array2436.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array1736) + @types.SchemaValueNode::MapValue(array2436) } 21 => { - let lifted1738 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted2438 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -40903,14 +61903,14 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.SchemaValueNode::OptionValue(lifted1738) + @types.SchemaValueNode::OptionValue(lifted2438) } 22 => { - let lifted1741 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2441 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted1739 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2439 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -40919,11 +61919,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::OkValue(lifted1739) + @types.ResultValuePayload::OkValue(lifted2439) } 1 => { - let lifted1740 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted2440 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -40932,58 +61932,58 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @types.ResultValuePayload::ErrValue(lifted1740) + @types.ResultValuePayload::ErrValue(lifted2440) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted1741) + @types.SchemaValueNode::ResultValue(lifted2441) } 23 => { - let result1742 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2442 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1744 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2444 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1743 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2443 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1743) + Option::Some(result2443) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result1742, language : lifted1744}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result2442, language : lifted2444}) } 24 => { - let result1745 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2445 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1747 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted2447 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result1746 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2446 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result1746) + Option::Some(result2446) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result1745, mime_type : lifted1747}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result2445, mime_type : lifted2447}) } 25 => { - let result1748 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2448 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result1748) + @types.SchemaValueNode::PathValue(result2448) } 26 => { - let result1749 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2449 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result1749) + @types.SchemaValueNode::UrlValue(result2449) } 27 => { @@ -40995,21 +61995,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 29 => { - let result1750 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2450 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result1750}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result2450}) } 30 => { - let result1751 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2451 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result1751, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result2451, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result1752 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result1752}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result2452}) } 32 => { @@ -41018,47 +62018,47 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1754.push(lifted1753) + array2454.push(lifted2453) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 76)) - let result1756 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) + let result2456 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) - let array1758 : Array[String] = []; - for index1759 = 0; index1759 < (mbt_ffi_load32((iter_base) + 100)); index1759 = index1759 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index1759 * 8) + let array2458 : Array[String] = []; + for index2459 = 0; index2459 < (mbt_ffi_load32((iter_base) + 100)); index2459 = index2459 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 96)) + (index2459 * 8) - let result1757 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2457 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array1758.push(result1757) + array2458.push(result2457) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 96)) - let array1773 : Array[Array[SpanData]] = []; - for index1774 = 0; index1774 < (mbt_ffi_load32((iter_base) + 108)); index1774 = index1774 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 104)) + (index1774 * 8) + let array2473 : Array[Array[SpanData]] = []; + for index2474 = 0; index2474 < (mbt_ffi_load32((iter_base) + 108)); index2474 = index2474 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 104)) + (index2474 * 8) - let array1771 : Array[SpanData] = []; - for index1772 = 0; index1772 < (mbt_ffi_load32((iter_base) + 4)); index1772 = index1772 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index1772 * 80) + let array2471 : Array[SpanData] = []; + for index2472 = 0; index2472 < (mbt_ffi_load32((iter_base) + 4)); index2472 = index2472 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index2472 * 80) - let lifted1770 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2470 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1760 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2460 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1762 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted2462 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result1761 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2461 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result1761) + Option::Some(result2461) } _ => panic() } - let lifted1763 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted2463 : UInt64? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { @@ -41067,46 +62067,46 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - let array1767 : Array[@context.Attribute] = []; - for index1768 = 0; index1768 < (mbt_ffi_load32((iter_base) + 68)); index1768 = index1768 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1768 * 20) + let array2467 : Array[@context.Attribute] = []; + for index2468 = 0; index2468 < (mbt_ffi_load32((iter_base) + 68)); index2468 = index2468 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index2468 * 20) - let result1764 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2464 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1766 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2466 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result1765 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2465 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result1765) + @context.AttributeValue::String(result2465) } _ => panic() } - array1767.push(@context.Attribute::{key : result1764, value : lifted1766}) + array2467.push(@context.Attribute::{key : result2464, value : lifted2466}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - SpanData::LocalSpan(LocalSpanData::{span_id : result1760, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted1762, linked_context : lifted1763, attributes : array1767, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) + SpanData::LocalSpan(LocalSpanData::{span_id : result2460, start : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, parent : lifted2462, linked_context : lifted2463, attributes : array2467, inherited : (mbt_ffi_load8_u((iter_base) + 72) != 0)}) } 1 => { - let result1769 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2469 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - SpanData::ExternalSpan(ExternalSpanData::{span_id : result1769}) + SpanData::ExternalSpan(ExternalSpanData::{span_id : result2469}) } _ => panic() } - array1771.push(lifted1770) + array2471.push(lifted2470) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array1773.push(array1771) + array2473.push(array2471) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 104)) - AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result1589, method_name : result1590, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array1717, defs : array1722, root : mbt_ffi_load32((iter_base) + 72)}, value : @types.SchemaValueTree::{value_nodes : array1754, root : mbt_ffi_load32((iter_base) + 84)}}, trace_id : result1756, trace_states : array1758, invocation_context : array1773}) + AgentInvocation::AgentMethodInvocation(AgentMethodInvocationParameters::{idempotency_key : result2219, method_name : result2220, function_input : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array2417, defs : array2422, root : mbt_ffi_load32((iter_base) + 72)}, value : @types.SchemaValueTree::{value_nodes : array2454, root : mbt_ffi_load32((iter_base) + 84)}}, trace_id : result2456, trace_states : array2458, invocation_context : array2473}) } 2 => { @@ -41114,17 +62114,17 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 3 => { - let result1775 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2475 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let result1776 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2476 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result1775, mime_type : result1776}}) + AgentInvocation::LoadSnapshot(LoadSnapshotParameters::{snapshot : SnapshotData::{data : result2475, mime_type : result2476}}) } 4 => { - let result1777 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2477 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result1777}) + AgentInvocation::ProcessOplogEntries(ProcessOplogEntriesParameters::{idempotency_key : result2477}) } 5 => { @@ -41133,70 +62133,70 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - PublicOplogEntry::PendingAgentInvocation(PendingAgentInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, invocation : lifted1778}) + PublicOplogEntry::PendingAgentInvocation(PendingAgentInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, invocation : lifted2478}) } 15 => { - let lifted1781 = match (mbt_ffi_load8_u((iter_base) + 40)) { + let lifted2481 = match (mbt_ffi_load8_u((iter_base) + 40)) { 0 => { UpdateDescription::AutoUpdate } 1 => { - let result1779 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2479 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - let result1780 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result2480 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - UpdateDescription::SnapshotBased(@host.Snapshot::{payload : result1779, mime_type : result1780}) + UpdateDescription::SnapshotBased(@host.Snapshot::{payload : result2479, mime_type : result2480}) } _ => panic() } - PublicOplogEntry::PendingUpdate(PendingUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), description : lifted1781}) + PublicOplogEntry::PendingUpdate(PendingUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), description : lifted2481}) } 16 => { - let array1788 : Array[PluginInstallationDescription] = []; - for index1789 = 0; index1789 < (mbt_ffi_load32((iter_base) + 52)); index1789 = index1789 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index1789 * 48) + let array2488 : Array[PluginInstallationDescription] = []; + for index2489 = 0; index2489 < (mbt_ffi_load32((iter_base) + 52)); index2489 = index2489 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index2489 * 48) - let result1782 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result2482 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - let result1783 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result2483 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - let array1786 : Array[(String, String)] = []; - for index1787 = 0; index1787 < (mbt_ffi_load32((iter_base) + 40)); index1787 = index1787 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index1787 * 16) + let array2486 : Array[(String, String)] = []; + for index2487 = 0; index2487 < (mbt_ffi_load32((iter_base) + 40)); index2487 = index2487 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index2487 * 16) - let result1784 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2484 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result1785 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2485 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array1786.push((result1784, result1785)) + array2486.push((result2484, result2485)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - array1788.push(PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 0)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 16), plugin_name : result1782, plugin_version : result1783, parameters : array1786}) + array2488.push(PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 0)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 16), plugin_name : result2482, plugin_version : result2483, parameters : array2486}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - PublicOplogEntry::SuccessfulUpdate(SuccessfulUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), new_component_size : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64(), new_active_plugins : array1788}) + PublicOplogEntry::SuccessfulUpdate(SuccessfulUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), new_component_size : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64(), new_active_plugins : array2488}) } 17 => { - let lifted1791 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted2491 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result1790 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2490 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result1790) + Option::Some(result2490) } _ => panic() } - PublicOplogEntry::FailedUpdate(FailedUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), details : lifted1791}) + PublicOplogEntry::FailedUpdate(FailedUpdateParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, target_revision : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), details : lifted2491}) } 18 => { @@ -41208,27 +62208,27 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 20 => { - let result1792 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2492 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let result1793 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2493 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - PublicOplogEntry::CreateResource(CreateResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), name : result1792, owner : result1793}) + PublicOplogEntry::CreateResource(CreateResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), name : result2492, owner : result2493}) } 21 => { - let result1794 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2494 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let result1795 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result2495 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - PublicOplogEntry::DropResource(DropResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), name : result1794, owner : result1795}) + PublicOplogEntry::DropResource(DropResourceParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, id : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), name : result2494, owner : result2495}) } 22 => { - let result1796 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result2496 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - let result1797 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2497 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - PublicOplogEntry::Log(LogParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, level : LogLevel::from(mbt_ffi_load8_u((iter_base) + 32)), context : result1796, message : result1797}) + PublicOplogEntry::Log(LogParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, level : LogLevel::from(mbt_ffi_load8_u((iter_base) + 32)), context : result2496, message : result2497}) } 23 => { @@ -41236,43 +62236,43 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 24 => { - let result1798 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result2498 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - let result1799 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result2499 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - let array1802 : Array[(String, String)] = []; - for index1803 = 0; index1803 < (mbt_ffi_load32((iter_base) + 72)); index1803 = index1803 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index1803 * 16) + let array2502 : Array[(String, String)] = []; + for index2503 = 0; index2503 < (mbt_ffi_load32((iter_base) + 72)); index2503 = index2503 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index2503 * 16) - let result1800 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2500 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result1801 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2501 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array1802.push((result1800, result1801)) + array2502.push((result2500, result2501)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - PublicOplogEntry::ActivatePlugin(ActivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 48), plugin_name : result1798, plugin_version : result1799, parameters : array1802}}) + PublicOplogEntry::ActivatePlugin(ActivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 48), plugin_name : result2498, plugin_version : result2499, parameters : array2502}}) } 25 => { - let result1804 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result2504 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - let result1805 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result2505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - let array1808 : Array[(String, String)] = []; - for index1809 = 0; index1809 < (mbt_ffi_load32((iter_base) + 72)); index1809 = index1809 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index1809 * 16) + let array2508 : Array[(String, String)] = []; + for index2509 = 0; index2509 < (mbt_ffi_load32((iter_base) + 72)); index2509 = index2509 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index2509 * 16) - let result1806 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2506 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result1807 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2507 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array1808.push((result1806, result1807)) + array2508.push((result2506, result2507)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - PublicOplogEntry::DeactivatePlugin(DeactivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 48), plugin_name : result1804, plugin_version : result1805, parameters : array1808}}) + PublicOplogEntry::DeactivatePlugin(DeactivatePluginParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 48), plugin_name : result2504, plugin_version : result2505, parameters : array2508}}) } 26 => { @@ -41280,85 +62280,85 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 27 => { - let result1810 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2510 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - PublicOplogEntry::CancelPendingInvocation(CancelPendingInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, idempotency_key : result1810}) + PublicOplogEntry::CancelPendingInvocation(CancelPendingInvocationParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, idempotency_key : result2510}) } 28 => { - let result1811 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let lifted1813 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted2513 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result1812 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result2512 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result1812) + Option::Some(result2512) } _ => panic() } - let lifted1815 : String? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted2515 : String? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let result1814 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 56), mbt_ffi_load32((iter_base) + 60)) + let result2514 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 56), mbt_ffi_load32((iter_base) + 60)) - Option::Some(result1814) + Option::Some(result2514) } _ => panic() } - let array1819 : Array[@context.Attribute] = []; - for index1820 = 0; index1820 < (mbt_ffi_load32((iter_base) + 68)); index1820 = index1820 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index1820 * 20) + let array2519 : Array[@context.Attribute] = []; + for index2520 = 0; index2520 < (mbt_ffi_load32((iter_base) + 68)); index2520 = index2520 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 64)) + (index2520 * 20) - let result1816 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2516 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted1818 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted2518 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let result1817 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result2517 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @context.AttributeValue::String(result1817) + @context.AttributeValue::String(result2517) } _ => panic() } - array1819.push(@context.Attribute::{key : result1816, value : lifted1818}) + array2519.push(@context.Attribute::{key : result2516, value : lifted2518}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 64)) - PublicOplogEntry::StartSpan(StartSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, span_id : result1811, parent : lifted1813, linked_context_id : lifted1815, attributes : array1819}) + PublicOplogEntry::StartSpan(StartSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, span_id : result2511, parent : lifted2513, linked_context_id : lifted2515, attributes : array2519}) } 29 => { - let result1821 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2521 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - PublicOplogEntry::FinishSpan(FinishSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, span_id : result1821}) + PublicOplogEntry::FinishSpan(FinishSpanParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, span_id : result2521}) } 30 => { - let result1822 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2522 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result1823 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2523 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let lifted1825 = match (mbt_ffi_load8_u((iter_base) + 48)) { + let lifted2525 = match (mbt_ffi_load8_u((iter_base) + 48)) { 0 => { - let result1824 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result2524 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - @context.AttributeValue::String(result1824) + @context.AttributeValue::String(result2524) } _ => panic() } - PublicOplogEntry::SetSpanAttribute(SetSpanAttributeParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, span_id : result1822, key : result1823, value : lifted1825}) + PublicOplogEntry::SetSpanAttribute(SetSpanAttributeParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, span_id : result2522, key : result2523, value : lifted2525}) } 31 => { - let lifted1826 = match (mbt_ffi_load8_u((iter_base) + 32)) { + let lifted2526 = match (mbt_ffi_load8_u((iter_base) + 32)) { 0 => { @host.PersistenceLevel::PersistNothing @@ -41374,13 +62374,13 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - PublicOplogEntry::ChangePersistenceLevel(ChangePersistenceLevelParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, persistence_level : lifted1826}) + PublicOplogEntry::ChangePersistenceLevel(ChangePersistenceLevelParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, persistence_level : lifted2526}) } 32 => { - let result1827 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2527 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - PublicOplogEntry::BeginRemoteTransaction(BeginRemoteTransactionParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, transaction_id : result1827}) + PublicOplogEntry::BeginRemoteTransaction(BeginRemoteTransactionParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, transaction_id : result2527}) } 33 => { @@ -41400,53 +62400,53 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 37 => { - let result1828 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2528 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let result1829 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result2529 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - PublicOplogEntry::Snapshot(SnapshotParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, data : SnapshotData::{data : result1828, mime_type : result1829}}) + PublicOplogEntry::Snapshot(SnapshotParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, data : SnapshotData::{data : result2528, mime_type : result2529}}) } 38 => { - let result1830 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result2530 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - let result1831 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result2531 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - let array1834 : Array[(String, String)] = []; - for index1835 = 0; index1835 < (mbt_ffi_load32((iter_base) + 72)); index1835 = index1835 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index1835 * 16) + let array2534 : Array[(String, String)] = []; + for index2535 = 0; index2535 < (mbt_ffi_load32((iter_base) + 72)); index2535 = index2535 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index2535 * 16) - let result1832 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result2532 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result1833 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array1834.push((result1832, result1833)) + array2534.push((result2532, result2533)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - let result1836 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 96), mbt_ffi_load32((iter_base) + 100)) + let result2536 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 96), mbt_ffi_load32((iter_base) + 100)) - PublicOplogEntry::OplogProcessorCheckpoint(OplogProcessorCheckpointParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 48), plugin_name : result1830, plugin_version : result1831, parameters : array1834}, target_agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 88)).reinterpret_as_uint64()}}, agent_id : result1836}, confirmed_up_to : (mbt_ffi_load64((iter_base) + 104)).reinterpret_as_uint64(), sending_up_to : (mbt_ffi_load64((iter_base) + 112)).reinterpret_as_uint64(), last_batch_start : (mbt_ffi_load64((iter_base) + 120)).reinterpret_as_uint64()}) + PublicOplogEntry::OplogProcessorCheckpoint(OplogProcessorCheckpointParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, plugin : PluginInstallationDescription::{environment_plugin_grant_id : EnvironmentPluginGrantId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64()}}, plugin_priority : mbt_ffi_load32((iter_base) + 48), plugin_name : result2530, plugin_version : result2531, parameters : array2534}, target_agent_id : @types.AgentId::{component_id : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 80)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 88)).reinterpret_as_uint64()}}, agent_id : result2536}, confirmed_up_to : (mbt_ffi_load64((iter_base) + 104)).reinterpret_as_uint64(), sending_up_to : (mbt_ffi_load64((iter_base) + 112)).reinterpret_as_uint64(), last_batch_start : (mbt_ffi_load64((iter_base) + 120)).reinterpret_as_uint64()}) } 39 => { - let result1837 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2537 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let array1869 : Array[@retry.PredicateNode] = []; - for index1870 = 0; index1870 < (mbt_ffi_load32((iter_base) + 48)); index1870 = index1870 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index1870 * 32) + let array2569 : Array[@retry.PredicateNode] = []; + for index2570 = 0; index2570 < (mbt_ffi_load32((iter_base) + 48)); index2570 = index2570 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 44)) + (index2570 * 32) - let lifted1868 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2568 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1838 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2538 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1840 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2540 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1839 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2539 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1839) + @retry.PredicateValue::Text(result2539) } 1 => { @@ -41459,18 +62459,18 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result1838, value : lifted1840}) + @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result2538, value : lifted2540}) } 1 => { - let result1841 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2541 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1843 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2543 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1842 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2542 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1842) + @retry.PredicateValue::Text(result2542) } 1 => { @@ -41483,18 +62483,18 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result1841, value : lifted1843}) + @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result2541, value : lifted2543}) } 2 => { - let result1844 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2544 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1846 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2546 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1845 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2545 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1845) + @retry.PredicateValue::Text(result2545) } 1 => { @@ -41507,18 +62507,18 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result1844, value : lifted1846}) + @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result2544, value : lifted2546}) } 3 => { - let result1847 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2547 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1849 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2549 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1848 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2548 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1848) + @retry.PredicateValue::Text(result2548) } 1 => { @@ -41531,18 +62531,18 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result1847, value : lifted1849}) + @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result2547, value : lifted2549}) } 4 => { - let result1850 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2550 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1852 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2552 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1851 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2551 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1851) + @retry.PredicateValue::Text(result2551) } 1 => { @@ -41555,18 +62555,18 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result1850, value : lifted1852}) + @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result2550, value : lifted2552}) } 5 => { - let result1853 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2553 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1855 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2555 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1854 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2554 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1854) + @retry.PredicateValue::Text(result2554) } 1 => { @@ -41579,28 +62579,28 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result1853, value : lifted1855}) + @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result2553, value : lifted2555}) } 6 => { - let result1856 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateNode::PropExists(result1856) + @retry.PredicateNode::PropExists(result2556) } 7 => { - let result1857 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2557 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1860 : Array[@retry.PredicateValue] = []; - for index1861 = 0; index1861 < (mbt_ffi_load32((iter_base) + 20)); index1861 = index1861 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1861 * 16) + let array2560 : Array[@retry.PredicateValue] = []; + for index2561 = 0; index2561 < (mbt_ffi_load32((iter_base) + 20)); index2561 = index2561 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2561 * 16) - let lifted1859 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2559 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1858 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2558 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateValue::Text(result1858) + @retry.PredicateValue::Text(result2558) } 1 => { @@ -41613,35 +62613,35 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1860.push(lifted1859) + array2560.push(lifted2559) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result1857, values : array1860}) + @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result2557, values : array2560}) } 8 => { - let result1862 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1863 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2563 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result1862, pattern : result1863}) + @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result2562, pattern : result2563}) } 9 => { - let result1864 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2564 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1865 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result1864, pattern : result1865}) + @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result2564, pattern : result2565}) } 10 => { - let result1866 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2566 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1867 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2567 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result1866, pattern : result1867}) + @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result2566, pattern : result2567}) } 11 => { @@ -41666,15 +62666,15 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1869.push(lifted1868) + array2569.push(lifted2568) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 44)) - let array1905 : Array[@retry.PolicyNode] = []; - for index1906 = 0; index1906 < (mbt_ffi_load32((iter_base) + 56)); index1906 = index1906 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index1906 * 32) + let array2605 : Array[@retry.PolicyNode] = []; + for index2606 = 0; index2606 < (mbt_ffi_load32((iter_base) + 56)); index2606 = index2606 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index2606 * 32) - let lifted1904 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2604 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @retry.PolicyNode::Periodic((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) @@ -41717,21 +62717,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn } 10 => { - let array1902 : Array[@retry.PredicateNode] = []; - for index1903 = 0; index1903 < (mbt_ffi_load32((iter_base) + 12)); index1903 = index1903 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index1903 * 32) + let array2602 : Array[@retry.PredicateNode] = []; + for index2603 = 0; index2603 < (mbt_ffi_load32((iter_base) + 12)); index2603 = index2603 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index2603 * 32) - let lifted1901 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2601 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1871 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2571 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1873 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2573 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1872 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2572 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1872) + @retry.PredicateValue::Text(result2572) } 1 => { @@ -41744,18 +62744,18 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result1871, value : lifted1873}) + @retry.PredicateNode::PropEq(@retry.PropertyComparison::{property_name : result2571, value : lifted2573}) } 1 => { - let result1874 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2574 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1876 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2576 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1875 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2575 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1875) + @retry.PredicateValue::Text(result2575) } 1 => { @@ -41768,18 +62768,18 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result1874, value : lifted1876}) + @retry.PredicateNode::PropNeq(@retry.PropertyComparison::{property_name : result2574, value : lifted2576}) } 2 => { - let result1877 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2577 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1879 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2579 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1878 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2578 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1878) + @retry.PredicateValue::Text(result2578) } 1 => { @@ -41792,18 +62792,18 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result1877, value : lifted1879}) + @retry.PredicateNode::PropGt(@retry.PropertyComparison::{property_name : result2577, value : lifted2579}) } 3 => { - let result1880 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2580 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1882 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2582 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1881 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2581 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1881) + @retry.PredicateValue::Text(result2581) } 1 => { @@ -41816,18 +62816,18 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result1880, value : lifted1882}) + @retry.PredicateNode::PropGte(@retry.PropertyComparison::{property_name : result2580, value : lifted2582}) } 4 => { - let result1883 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1885 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2585 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1884 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2584 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1884) + @retry.PredicateValue::Text(result2584) } 1 => { @@ -41840,18 +62840,18 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result1883, value : lifted1885}) + @retry.PredicateNode::PropLt(@retry.PropertyComparison::{property_name : result2583, value : lifted2585}) } 5 => { - let result1886 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2586 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted1888 = match (mbt_ffi_load8_u((iter_base) + 16)) { + let lifted2588 = match (mbt_ffi_load8_u((iter_base) + 16)) { 0 => { - let result1887 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result2587 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @retry.PredicateValue::Text(result1887) + @retry.PredicateValue::Text(result2587) } 1 => { @@ -41864,28 +62864,28 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result1886, value : lifted1888}) + @retry.PredicateNode::PropLte(@retry.PropertyComparison::{property_name : result2586, value : lifted2588}) } 6 => { - let result1889 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2589 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateNode::PropExists(result1889) + @retry.PredicateNode::PropExists(result2589) } 7 => { - let result1890 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2590 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array1893 : Array[@retry.PredicateValue] = []; - for index1894 = 0; index1894 < (mbt_ffi_load32((iter_base) + 20)); index1894 = index1894 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index1894 * 16) + let array2593 : Array[@retry.PredicateValue] = []; + for index2594 = 0; index2594 < (mbt_ffi_load32((iter_base) + 20)); index2594 = index2594 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index2594 * 16) - let lifted1892 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted2592 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result1891 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2591 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @retry.PredicateValue::Text(result1891) + @retry.PredicateValue::Text(result2591) } 1 => { @@ -41898,35 +62898,35 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1893.push(lifted1892) + array2593.push(lifted2592) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result1890, values : array1893}) + @retry.PredicateNode::PropIn(@retry.PropertySetCheck::{property_name : result2590, values : array2593}) } 8 => { - let result1895 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2595 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1896 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2596 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result1895, pattern : result1896}) + @retry.PredicateNode::PropMatches(@retry.PropertyPattern::{property_name : result2595, pattern : result2596}) } 9 => { - let result1897 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2597 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1898 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2598 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result1897, pattern : result1898}) + @retry.PredicateNode::PropStartsWith(@retry.PropertyPattern::{property_name : result2597, pattern : result2598}) } 10 => { - let result1899 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result2599 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result1900 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result2600 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result1899, pattern : result1900}) + @retry.PredicateNode::PropContains(@retry.PropertyPattern::{property_name : result2599, pattern : result2600}) } 11 => { @@ -41951,11 +62951,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1902.push(lifted1901) + array2602.push(lifted2601) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @retry.PolicyNode::FilteredOn(@retry.FilteredConfig::{predicate : @retry.RetryPredicate::{nodes : array1902}, inner : mbt_ffi_load32((iter_base) + 16)}) + @retry.PolicyNode::FilteredOn(@retry.FilteredConfig::{predicate : @retry.RetryPredicate::{nodes : array2602}, inner : mbt_ffi_load32((iter_base) + 16)}) } 11 => { @@ -41972,21 +62972,21 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1905.push(lifted1904) + array2605.push(lifted2604) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 52)) - PublicOplogEntry::SetRetryPolicy(SetRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, policy : @retry.NamedRetryPolicy::{name : result1837, priority : (mbt_ffi_load32((iter_base) + 40)).reinterpret_as_uint(), predicate : @retry.RetryPredicate::{nodes : array1869}, policy : @retry.RetryPolicy::{nodes : array1905}}}) + PublicOplogEntry::SetRetryPolicy(SetRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, policy : @retry.NamedRetryPolicy::{name : result2537, priority : (mbt_ffi_load32((iter_base) + 40)).reinterpret_as_uint(), predicate : @retry.RetryPredicate::{nodes : array2569}, policy : @retry.RetryPolicy::{nodes : array2605}}}) } 40 => { - let result1907 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result2607 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - PublicOplogEntry::RemoveRetryPolicy(RemoveRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, name : result1907}) + PublicOplogEntry::RemoveRetryPolicy(RemoveRetryPolicyParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, name : result2607}) } 41 => { - let lifted1908 = match (mbt_ffi_load8_u((iter_base) + 32)) { + let lifted2608 = match (mbt_ffi_load8_u((iter_base) + 32)) { 0 => { PublicQueuedCardEvent::Install(PublicQueuedCardEventCard::{card_id : @types.CardId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 48)).reinterpret_as_uint64()}}}) @@ -41998,11 +62998,11 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - PublicOplogEntry::CardEventQueued(CardEventQueuedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, event : lifted1908}) + PublicOplogEntry::CardEventQueued(CardEventQueuedParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, event : lifted2608}) } 42 => { - let lifted1909 : UInt64? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted2609 : UInt64? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { @@ -42011,7 +63011,7 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - PublicOplogEntry::CardInstalled(CardInstalledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, queued_event_index : lifted1909, card_id : @types.CardId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 48)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()}}}) + PublicOplogEntry::CardInstalled(CardInstalledParameters::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((iter_base) + 16)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()}, queued_event_index : lifted2609, card_id : @types.CardId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 48)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()}}}) } 43 => { @@ -42024,15 +63024,15 @@ pub fn SearchOplog::get_next(self : SearchOplog) -> Array[(UInt64, PublicOplogEn _ => panic() } - array1911.push(((mbt_ffi_load64((iter_base) + 0)).reinterpret_as_uint64(), lifted1910)) + array2611.push(((mbt_ffi_load64((iter_base) + 0)).reinterpret_as_uint64(), lifted2610)) } mbt_ffi_free(mbt_ffi_load32((return_area) + 4)) - Option::Some(array1911) + Option::Some(array2611) } _ => panic() } - let ret = lifted1913 + let ret = lifted2613 mbt_ffi_free(return_area) return ret diff --git a/sdks/moonbit/golem_sdk/interface/golem/core/types/top.mbt b/sdks/moonbit/golem_sdk/interface/golem/core/types/top.mbt index 5ad9ddf030..c6cdc056c8 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/core/types/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/core/types/top.mbt @@ -113,6 +113,24 @@ pub(all) struct ResultSpec { ok : Int?; err : Int? } derive(Show, Eq) ///| +/// --- Numeric restrictions --- +/// A numeric bound usable across every numeric representation. Float bounds +/// carry canonical IEEE-754 `f64` bits (NaN/inf rejected, -0.0 normalized); +/// comparisons decode the bits to `f64` and compare numerically. +pub(all) enum NumericBound { + Signed(Int64) + Unsigned(UInt64) + FloatBits(UInt64) +} derive(Show, Eq) +///| +/// Inline numeric refinement. `none` on a numeric type means unconstrained +/// (the common case). The empty restriction set is never encoded as `some`: +/// producers normalize it to `none`, decoders normalize a decoded empty to +/// `none`. `unit` is schema/help metadata only. +pub(all) struct NumericRestrictions { + min : NumericBound?; max : NumericBound?; unit : String? +} derive(Show, Eq) +///| /// --- Text / Binary restrictions --- pub(all) struct TextRestrictions { languages : Array[String]?; min_length : UInt?; max_length : UInt?; regex : String? @@ -256,16 +274,16 @@ pub(all) struct QuotaTokenSpec { pub(all) enum SchemaTypeBody { RefType(Int) BoolType - S8Type - S16Type - S32Type - S64Type - U8Type - U16Type - U32Type - U64Type - F32Type - F64Type + S8Type(NumericRestrictions?) + S16Type(NumericRestrictions?) + S32Type(NumericRestrictions?) + S64Type(NumericRestrictions?) + U8Type(NumericRestrictions?) + U16Type(NumericRestrictions?) + U32Type(NumericRestrictions?) + U64Type(NumericRestrictions?) + F32Type(NumericRestrictions?) + F64Type(NumericRestrictions?) CharType StringType RecordType(Array[NamedFieldType]) diff --git a/sdks/moonbit/golem_sdk/interface/golem/durability/durability/top.mbt b/sdks/moonbit/golem_sdk/interface/golem/durability/durability/top.mbt index 1f572a5a4f..143709a3d4 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/durability/durability/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/durability/durability/top.mbt @@ -216,10 +216,10 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty mbt_ffi_store32((return_area) + 4, function_name.length()) mbt_ffi_store32((return_area) + 0, ptr) - let address208 = mbt_ffi_malloc((((request).graph).type_nodes).length() * 144); - for index209 = 0; index209 < (((request).graph).type_nodes).length(); index209 = index209 + 1 { - let iter_elem : @types.SchemaTypeNode = (((request).graph).type_nodes)[(index209)] - let iter_base = address208 + (index209 * 144); + let address358 = mbt_ffi_malloc((((request).graph).type_nodes).length() * 144); + for index359 = 0; index359 < (((request).graph).type_nodes).length(); index359 = index359 + 1 { + let iter_elem : @types.SchemaTypeNode = (((request).graph).type_nodes)[(index359)] + let iter_base = address358 + (index359 * 144); match (iter_elem).body { RefType(payload) => { @@ -233,443 +233,3059 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty () } - S8Type => { + S8Type(payload1) => { mbt_ffi_store8((iter_base) + 0, (2)) + match (payload1) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload3) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload3).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload5) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload5 { + Signed(payload6) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload6) + + () + } + Unsigned(payload7) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload7).reinterpret_as_int64()) + + () + } + FloatBits(payload8) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload8).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload3).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload10) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload10 { + Signed(payload11) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload11) + + () + } + Unsigned(payload12) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload12).reinterpret_as_int64()) + + () + } + FloatBits(payload13) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload13).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload3).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload15) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr16 = mbt_ffi_str2ptr(payload15) + mbt_ffi_store32((iter_base) + 72, payload15.length()) + mbt_ffi_store32((iter_base) + 68, ptr16) + cleanup_list.push(ptr16) + + () + } + } + + () + } + } + + () + } + S16Type(payload17) => { + mbt_ffi_store8((iter_base) + 0, (3)) + + match (payload17) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload19) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload19).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload21) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload21 { + Signed(payload22) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload22) + + () + } + Unsigned(payload23) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload23).reinterpret_as_int64()) + + () + } + FloatBits(payload24) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload24).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload19).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload26) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload26 { + Signed(payload27) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload27) + + () + } + Unsigned(payload28) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload28).reinterpret_as_int64()) + + () + } + FloatBits(payload29) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload29).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload19).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload31) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr32 = mbt_ffi_str2ptr(payload31) + mbt_ffi_store32((iter_base) + 72, payload31.length()) + mbt_ffi_store32((iter_base) + 68, ptr32) + cleanup_list.push(ptr32) + + () + } + } + + () + } + } + + () + } + S32Type(payload33) => { + mbt_ffi_store8((iter_base) + 0, (4)) + + match (payload33) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload35) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload35).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload37) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload37 { + Signed(payload38) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload38) + + () + } + Unsigned(payload39) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload39).reinterpret_as_int64()) + + () + } + FloatBits(payload40) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload40).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload35).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload42) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload42 { + Signed(payload43) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload43) + + () + } + Unsigned(payload44) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload44).reinterpret_as_int64()) + + () + } + FloatBits(payload45) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload45).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload35).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload47) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr48 = mbt_ffi_str2ptr(payload47) + mbt_ffi_store32((iter_base) + 72, payload47.length()) + mbt_ffi_store32((iter_base) + 68, ptr48) + cleanup_list.push(ptr48) + + () + } + } + + () + } + } + + () + } + S64Type(payload49) => { + mbt_ffi_store8((iter_base) + 0, (5)) + + match (payload49) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload51) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload51).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload53) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload53 { + Signed(payload54) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload54) + + () + } + Unsigned(payload55) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload55).reinterpret_as_int64()) + + () + } + FloatBits(payload56) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload56).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload51).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload58) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload58 { + Signed(payload59) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload59) + + () + } + Unsigned(payload60) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload60).reinterpret_as_int64()) + + () + } + FloatBits(payload61) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload61).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload51).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload63) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr64 = mbt_ffi_str2ptr(payload63) + mbt_ffi_store32((iter_base) + 72, payload63.length()) + mbt_ffi_store32((iter_base) + 68, ptr64) + cleanup_list.push(ptr64) + + () + } + } + + () + } + } + + () + } + U8Type(payload65) => { + mbt_ffi_store8((iter_base) + 0, (6)) + + match (payload65) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload67) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload67).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload69) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload69 { + Signed(payload70) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload70) + + () + } + Unsigned(payload71) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload71).reinterpret_as_int64()) + + () + } + FloatBits(payload72) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload72).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload67).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload74) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload74 { + Signed(payload75) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload75) + + () + } + Unsigned(payload76) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload76).reinterpret_as_int64()) + + () + } + FloatBits(payload77) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload77).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload67).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload79) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr80 = mbt_ffi_str2ptr(payload79) + mbt_ffi_store32((iter_base) + 72, payload79.length()) + mbt_ffi_store32((iter_base) + 68, ptr80) + cleanup_list.push(ptr80) + + () + } + } + + () + } + } + + () + } + U16Type(payload81) => { + mbt_ffi_store8((iter_base) + 0, (7)) + + match (payload81) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload83) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload83).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload85) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload85 { + Signed(payload86) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload86) + + () + } + Unsigned(payload87) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload87).reinterpret_as_int64()) + + () + } + FloatBits(payload88) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload88).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload83).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload90) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload90 { + Signed(payload91) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload91) + + () + } + Unsigned(payload92) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload92).reinterpret_as_int64()) + + () + } + FloatBits(payload93) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload93).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload83).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload95) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr96 = mbt_ffi_str2ptr(payload95) + mbt_ffi_store32((iter_base) + 72, payload95.length()) + mbt_ffi_store32((iter_base) + 68, ptr96) + cleanup_list.push(ptr96) + + () + } + } + + () + } + } + + () + } + U32Type(payload97) => { + mbt_ffi_store8((iter_base) + 0, (8)) + + match (payload97) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload99) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload99).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload101) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload101 { + Signed(payload102) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload102) + + () + } + Unsigned(payload103) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload103).reinterpret_as_int64()) + + () + } + FloatBits(payload104) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload104).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload99).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload106) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload106 { + Signed(payload107) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload107) + + () + } + Unsigned(payload108) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload108).reinterpret_as_int64()) + + () + } + FloatBits(payload109) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload109).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload99).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload111) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr112 = mbt_ffi_str2ptr(payload111) + mbt_ffi_store32((iter_base) + 72, payload111.length()) + mbt_ffi_store32((iter_base) + 68, ptr112) + cleanup_list.push(ptr112) + + () + } + } + + () + } + } + + () + } + U64Type(payload113) => { + mbt_ffi_store8((iter_base) + 0, (9)) + + match (payload113) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload115) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload115).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload117) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload117 { + Signed(payload118) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload118) + + () + } + Unsigned(payload119) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload119).reinterpret_as_int64()) + + () + } + FloatBits(payload120) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload120).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload115).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload122) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload122 { + Signed(payload123) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload123) + + () + } + Unsigned(payload124) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload124).reinterpret_as_int64()) + + () + } + FloatBits(payload125) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload125).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload115).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload127) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr128 = mbt_ffi_str2ptr(payload127) + mbt_ffi_store32((iter_base) + 72, payload127.length()) + mbt_ffi_store32((iter_base) + 68, ptr128) + cleanup_list.push(ptr128) + + () + } + } + + () + } + } + + () + } + F32Type(payload129) => { + mbt_ffi_store8((iter_base) + 0, (10)) + + match (payload129) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload131) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload131).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload133) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload133 { + Signed(payload134) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload134) + + () + } + Unsigned(payload135) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload135).reinterpret_as_int64()) + + () + } + FloatBits(payload136) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload136).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload131).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload138) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload138 { + Signed(payload139) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload139) + + () + } + Unsigned(payload140) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload140).reinterpret_as_int64()) + + () + } + FloatBits(payload141) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload141).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload131).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload143) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr144 = mbt_ffi_str2ptr(payload143) + mbt_ffi_store32((iter_base) + 72, payload143.length()) + mbt_ffi_store32((iter_base) + 68, ptr144) + cleanup_list.push(ptr144) + + () + } + } + + () + } + } + + () + } + F64Type(payload145) => { + mbt_ffi_store8((iter_base) + 0, (11)) + + match (payload145) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload147) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload147).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload149) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload149 { + Signed(payload150) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload150) + + () + } + Unsigned(payload151) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload151).reinterpret_as_int64()) + + () + } + FloatBits(payload152) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload152).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload147).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload154) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload154 { + Signed(payload155) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload155) + + () + } + Unsigned(payload156) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload156).reinterpret_as_int64()) + + () + } + FloatBits(payload157) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload157).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload147).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload159) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr160 = mbt_ffi_str2ptr(payload159) + mbt_ffi_store32((iter_base) + 72, payload159.length()) + mbt_ffi_store32((iter_base) + 68, ptr160) + cleanup_list.push(ptr160) + + () + } + } + + () + } + } + + () + } + CharType => { + mbt_ffi_store8((iter_base) + 0, (12)) + + () + } + StringType => { + mbt_ffi_store8((iter_base) + 0, (13)) + + () + } + RecordType(payload163) => { + mbt_ffi_store8((iter_base) + 0, (14)) + + let address182 = mbt_ffi_malloc((payload163).length() * 68); + for index183 = 0; index183 < (payload163).length(); index183 = index183 + 1 { + let iter_elem : @types.NamedFieldType = (payload163)[(index183)] + let iter_base = address182 + (index183 * 68); + + let ptr164 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr164) + mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload166) => { + mbt_ffi_store8((iter_base) + 12, (1)) + + let ptr167 = mbt_ffi_str2ptr(payload166) + mbt_ffi_store32((iter_base) + 20, payload166.length()) + mbt_ffi_store32((iter_base) + 16, ptr167) + cleanup_list.push(ptr167) + + () + } + } + + let address = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index = 0; index < (((iter_elem).metadata).aliases).length(); index = index + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index)] + let iter_base = address + (index * 8); + + let ptr168 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr168) + cleanup_list.push(ptr168) + + } + mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 24, address) + + let address170 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index171 = 0; index171 < (((iter_elem).metadata).examples).length(); index171 = index171 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index171)] + let iter_base = address170 + (index171 * 8); + + let ptr169 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr169) + cleanup_list.push(ptr169) + + } + mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 32, address170) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload173) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + let ptr174 = mbt_ffi_str2ptr(payload173) + mbt_ffi_store32((iter_base) + 48, payload173.length()) + mbt_ffi_store32((iter_base) + 44, ptr174) + cleanup_list.push(ptr174) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 52, (0)) + + () + } + Some(payload176) => { + mbt_ffi_store8((iter_base) + 52, (1)) + + match payload176 { + Multimodal => { + mbt_ffi_store8((iter_base) + 56, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 56, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 56, (2)) + + () + } + Other(payload180) => { + mbt_ffi_store8((iter_base) + 56, (3)) + + let ptr181 = mbt_ffi_str2ptr(payload180) + mbt_ffi_store32((iter_base) + 64, payload180.length()) + mbt_ffi_store32((iter_base) + 60, ptr181) + cleanup_list.push(ptr181) + + () + } + } + + () + } + } + cleanup_list.push(ptr164) + cleanup_list.push(address) + cleanup_list.push(address170) + + } + mbt_ffi_store32((iter_base) + 12, (payload163).length()) + mbt_ffi_store32((iter_base) + 8, address182) + cleanup_list.push(address182) + + () + } + VariantType(payload184) => { + mbt_ffi_store8((iter_base) + 0, (15)) + + let address207 = mbt_ffi_malloc((payload184).length() * 72); + for index208 = 0; index208 < (payload184).length(); index208 = index208 + 1 { + let iter_elem : @types.VariantCaseType = (payload184)[(index208)] + let iter_base = address207 + (index208 * 72); + + let ptr185 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr185) + + match ((iter_elem).payload) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload187) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload187) + + () + } + } + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload189) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr190 = mbt_ffi_str2ptr(payload189) + mbt_ffi_store32((iter_base) + 24, payload189.length()) + mbt_ffi_store32((iter_base) + 20, ptr190) + cleanup_list.push(ptr190) + + () + } + } + + let address192 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index193 = 0; index193 < (((iter_elem).metadata).aliases).length(); index193 = index193 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index193)] + let iter_base = address192 + (index193 * 8); + + let ptr191 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr191) + cleanup_list.push(ptr191) + + } + mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 28, address192) + + let address195 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index196 = 0; index196 < (((iter_elem).metadata).examples).length(); index196 = index196 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index196)] + let iter_base = address195 + (index196 * 8); + + let ptr194 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr194) + cleanup_list.push(ptr194) + + } + mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 36, address195) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 44, (0)) + + () + } + Some(payload198) => { + mbt_ffi_store8((iter_base) + 44, (1)) + + let ptr199 = mbt_ffi_str2ptr(payload198) + mbt_ffi_store32((iter_base) + 52, payload198.length()) + mbt_ffi_store32((iter_base) + 48, ptr199) + cleanup_list.push(ptr199) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 56, (0)) + + () + } + Some(payload201) => { + mbt_ffi_store8((iter_base) + 56, (1)) + + match payload201 { + Multimodal => { + mbt_ffi_store8((iter_base) + 60, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 60, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 60, (2)) + + () + } + Other(payload205) => { + mbt_ffi_store8((iter_base) + 60, (3)) + + let ptr206 = mbt_ffi_str2ptr(payload205) + mbt_ffi_store32((iter_base) + 68, payload205.length()) + mbt_ffi_store32((iter_base) + 64, ptr206) + cleanup_list.push(ptr206) + + () + } + } + + () + } + } + cleanup_list.push(ptr185) + cleanup_list.push(address192) + cleanup_list.push(address195) + + } + mbt_ffi_store32((iter_base) + 12, (payload184).length()) + mbt_ffi_store32((iter_base) + 8, address207) + cleanup_list.push(address207) + + () + } + EnumType(payload209) => { + mbt_ffi_store8((iter_base) + 0, (16)) + + let address211 = mbt_ffi_malloc((payload209).length() * 8); + for index212 = 0; index212 < (payload209).length(); index212 = index212 + 1 { + let iter_elem : String = (payload209)[(index212)] + let iter_base = address211 + (index212 * 8); + + let ptr210 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr210) + cleanup_list.push(ptr210) + + } + mbt_ffi_store32((iter_base) + 12, (payload209).length()) + mbt_ffi_store32((iter_base) + 8, address211) + cleanup_list.push(address211) + + () + } + FlagsType(payload213) => { + mbt_ffi_store8((iter_base) + 0, (17)) + + let address215 = mbt_ffi_malloc((payload213).length() * 8); + for index216 = 0; index216 < (payload213).length(); index216 = index216 + 1 { + let iter_elem : String = (payload213)[(index216)] + let iter_base = address215 + (index216 * 8); + + let ptr214 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr214) + cleanup_list.push(ptr214) + + } + mbt_ffi_store32((iter_base) + 12, (payload213).length()) + mbt_ffi_store32((iter_base) + 8, address215) + cleanup_list.push(address215) + + () + } + TupleType(payload217) => { + mbt_ffi_store8((iter_base) + 0, (18)) + + let address218 = mbt_ffi_malloc((payload217).length() * 4); + for index219 = 0; index219 < (payload217).length(); index219 = index219 + 1 { + let iter_elem : Int = (payload217)[(index219)] + let iter_base = address218 + (index219 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload217).length()) + mbt_ffi_store32((iter_base) + 8, address218) + cleanup_list.push(address218) + + () + } + ListType(payload220) => { + mbt_ffi_store8((iter_base) + 0, (19)) + mbt_ffi_store32((iter_base) + 8, payload220) + + () + } + FixedListType(payload221) => { + mbt_ffi_store8((iter_base) + 0, (20)) + mbt_ffi_store32((iter_base) + 8, (payload221).element) + mbt_ffi_store32((iter_base) + 12, ((payload221).length).reinterpret_as_int()) + + () + } + MapType(payload222) => { + mbt_ffi_store8((iter_base) + 0, (21)) + mbt_ffi_store32((iter_base) + 8, (payload222).key) + mbt_ffi_store32((iter_base) + 12, (payload222).value) + + () + } + OptionType(payload223) => { + mbt_ffi_store8((iter_base) + 0, (22)) + mbt_ffi_store32((iter_base) + 8, payload223) + + () + } + ResultType(payload224) => { + mbt_ffi_store8((iter_base) + 0, (23)) + + match ((payload224).ok) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload226) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload226) + + () + } + } + + match ((payload224).err) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload228) => { + mbt_ffi_store8((iter_base) + 16, (1)) + mbt_ffi_store32((iter_base) + 20, payload228) + + () + } + } + + () + } + TextType(payload229) => { + mbt_ffi_store8((iter_base) + 0, (24)) + + match ((payload229).languages) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload231) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address233 = mbt_ffi_malloc((payload231).length() * 8); + for index234 = 0; index234 < (payload231).length(); index234 = index234 + 1 { + let iter_elem : String = (payload231)[(index234)] + let iter_base = address233 + (index234 * 8); + + let ptr232 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr232) + cleanup_list.push(ptr232) + + } + mbt_ffi_store32((iter_base) + 16, (payload231).length()) + mbt_ffi_store32((iter_base) + 12, address233) + cleanup_list.push(address233) + + () + } + } + + match ((payload229).min_length) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload236) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload236).reinterpret_as_int()) + + () + } + } + + match ((payload229).max_length) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) + + () + } + Some(payload238) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload238).reinterpret_as_int()) + + () + } + } + + match ((payload229).regex) { + None => { + mbt_ffi_store8((iter_base) + 36, (0)) + + () + } + Some(payload240) => { + mbt_ffi_store8((iter_base) + 36, (1)) + + let ptr241 = mbt_ffi_str2ptr(payload240) + mbt_ffi_store32((iter_base) + 44, payload240.length()) + mbt_ffi_store32((iter_base) + 40, ptr241) + cleanup_list.push(ptr241) + + () + } + } + + () + } + BinaryType(payload242) => { + mbt_ffi_store8((iter_base) + 0, (25)) + + match ((payload242).mime_types) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload244) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address246 = mbt_ffi_malloc((payload244).length() * 8); + for index247 = 0; index247 < (payload244).length(); index247 = index247 + 1 { + let iter_elem : String = (payload244)[(index247)] + let iter_base = address246 + (index247 * 8); + + let ptr245 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr245) + cleanup_list.push(ptr245) + + } + mbt_ffi_store32((iter_base) + 16, (payload244).length()) + mbt_ffi_store32((iter_base) + 12, address246) + cleanup_list.push(address246) + + () + } + } + + match ((payload242).min_bytes) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload249) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload249).reinterpret_as_int()) + + () + } + } + + match ((payload242).max_bytes) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) + + () + } + Some(payload251) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload251).reinterpret_as_int()) + + () + } + } + + () + } + PathType(payload252) => { + mbt_ffi_store8((iter_base) + 0, (26)) + mbt_ffi_store8((iter_base) + 8, (payload252).direction.ordinal()) + mbt_ffi_store8((iter_base) + 9, (payload252).kind.ordinal()) + + match ((payload252).allowed_mime_types) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload254) => { + mbt_ffi_store8((iter_base) + 12, (1)) + + let address256 = mbt_ffi_malloc((payload254).length() * 8); + for index257 = 0; index257 < (payload254).length(); index257 = index257 + 1 { + let iter_elem : String = (payload254)[(index257)] + let iter_base = address256 + (index257 * 8); + + let ptr255 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr255) + cleanup_list.push(ptr255) + + } + mbt_ffi_store32((iter_base) + 20, (payload254).length()) + mbt_ffi_store32((iter_base) + 16, address256) + cleanup_list.push(address256) + + () + } + } + + match ((payload252).allowed_extensions) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload259) => { + mbt_ffi_store8((iter_base) + 24, (1)) + + let address261 = mbt_ffi_malloc((payload259).length() * 8); + for index262 = 0; index262 < (payload259).length(); index262 = index262 + 1 { + let iter_elem : String = (payload259)[(index262)] + let iter_base = address261 + (index262 * 8); + + let ptr260 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr260) + cleanup_list.push(ptr260) + + } + mbt_ffi_store32((iter_base) + 32, (payload259).length()) + mbt_ffi_store32((iter_base) + 28, address261) + cleanup_list.push(address261) + + () + } + } + + () + } + UrlType(payload263) => { + mbt_ffi_store8((iter_base) + 0, (27)) + + match ((payload263).allowed_schemes) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload265) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address267 = mbt_ffi_malloc((payload265).length() * 8); + for index268 = 0; index268 < (payload265).length(); index268 = index268 + 1 { + let iter_elem : String = (payload265)[(index268)] + let iter_base = address267 + (index268 * 8); + + let ptr266 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr266) + cleanup_list.push(ptr266) + + } + mbt_ffi_store32((iter_base) + 16, (payload265).length()) + mbt_ffi_store32((iter_base) + 12, address267) + cleanup_list.push(address267) + + () + } + } + + match ((payload263).allowed_hosts) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload270) => { + mbt_ffi_store8((iter_base) + 20, (1)) + + let address272 = mbt_ffi_malloc((payload270).length() * 8); + for index273 = 0; index273 < (payload270).length(); index273 = index273 + 1 { + let iter_elem : String = (payload270)[(index273)] + let iter_base = address272 + (index273 * 8); + + let ptr271 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr271) + cleanup_list.push(ptr271) + + } + mbt_ffi_store32((iter_base) + 28, (payload270).length()) + mbt_ffi_store32((iter_base) + 24, address272) + cleanup_list.push(address272) + + () + } + } + + () + } + DatetimeType => { + mbt_ffi_store8((iter_base) + 0, (28)) + + () + } + DurationType => { + mbt_ffi_store8((iter_base) + 0, (29)) + + () + } + QuantityType(payload276) => { + mbt_ffi_store8((iter_base) + 0, (30)) + + let ptr277 = mbt_ffi_str2ptr((payload276).base_unit) + mbt_ffi_store32((iter_base) + 12, (payload276).base_unit.length()) + mbt_ffi_store32((iter_base) + 8, ptr277) + + let address279 = mbt_ffi_malloc(((payload276).allowed_suffixes).length() * 8); + for index280 = 0; index280 < ((payload276).allowed_suffixes).length(); index280 = index280 + 1 { + let iter_elem : String = ((payload276).allowed_suffixes)[(index280)] + let iter_base = address279 + (index280 * 8); + + let ptr278 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr278) + cleanup_list.push(ptr278) + + } + mbt_ffi_store32((iter_base) + 20, ((payload276).allowed_suffixes).length()) + mbt_ffi_store32((iter_base) + 16, address279) + + match ((payload276).min) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload282) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload282).mantissa) + mbt_ffi_store32((iter_base) + 40, (payload282).scale) + + let ptr283 = mbt_ffi_str2ptr((payload282).unit) + mbt_ffi_store32((iter_base) + 48, (payload282).unit.length()) + mbt_ffi_store32((iter_base) + 44, ptr283) + cleanup_list.push(ptr283) + + () + } + } + + match ((payload276).max) { + None => { + mbt_ffi_store8((iter_base) + 56, (0)) + + () + } + Some(payload285) => { + mbt_ffi_store8((iter_base) + 56, (1)) + mbt_ffi_store64((iter_base) + 64, (payload285).mantissa) + mbt_ffi_store32((iter_base) + 72, (payload285).scale) + + let ptr286 = mbt_ffi_str2ptr((payload285).unit) + mbt_ffi_store32((iter_base) + 80, (payload285).unit.length()) + mbt_ffi_store32((iter_base) + 76, ptr286) + cleanup_list.push(ptr286) + + () + } + } + cleanup_list.push(ptr277) + cleanup_list.push(address279) + + () + } + UnionType(payload287) => { + mbt_ffi_store8((iter_base) + 0, (31)) + + let address323 = mbt_ffi_malloc(((payload287).branches).length() * 92); + for index324 = 0; index324 < ((payload287).branches).length(); index324 = index324 + 1 { + let iter_elem : @types.UnionBranch = ((payload287).branches)[(index324)] + let iter_base = address323 + (index324 * 92); + + let ptr288 = mbt_ffi_str2ptr((iter_elem).tag) + mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) + mbt_ffi_store32((iter_base) + 0, ptr288) + mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + + match (iter_elem).discriminator { + Prefix(payload289) => { + mbt_ffi_store8((iter_base) + 12, (0)) + + let ptr290 = mbt_ffi_str2ptr(payload289) + mbt_ffi_store32((iter_base) + 20, payload289.length()) + mbt_ffi_store32((iter_base) + 16, ptr290) + cleanup_list.push(ptr290) + + () + } + Suffix(payload291) => { + mbt_ffi_store8((iter_base) + 12, (1)) + + let ptr292 = mbt_ffi_str2ptr(payload291) + mbt_ffi_store32((iter_base) + 20, payload291.length()) + mbt_ffi_store32((iter_base) + 16, ptr292) + cleanup_list.push(ptr292) + + () + } + Contains(payload293) => { + mbt_ffi_store8((iter_base) + 12, (2)) + + let ptr294 = mbt_ffi_str2ptr(payload293) + mbt_ffi_store32((iter_base) + 20, payload293.length()) + mbt_ffi_store32((iter_base) + 16, ptr294) + cleanup_list.push(ptr294) + + () + } + Regex(payload295) => { + mbt_ffi_store8((iter_base) + 12, (3)) + + let ptr296 = mbt_ffi_str2ptr(payload295) + mbt_ffi_store32((iter_base) + 20, payload295.length()) + mbt_ffi_store32((iter_base) + 16, ptr296) + cleanup_list.push(ptr296) + + () + } + FieldEquals(payload297) => { + mbt_ffi_store8((iter_base) + 12, (4)) + + let ptr298 = mbt_ffi_str2ptr((payload297).field_name) + mbt_ffi_store32((iter_base) + 20, (payload297).field_name.length()) + mbt_ffi_store32((iter_base) + 16, ptr298) + + match ((payload297).literal) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload300) => { + mbt_ffi_store8((iter_base) + 24, (1)) + + let ptr301 = mbt_ffi_str2ptr(payload300) + mbt_ffi_store32((iter_base) + 32, payload300.length()) + mbt_ffi_store32((iter_base) + 28, ptr301) + cleanup_list.push(ptr301) + + () + } + } + cleanup_list.push(ptr298) + + () + } + FieldAbsent(payload302) => { + mbt_ffi_store8((iter_base) + 12, (5)) + + let ptr303 = mbt_ffi_str2ptr(payload302) + mbt_ffi_store32((iter_base) + 20, payload302.length()) + mbt_ffi_store32((iter_base) + 16, ptr303) + cleanup_list.push(ptr303) + + () + } + } + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 36, (0)) + + () + } + Some(payload305) => { + mbt_ffi_store8((iter_base) + 36, (1)) + + let ptr306 = mbt_ffi_str2ptr(payload305) + mbt_ffi_store32((iter_base) + 44, payload305.length()) + mbt_ffi_store32((iter_base) + 40, ptr306) + cleanup_list.push(ptr306) + + () + } + } + + let address308 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index309 = 0; index309 < (((iter_elem).metadata).aliases).length(); index309 = index309 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index309)] + let iter_base = address308 + (index309 * 8); + + let ptr307 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr307) + cleanup_list.push(ptr307) + + } + mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 48, address308) + + let address311 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index312 = 0; index312 < (((iter_elem).metadata).examples).length(); index312 = index312 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index312)] + let iter_base = address311 + (index312 * 8); + + let ptr310 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr310) + cleanup_list.push(ptr310) + + } + mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 56, address311) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload314) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr315 = mbt_ffi_str2ptr(payload314) + mbt_ffi_store32((iter_base) + 72, payload314.length()) + mbt_ffi_store32((iter_base) + 68, ptr315) + cleanup_list.push(ptr315) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 76, (0)) + + () + } + Some(payload317) => { + mbt_ffi_store8((iter_base) + 76, (1)) + + match payload317 { + Multimodal => { + mbt_ffi_store8((iter_base) + 80, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 80, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 80, (2)) + + () + } + Other(payload321) => { + mbt_ffi_store8((iter_base) + 80, (3)) + + let ptr322 = mbt_ffi_str2ptr(payload321) + mbt_ffi_store32((iter_base) + 88, payload321.length()) + mbt_ffi_store32((iter_base) + 84, ptr322) + cleanup_list.push(ptr322) + + () + } + } + + () + } + } + cleanup_list.push(ptr288) + cleanup_list.push(address308) + cleanup_list.push(address311) + + } + mbt_ffi_store32((iter_base) + 12, ((payload287).branches).length()) + mbt_ffi_store32((iter_base) + 8, address323) + cleanup_list.push(address323) + + () + } + SecretType(payload325) => { + mbt_ffi_store8((iter_base) + 0, (32)) + + match ((payload325).category) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload327) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr328 = mbt_ffi_str2ptr(payload327) + mbt_ffi_store32((iter_base) + 16, payload327.length()) + mbt_ffi_store32((iter_base) + 12, ptr328) + cleanup_list.push(ptr328) + + () + } + } + + () + } + QuotaTokenType(payload329) => { + mbt_ffi_store8((iter_base) + 0, (33)) + + match ((payload329).resource_name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload331) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr332 = mbt_ffi_str2ptr(payload331) + mbt_ffi_store32((iter_base) + 16, payload331.length()) + mbt_ffi_store32((iter_base) + 12, ptr332) + cleanup_list.push(ptr332) + + () + } + } + + () + } + FutureType(payload333) => { + mbt_ffi_store8((iter_base) + 0, (34)) + + match (payload333) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload335) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload335) + + () + } + } + + () + } + StreamType(payload336) => { + mbt_ffi_store8((iter_base) + 0, (35)) + + match (payload336) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload338) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload338) + + () + } + } + + () + } + } + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 88, (0)) + + () + } + Some(payload340) => { + mbt_ffi_store8((iter_base) + 88, (1)) + + let ptr341 = mbt_ffi_str2ptr(payload340) + mbt_ffi_store32((iter_base) + 96, payload340.length()) + mbt_ffi_store32((iter_base) + 92, ptr341) + cleanup_list.push(ptr341) + + () + } + } + + let address343 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index344 = 0; index344 < (((iter_elem).metadata).aliases).length(); index344 = index344 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index344)] + let iter_base = address343 + (index344 * 8); + + let ptr342 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr342) + cleanup_list.push(ptr342) + + } + mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 100, address343) + + let address346 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index347 = 0; index347 < (((iter_elem).metadata).examples).length(); index347 = index347 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index347)] + let iter_base = address346 + (index347 * 8); + + let ptr345 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr345) + cleanup_list.push(ptr345) + + } + mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 108, address346) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 116, (0)) + + () + } + Some(payload349) => { + mbt_ffi_store8((iter_base) + 116, (1)) + + let ptr350 = mbt_ffi_str2ptr(payload349) + mbt_ffi_store32((iter_base) + 124, payload349.length()) + mbt_ffi_store32((iter_base) + 120, ptr350) + cleanup_list.push(ptr350) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 128, (0)) + + () + } + Some(payload352) => { + mbt_ffi_store8((iter_base) + 128, (1)) + + match payload352 { + Multimodal => { + mbt_ffi_store8((iter_base) + 132, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 132, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 132, (2)) + + () + } + Other(payload356) => { + mbt_ffi_store8((iter_base) + 132, (3)) + + let ptr357 = mbt_ffi_str2ptr(payload356) + mbt_ffi_store32((iter_base) + 140, payload356.length()) + mbt_ffi_store32((iter_base) + 136, ptr357) + cleanup_list.push(ptr357) + + () + } + } + + () + } + } + cleanup_list.push(address343) + cleanup_list.push(address346) + + } + mbt_ffi_store32((return_area) + 12, (((request).graph).type_nodes).length()) + mbt_ffi_store32((return_area) + 8, address358) + + let address364 = mbt_ffi_malloc((((request).graph).defs).length() * 24); + for index365 = 0; index365 < (((request).graph).defs).length(); index365 = index365 + 1 { + let iter_elem : @types.SchemaTypeDef = (((request).graph).defs)[(index365)] + let iter_base = address364 + (index365 * 24); + + let ptr360 = mbt_ffi_str2ptr((iter_elem).id) + mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) + mbt_ffi_store32((iter_base) + 0, ptr360) + + match ((iter_elem).name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload362) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr363 = mbt_ffi_str2ptr(payload362) + mbt_ffi_store32((iter_base) + 16, payload362.length()) + mbt_ffi_store32((iter_base) + 12, ptr363) + cleanup_list.push(ptr363) + + () + } + } + mbt_ffi_store32((iter_base) + 20, (iter_elem).body) + cleanup_list.push(ptr360) + + } + mbt_ffi_store32((return_area) + 20, (((request).graph).defs).length()) + mbt_ffi_store32((return_area) + 16, address364) + mbt_ffi_store32((return_area) + 24, ((request).graph).root) + + let address435 = mbt_ffi_malloc((((request).value).value_nodes).length() * 32); + for index436 = 0; index436 < (((request).value).value_nodes).length(); index436 = index436 + 1 { + let iter_elem : @types.SchemaValueNode = (((request).value).value_nodes)[(index436)] + let iter_base = address435 + (index436 * 32); + + match iter_elem { + BoolValue(payload366) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload366 { 1 } else { 0 })) + + () + } + S8Value(payload367) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload367)) + + () + } + S16Value(payload368) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload368)) + () } - S16Type => { + S32Value(payload369) => { mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload369) + + () + } + S64Value(payload370) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload370) + + () + } + U8Value(payload371) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload371).to_int()) + + () + } + U16Value(payload372) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload372).reinterpret_as_int()) + + () + } + U32Value(payload373) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload373).reinterpret_as_int()) + + () + } + U64Value(payload374) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload374).reinterpret_as_int64()) + + () + } + F32Value(payload375) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload375) + + () + } + F64Value(payload376) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload376) + + () + } + CharValue(payload377) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload377).to_int()) + + () + } + StringValue(payload378) => { + mbt_ffi_store8((iter_base) + 0, (12)) + + let ptr379 = mbt_ffi_str2ptr(payload378) + mbt_ffi_store32((iter_base) + 12, payload378.length()) + mbt_ffi_store32((iter_base) + 8, ptr379) + cleanup_list.push(ptr379) + + () + } + RecordValue(payload380) => { + mbt_ffi_store8((iter_base) + 0, (13)) + + let address381 = mbt_ffi_malloc((payload380).length() * 4); + for index382 = 0; index382 < (payload380).length(); index382 = index382 + 1 { + let iter_elem : Int = (payload380)[(index382)] + let iter_base = address381 + (index382 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload380).length()) + mbt_ffi_store32((iter_base) + 8, address381) + cleanup_list.push(address381) + + () + } + VariantValue(payload383) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload383).case).reinterpret_as_int()) + + match ((payload383).payload) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload385) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload385) + + () + } + } + + () + } + EnumValue(payload386) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload386).reinterpret_as_int()) + + () + } + FlagsValue(payload387) => { + mbt_ffi_store8((iter_base) + 0, (16)) + + let address388 = mbt_ffi_malloc((payload387).length() * 1); + for index389 = 0; index389 < (payload387).length(); index389 = index389 + 1 { + let iter_elem : Bool = (payload387)[(index389)] + let iter_base = address388 + (index389 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + + } + mbt_ffi_store32((iter_base) + 12, (payload387).length()) + mbt_ffi_store32((iter_base) + 8, address388) + cleanup_list.push(address388) + + () + } + TupleValue(payload390) => { + mbt_ffi_store8((iter_base) + 0, (17)) + + let address391 = mbt_ffi_malloc((payload390).length() * 4); + for index392 = 0; index392 < (payload390).length(); index392 = index392 + 1 { + let iter_elem : Int = (payload390)[(index392)] + let iter_base = address391 + (index392 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload390).length()) + mbt_ffi_store32((iter_base) + 8, address391) + cleanup_list.push(address391) + + () + } + ListValue(payload393) => { + mbt_ffi_store8((iter_base) + 0, (18)) + + let address394 = mbt_ffi_malloc((payload393).length() * 4); + for index395 = 0; index395 < (payload393).length(); index395 = index395 + 1 { + let iter_elem : Int = (payload393)[(index395)] + let iter_base = address394 + (index395 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload393).length()) + mbt_ffi_store32((iter_base) + 8, address394) + cleanup_list.push(address394) + + () + } + FixedListValue(payload396) => { + mbt_ffi_store8((iter_base) + 0, (19)) + + let address397 = mbt_ffi_malloc((payload396).length() * 4); + for index398 = 0; index398 < (payload396).length(); index398 = index398 + 1 { + let iter_elem : Int = (payload396)[(index398)] + let iter_base = address397 + (index398 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload396).length()) + mbt_ffi_store32((iter_base) + 8, address397) + cleanup_list.push(address397) + + () + } + MapValue(payload399) => { + mbt_ffi_store8((iter_base) + 0, (20)) + + let address400 = mbt_ffi_malloc((payload399).length() * 8); + for index401 = 0; index401 < (payload399).length(); index401 = index401 + 1 { + let iter_elem : @types.MapEntry = (payload399)[(index401)] + let iter_base = address400 + (index401 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + + } + mbt_ffi_store32((iter_base) + 12, (payload399).length()) + mbt_ffi_store32((iter_base) + 8, address400) + cleanup_list.push(address400) + + () + } + OptionValue(payload402) => { + mbt_ffi_store8((iter_base) + 0, (21)) + + match (payload402) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload404) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload404) + + () + } + } + + () + } + ResultValue(payload405) => { + mbt_ffi_store8((iter_base) + 0, (22)) + + match payload405 { + OkValue(payload406) => { + mbt_ffi_store8((iter_base) + 8, (0)) + + match (payload406) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload408) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload408) + + () + } + } + + () + } + ErrValue(payload409) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match (payload409) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload411) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload411) + + () + } + } + + () + } + } + + () + } + TextValue(payload412) => { + mbt_ffi_store8((iter_base) + 0, (23)) + + let ptr413 = mbt_ffi_str2ptr((payload412).text) + mbt_ffi_store32((iter_base) + 12, (payload412).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr413) + + match ((payload412).language) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload415) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr416 = mbt_ffi_str2ptr(payload415) + mbt_ffi_store32((iter_base) + 24, payload415.length()) + mbt_ffi_store32((iter_base) + 20, ptr416) + cleanup_list.push(ptr416) + + () + } + } + cleanup_list.push(ptr413) + + () + } + BinaryValue(payload417) => { + mbt_ffi_store8((iter_base) + 0, (24)) + + let ptr418 = mbt_ffi_bytes2ptr((payload417).bytes) + + mbt_ffi_store32((iter_base) + 12, (payload417).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr418) + + match ((payload417).mime_type) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload420) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr421 = mbt_ffi_str2ptr(payload420) + mbt_ffi_store32((iter_base) + 24, payload420.length()) + mbt_ffi_store32((iter_base) + 20, ptr421) + cleanup_list.push(ptr421) + + () + } + } + cleanup_list.push(ptr418) () } - S32Type => { - mbt_ffi_store8((iter_base) + 0, (4)) + PathValue(payload422) => { + mbt_ffi_store8((iter_base) + 0, (25)) - () - } - S64Type => { - mbt_ffi_store8((iter_base) + 0, (5)) + let ptr423 = mbt_ffi_str2ptr(payload422) + mbt_ffi_store32((iter_base) + 12, payload422.length()) + mbt_ffi_store32((iter_base) + 8, ptr423) + cleanup_list.push(ptr423) () } - U8Type => { - mbt_ffi_store8((iter_base) + 0, (6)) + UrlValue(payload424) => { + mbt_ffi_store8((iter_base) + 0, (26)) - () - } - U16Type => { - mbt_ffi_store8((iter_base) + 0, (7)) + let ptr425 = mbt_ffi_str2ptr(payload424) + mbt_ffi_store32((iter_base) + 12, payload424.length()) + mbt_ffi_store32((iter_base) + 8, ptr425) + cleanup_list.push(ptr425) () } - U32Type => { - mbt_ffi_store8((iter_base) + 0, (8)) + DatetimeValue(payload426) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload426).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload426).nanoseconds).reinterpret_as_int()) () } - U64Type => { - mbt_ffi_store8((iter_base) + 0, (9)) + DurationValue(payload427) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload427).nanoseconds) () } - F32Type => { - mbt_ffi_store8((iter_base) + 0, (10)) + QuantityValueNode(payload428) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload428).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload428).scale) - () - } - F64Type => { - mbt_ffi_store8((iter_base) + 0, (11)) + let ptr429 = mbt_ffi_str2ptr((payload428).unit) + mbt_ffi_store32((iter_base) + 24, (payload428).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr429) + cleanup_list.push(ptr429) () } - CharType => { - mbt_ffi_store8((iter_base) + 0, (12)) + UnionValue(payload430) => { + mbt_ffi_store8((iter_base) + 0, (30)) + + let ptr431 = mbt_ffi_str2ptr((payload430).tag) + mbt_ffi_store32((iter_base) + 12, (payload430).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr431) + mbt_ffi_store32((iter_base) + 16, (payload430).body) + cleanup_list.push(ptr431) () } - StringType => { - mbt_ffi_store8((iter_base) + 0, (13)) + SecretValue(payload432) => { + mbt_ffi_store8((iter_base) + 0, (31)) + + let ptr433 = mbt_ffi_str2ptr((payload432).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload432).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr433) + cleanup_list.push(ptr433) () } - RecordType(payload13) => { - mbt_ffi_store8((iter_base) + 0, (14)) + QuotaTokenHandle(payload434) => { + mbt_ffi_store8((iter_base) + 0, (32)) - let address32 = mbt_ffi_malloc((payload13).length() * 68); - for index33 = 0; index33 < (payload13).length(); index33 = index33 + 1 { - let iter_elem : @types.NamedFieldType = (payload13)[(index33)] - let iter_base = address32 + (index33 * 68); + let @types.QuotaToken(handle) = payload434 + mbt_ffi_store32((iter_base) + 8, handle) - let ptr14 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr14) - mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + () + } + } - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + } + mbt_ffi_store32((return_area) + 32, (((request).value).value_nodes).length()) + mbt_ffi_store32((return_area) + 28, address435) + mbt_ffi_store32((return_area) + 36, ((request).value).root) - () - } - Some(payload16) => { - mbt_ffi_store8((iter_base) + 12, (1)) + let address798 = mbt_ffi_malloc((((response).graph).type_nodes).length() * 144); + for index799 = 0; index799 < (((response).graph).type_nodes).length(); index799 = index799 + 1 { + let iter_elem : @types.SchemaTypeNode = (((response).graph).type_nodes)[(index799)] + let iter_base = address798 + (index799 * 144); - let ptr17 = mbt_ffi_str2ptr(payload16) - mbt_ffi_store32((iter_base) + 20, payload16.length()) - mbt_ffi_store32((iter_base) + 16, ptr17) - cleanup_list.push(ptr17) + match (iter_elem).body { + RefType(payload437) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store32((iter_base) + 8, payload437) - () - } - } + () + } + BoolType => { + mbt_ffi_store8((iter_base) + 0, (1)) - let address = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index = 0; index < (((iter_elem).metadata).aliases).length(); index = index + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index)] - let iter_base = address + (index * 8); + () + } + S8Type(payload439) => { + mbt_ffi_store8((iter_base) + 0, (2)) - let ptr18 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr18) - cleanup_list.push(ptr18) + match (payload439) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + () } - mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 24, address) - - let address20 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index21 = 0; index21 < (((iter_elem).metadata).examples).length(); index21 = index21 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index21)] - let iter_base = address20 + (index21 * 8); - - let ptr19 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr19) - cleanup_list.push(ptr19) + Some(payload441) => { + mbt_ffi_store8((iter_base) + 8, (1)) - } - mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 32, address20) + match ((payload441).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 40, (0)) + () + } + Some(payload443) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload443 { + Signed(payload444) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload444) + + () + } + Unsigned(payload445) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload445).reinterpret_as_int64()) + + () + } + FloatBits(payload446) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload446).reinterpret_as_int64()) + + () + } + } - () + () + } } - Some(payload23) => { - mbt_ffi_store8((iter_base) + 40, (1)) - - let ptr24 = mbt_ffi_str2ptr(payload23) - mbt_ffi_store32((iter_base) + 48, payload23.length()) - mbt_ffi_store32((iter_base) + 44, ptr24) - cleanup_list.push(ptr24) - () - } - } + match ((payload441).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 52, (0)) + () + } + Some(payload448) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload448 { + Signed(payload449) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload449) + + () + } + Unsigned(payload450) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload450).reinterpret_as_int64()) + + () + } + FloatBits(payload451) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload451).reinterpret_as_int64()) + + () + } + } - () + () + } } - Some(payload26) => { - mbt_ffi_store8((iter_base) + 52, (1)) - - match payload26 { - Multimodal => { - mbt_ffi_store8((iter_base) + 56, (0)) - - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 56, (1)) - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 56, (2)) + match ((payload441).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () - } - Other(payload30) => { - mbt_ffi_store8((iter_base) + 56, (3)) + () + } + Some(payload453) => { + mbt_ffi_store8((iter_base) + 64, (1)) - let ptr31 = mbt_ffi_str2ptr(payload30) - mbt_ffi_store32((iter_base) + 64, payload30.length()) - mbt_ffi_store32((iter_base) + 60, ptr31) - cleanup_list.push(ptr31) + let ptr454 = mbt_ffi_str2ptr(payload453) + mbt_ffi_store32((iter_base) + 72, payload453.length()) + mbt_ffi_store32((iter_base) + 68, ptr454) + cleanup_list.push(ptr454) - () - } + () } - - () } - } - cleanup_list.push(ptr14) - cleanup_list.push(address) - cleanup_list.push(address20) + () + } } - mbt_ffi_store32((iter_base) + 12, (payload13).length()) - mbt_ffi_store32((iter_base) + 8, address32) - cleanup_list.push(address32) () } - VariantType(payload34) => { - mbt_ffi_store8((iter_base) + 0, (15)) - - let address57 = mbt_ffi_malloc((payload34).length() * 72); - for index58 = 0; index58 < (payload34).length(); index58 = index58 + 1 { - let iter_elem : @types.VariantCaseType = (payload34)[(index58)] - let iter_base = address57 + (index58 * 72); - - let ptr35 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr35) - - match ((iter_elem).payload) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) - - () - } - Some(payload37) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload37) - - () - } - } - - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) - - () - } - Some(payload39) => { - mbt_ffi_store8((iter_base) + 16, (1)) - - let ptr40 = mbt_ffi_str2ptr(payload39) - mbt_ffi_store32((iter_base) + 24, payload39.length()) - mbt_ffi_store32((iter_base) + 20, ptr40) - cleanup_list.push(ptr40) - - () - } - } - - let address42 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index43 = 0; index43 < (((iter_elem).metadata).aliases).length(); index43 = index43 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index43)] - let iter_base = address42 + (index43 * 8); + S16Type(payload455) => { + mbt_ffi_store8((iter_base) + 0, (3)) - let ptr41 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr41) - cleanup_list.push(ptr41) + match (payload455) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + () } - mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 28, address42) - - let address45 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index46 = 0; index46 < (((iter_elem).metadata).examples).length(); index46 = index46 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index46)] - let iter_base = address45 + (index46 * 8); - - let ptr44 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr44) - cleanup_list.push(ptr44) + Some(payload457) => { + mbt_ffi_store8((iter_base) + 8, (1)) - } - mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 36, address45) + match ((payload457).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 44, (0)) + () + } + Some(payload459) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload459 { + Signed(payload460) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload460) + + () + } + Unsigned(payload461) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload461).reinterpret_as_int64()) + + () + } + FloatBits(payload462) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload462).reinterpret_as_int64()) + + () + } + } - () + () + } } - Some(payload48) => { - mbt_ffi_store8((iter_base) + 44, (1)) - let ptr49 = mbt_ffi_str2ptr(payload48) - mbt_ffi_store32((iter_base) + 52, payload48.length()) - mbt_ffi_store32((iter_base) + 48, ptr49) - cleanup_list.push(ptr49) - - () - } - } + match ((payload457).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 56, (0)) + () + } + Some(payload464) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload464 { + Signed(payload465) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload465) + + () + } + Unsigned(payload466) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload466).reinterpret_as_int64()) + + () + } + FloatBits(payload467) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload467).reinterpret_as_int64()) + + () + } + } - () + () + } } - Some(payload51) => { - mbt_ffi_store8((iter_base) + 56, (1)) - - match payload51 { - Multimodal => { - mbt_ffi_store8((iter_base) + 60, (0)) - - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 60, (1)) - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 60, (2)) + match ((payload457).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () - } - Other(payload55) => { - mbt_ffi_store8((iter_base) + 60, (3)) + () + } + Some(payload469) => { + mbt_ffi_store8((iter_base) + 64, (1)) - let ptr56 = mbt_ffi_str2ptr(payload55) - mbt_ffi_store32((iter_base) + 68, payload55.length()) - mbt_ffi_store32((iter_base) + 64, ptr56) - cleanup_list.push(ptr56) + let ptr470 = mbt_ffi_str2ptr(payload469) + mbt_ffi_store32((iter_base) + 72, payload469.length()) + mbt_ffi_store32((iter_base) + 68, ptr470) + cleanup_list.push(ptr470) - () - } + () } - - () } - } - cleanup_list.push(ptr35) - cleanup_list.push(address42) - cleanup_list.push(address45) + () + } } - mbt_ffi_store32((iter_base) + 12, (payload34).length()) - mbt_ffi_store32((iter_base) + 8, address57) - cleanup_list.push(address57) () } - EnumType(payload59) => { - mbt_ffi_store8((iter_base) + 0, (16)) - - let address61 = mbt_ffi_malloc((payload59).length() * 8); - for index62 = 0; index62 < (payload59).length(); index62 = index62 + 1 { - let iter_elem : String = (payload59)[(index62)] - let iter_base = address61 + (index62 * 8); + S32Type(payload471) => { + mbt_ffi_store8((iter_base) + 0, (4)) - let ptr60 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr60) - cleanup_list.push(ptr60) + match (payload471) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - } - mbt_ffi_store32((iter_base) + 12, (payload59).length()) - mbt_ffi_store32((iter_base) + 8, address61) - cleanup_list.push(address61) + () + } + Some(payload473) => { + mbt_ffi_store8((iter_base) + 8, (1)) - () - } - FlagsType(payload63) => { - mbt_ffi_store8((iter_base) + 0, (17)) + match ((payload473).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let address65 = mbt_ffi_malloc((payload63).length() * 8); - for index66 = 0; index66 < (payload63).length(); index66 = index66 + 1 { - let iter_elem : String = (payload63)[(index66)] - let iter_base = address65 + (index66 * 8); + () + } + Some(payload475) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload475 { + Signed(payload476) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload476) + + () + } + Unsigned(payload477) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload477).reinterpret_as_int64()) + + () + } + FloatBits(payload478) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload478).reinterpret_as_int64()) + + () + } + } - let ptr64 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr64) - cleanup_list.push(ptr64) + () + } + } - } - mbt_ffi_store32((iter_base) + 12, (payload63).length()) - mbt_ffi_store32((iter_base) + 8, address65) - cleanup_list.push(address65) + match ((payload473).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - TupleType(payload67) => { - mbt_ffi_store8((iter_base) + 0, (18)) + () + } + Some(payload480) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload480 { + Signed(payload481) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload481) + + () + } + Unsigned(payload482) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload482).reinterpret_as_int64()) + + () + } + FloatBits(payload483) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload483).reinterpret_as_int64()) + + () + } + } - let address68 = mbt_ffi_malloc((payload67).length() * 4); - for index69 = 0; index69 < (payload67).length(); index69 = index69 + 1 { - let iter_elem : Int = (payload67)[(index69)] - let iter_base = address68 + (index69 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + () + } + } - } - mbt_ffi_store32((iter_base) + 12, (payload67).length()) - mbt_ffi_store32((iter_base) + 8, address68) - cleanup_list.push(address68) + match ((payload473).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () - } - ListType(payload70) => { - mbt_ffi_store8((iter_base) + 0, (19)) - mbt_ffi_store32((iter_base) + 8, payload70) + () + } + Some(payload485) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () - } - FixedListType(payload71) => { - mbt_ffi_store8((iter_base) + 0, (20)) - mbt_ffi_store32((iter_base) + 8, (payload71).element) - mbt_ffi_store32((iter_base) + 12, ((payload71).length).reinterpret_as_int()) + let ptr486 = mbt_ffi_str2ptr(payload485) + mbt_ffi_store32((iter_base) + 72, payload485.length()) + mbt_ffi_store32((iter_base) + 68, ptr486) + cleanup_list.push(ptr486) - () - } - MapType(payload72) => { - mbt_ffi_store8((iter_base) + 0, (21)) - mbt_ffi_store32((iter_base) + 8, (payload72).key) - mbt_ffi_store32((iter_base) + 12, (payload72).value) + () + } + } - () - } - OptionType(payload73) => { - mbt_ffi_store8((iter_base) + 0, (22)) - mbt_ffi_store32((iter_base) + 8, payload73) + () + } + } () } - ResultType(payload74) => { - mbt_ffi_store8((iter_base) + 0, (23)) + S64Type(payload487) => { + mbt_ffi_store8((iter_base) + 0, (5)) - match ((payload74).ok) { + match (payload487) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload76) => { + Some(payload489) => { mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload76) - () - } - } + match ((payload489).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - match ((payload74).err) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + () + } + Some(payload491) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload491 { + Signed(payload492) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload492) + + () + } + Unsigned(payload493) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload493).reinterpret_as_int64()) + + () + } + FloatBits(payload494) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload494).reinterpret_as_int64()) + + () + } + } - () - } - Some(payload78) => { - mbt_ffi_store8((iter_base) + 16, (1)) - mbt_ffi_store32((iter_base) + 20, payload78) + () + } + } + + match ((payload489).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload496) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload496 { + Signed(payload497) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload497) + + () + } + Unsigned(payload498) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload498).reinterpret_as_int64()) + + () + } + FloatBits(payload499) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload499).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload489).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload501) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr502 = mbt_ffi_str2ptr(payload501) + mbt_ffi_store32((iter_base) + 72, payload501.length()) + mbt_ffi_store32((iter_base) + 68, ptr502) + cleanup_list.push(ptr502) + + () + } + } () } @@ -677,78 +3293,103 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty () } - TextType(payload79) => { - mbt_ffi_store8((iter_base) + 0, (24)) + U8Type(payload503) => { + mbt_ffi_store8((iter_base) + 0, (6)) - match ((payload79).languages) { + match (payload503) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload81) => { + Some(payload505) => { mbt_ffi_store8((iter_base) + 8, (1)) - let address83 = mbt_ffi_malloc((payload81).length() * 8); - for index84 = 0; index84 < (payload81).length(); index84 = index84 + 1 { - let iter_elem : String = (payload81)[(index84)] - let iter_base = address83 + (index84 * 8); + match ((payload505).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr82 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr82) - cleanup_list.push(ptr82) + () + } + Some(payload507) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload507 { + Signed(payload508) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload508) + + () + } + Unsigned(payload509) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload509).reinterpret_as_int64()) + + () + } + FloatBits(payload510) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload510).reinterpret_as_int64()) + + () + } + } + () + } } - mbt_ffi_store32((iter_base) + 16, (payload81).length()) - mbt_ffi_store32((iter_base) + 12, address83) - cleanup_list.push(address83) - - () - } - } - - match ((payload79).min_length) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) - - () - } - Some(payload86) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload86).reinterpret_as_int()) - () - } - } + match ((payload505).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match ((payload79).max_length) { - None => { - mbt_ffi_store8((iter_base) + 28, (0)) + () + } + Some(payload512) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload512 { + Signed(payload513) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload513) + + () + } + Unsigned(payload514) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload514).reinterpret_as_int64()) + + () + } + FloatBits(payload515) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload515).reinterpret_as_int64()) + + () + } + } - () - } - Some(payload88) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload88).reinterpret_as_int()) + () + } + } - () - } - } + match ((payload505).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - match ((payload79).regex) { - None => { - mbt_ffi_store8((iter_base) + 36, (0)) + () + } + Some(payload517) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () - } - Some(payload90) => { - mbt_ffi_store8((iter_base) + 36, (1)) + let ptr518 = mbt_ffi_str2ptr(payload517) + mbt_ffi_store32((iter_base) + 72, payload517.length()) + mbt_ffi_store32((iter_base) + 68, ptr518) + cleanup_list.push(ptr518) - let ptr91 = mbt_ffi_str2ptr(payload90) - mbt_ffi_store32((iter_base) + 44, payload90.length()) - mbt_ffi_store32((iter_base) + 40, ptr91) - cleanup_list.push(ptr91) + () + } + } () } @@ -756,60 +3397,103 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty () } - BinaryType(payload92) => { - mbt_ffi_store8((iter_base) + 0, (25)) + U16Type(payload519) => { + mbt_ffi_store8((iter_base) + 0, (7)) - match ((payload92).mime_types) { + match (payload519) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload94) => { + Some(payload521) => { mbt_ffi_store8((iter_base) + 8, (1)) - let address96 = mbt_ffi_malloc((payload94).length() * 8); - for index97 = 0; index97 < (payload94).length(); index97 = index97 + 1 { - let iter_elem : String = (payload94)[(index97)] - let iter_base = address96 + (index97 * 8); + match ((payload521).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr95 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr95) - cleanup_list.push(ptr95) + () + } + Some(payload523) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload523 { + Signed(payload524) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload524) + + () + } + Unsigned(payload525) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload525).reinterpret_as_int64()) + + () + } + FloatBits(payload526) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload526).reinterpret_as_int64()) + + () + } + } + () + } } - mbt_ffi_store32((iter_base) + 16, (payload94).length()) - mbt_ffi_store32((iter_base) + 12, address96) - cleanup_list.push(address96) - () - } - } + match ((payload521).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match ((payload92).min_bytes) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + () + } + Some(payload528) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload528 { + Signed(payload529) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload529) + + () + } + Unsigned(payload530) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload530).reinterpret_as_int64()) + + () + } + FloatBits(payload531) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload531).reinterpret_as_int64()) + + () + } + } - () - } - Some(payload99) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload99).reinterpret_as_int()) + () + } + } - () - } - } + match ((payload521).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - match ((payload92).max_bytes) { - None => { - mbt_ffi_store8((iter_base) + 28, (0)) + () + } + Some(payload533) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () - } - Some(payload101) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload101).reinterpret_as_int()) + let ptr534 = mbt_ffi_str2ptr(payload533) + mbt_ffi_store32((iter_base) + 72, payload533.length()) + mbt_ffi_store32((iter_base) + 68, ptr534) + cleanup_list.push(ptr534) + + () + } + } () } @@ -817,62 +3501,103 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty () } - PathType(payload102) => { - mbt_ffi_store8((iter_base) + 0, (26)) - mbt_ffi_store8((iter_base) + 8, (payload102).direction.ordinal()) - mbt_ffi_store8((iter_base) + 9, (payload102).kind.ordinal()) + U32Type(payload535) => { + mbt_ffi_store8((iter_base) + 0, (8)) - match ((payload102).allowed_mime_types) { + match (payload535) { None => { - mbt_ffi_store8((iter_base) + 12, (0)) + mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload104) => { - mbt_ffi_store8((iter_base) + 12, (1)) + Some(payload537) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let address106 = mbt_ffi_malloc((payload104).length() * 8); - for index107 = 0; index107 < (payload104).length(); index107 = index107 + 1 { - let iter_elem : String = (payload104)[(index107)] - let iter_base = address106 + (index107 * 8); + match ((payload537).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr105 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr105) - cleanup_list.push(ptr105) + () + } + Some(payload539) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload539 { + Signed(payload540) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload540) + + () + } + Unsigned(payload541) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload541).reinterpret_as_int64()) + + () + } + FloatBits(payload542) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload542).reinterpret_as_int64()) + + () + } + } + () + } } - mbt_ffi_store32((iter_base) + 20, (payload104).length()) - mbt_ffi_store32((iter_base) + 16, address106) - cleanup_list.push(address106) - () - } - } + match ((payload537).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match ((payload102).allowed_extensions) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + () + } + Some(payload544) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload544 { + Signed(payload545) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload545) + + () + } + Unsigned(payload546) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload546).reinterpret_as_int64()) + + () + } + FloatBits(payload547) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload547).reinterpret_as_int64()) + + () + } + } - () - } - Some(payload109) => { - mbt_ffi_store8((iter_base) + 24, (1)) + () + } + } - let address111 = mbt_ffi_malloc((payload109).length() * 8); - for index112 = 0; index112 < (payload109).length(); index112 = index112 + 1 { - let iter_elem : String = (payload109)[(index112)] - let iter_base = address111 + (index112 * 8); + match ((payload537).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - let ptr110 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr110) - cleanup_list.push(ptr110) + () + } + Some(payload549) => { + mbt_ffi_store8((iter_base) + 64, (1)) + let ptr550 = mbt_ffi_str2ptr(payload549) + mbt_ffi_store32((iter_base) + 72, payload549.length()) + mbt_ffi_store32((iter_base) + 68, ptr550) + cleanup_list.push(ptr550) + + () + } } - mbt_ffi_store32((iter_base) + 32, (payload109).length()) - mbt_ffi_store32((iter_base) + 28, address111) - cleanup_list.push(address111) () } @@ -880,60 +3605,103 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty () } - UrlType(payload113) => { - mbt_ffi_store8((iter_base) + 0, (27)) + U64Type(payload551) => { + mbt_ffi_store8((iter_base) + 0, (9)) - match ((payload113).allowed_schemes) { + match (payload551) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload115) => { + Some(payload553) => { mbt_ffi_store8((iter_base) + 8, (1)) - let address117 = mbt_ffi_malloc((payload115).length() * 8); - for index118 = 0; index118 < (payload115).length(); index118 = index118 + 1 { - let iter_elem : String = (payload115)[(index118)] - let iter_base = address117 + (index118 * 8); + match ((payload553).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr116 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr116) - cleanup_list.push(ptr116) + () + } + Some(payload555) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload555 { + Signed(payload556) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload556) + + () + } + Unsigned(payload557) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload557).reinterpret_as_int64()) + + () + } + FloatBits(payload558) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload558).reinterpret_as_int64()) + + () + } + } + () + } } - mbt_ffi_store32((iter_base) + 16, (payload115).length()) - mbt_ffi_store32((iter_base) + 12, address117) - cleanup_list.push(address117) - () - } - } + match ((payload553).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match ((payload113).allowed_hosts) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + () + } + Some(payload560) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload560 { + Signed(payload561) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload561) + + () + } + Unsigned(payload562) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload562).reinterpret_as_int64()) + + () + } + FloatBits(payload563) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload563).reinterpret_as_int64()) + + () + } + } - () - } - Some(payload120) => { - mbt_ffi_store8((iter_base) + 20, (1)) + () + } + } - let address122 = mbt_ffi_malloc((payload120).length() * 8); - for index123 = 0; index123 < (payload120).length(); index123 = index123 + 1 { - let iter_elem : String = (payload120)[(index123)] - let iter_base = address122 + (index123 * 8); + match ((payload553).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - let ptr121 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr121) - cleanup_list.push(ptr121) + () + } + Some(payload565) => { + mbt_ffi_store8((iter_base) + 64, (1)) + let ptr566 = mbt_ffi_str2ptr(payload565) + mbt_ffi_store32((iter_base) + 72, payload565.length()) + mbt_ffi_store32((iter_base) + 68, ptr566) + cleanup_list.push(ptr566) + + () + } } - mbt_ffi_store32((iter_base) + 28, (payload120).length()) - mbt_ffi_store32((iter_base) + 24, address122) - cleanup_list.push(address122) () } @@ -941,234 +3709,296 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty () } - DatetimeType => { - mbt_ffi_store8((iter_base) + 0, (28)) - - () - } - DurationType => { - mbt_ffi_store8((iter_base) + 0, (29)) + F32Type(payload567) => { + mbt_ffi_store8((iter_base) + 0, (10)) - () - } - QuantityType(payload126) => { - mbt_ffi_store8((iter_base) + 0, (30)) + match (payload567) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let ptr127 = mbt_ffi_str2ptr((payload126).base_unit) - mbt_ffi_store32((iter_base) + 12, (payload126).base_unit.length()) - mbt_ffi_store32((iter_base) + 8, ptr127) + () + } + Some(payload569) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let address129 = mbt_ffi_malloc(((payload126).allowed_suffixes).length() * 8); - for index130 = 0; index130 < ((payload126).allowed_suffixes).length(); index130 = index130 + 1 { - let iter_elem : String = ((payload126).allowed_suffixes)[(index130)] - let iter_base = address129 + (index130 * 8); + match ((payload569).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr128 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr128) - cleanup_list.push(ptr128) + () + } + Some(payload571) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload571 { + Signed(payload572) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload572) + + () + } + Unsigned(payload573) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload573).reinterpret_as_int64()) + + () + } + FloatBits(payload574) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload574).reinterpret_as_int64()) + + () + } + } - } - mbt_ffi_store32((iter_base) + 20, ((payload126).allowed_suffixes).length()) - mbt_ffi_store32((iter_base) + 16, address129) + () + } + } - match ((payload126).min) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + match ((payload569).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - Some(payload132) => { - mbt_ffi_store8((iter_base) + 24, (1)) - mbt_ffi_store64((iter_base) + 32, (payload132).mantissa) - mbt_ffi_store32((iter_base) + 40, (payload132).scale) + () + } + Some(payload576) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload576 { + Signed(payload577) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload577) + + () + } + Unsigned(payload578) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload578).reinterpret_as_int64()) + + () + } + FloatBits(payload579) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload579).reinterpret_as_int64()) + + () + } + } - let ptr133 = mbt_ffi_str2ptr((payload132).unit) - mbt_ffi_store32((iter_base) + 48, (payload132).unit.length()) - mbt_ffi_store32((iter_base) + 44, ptr133) - cleanup_list.push(ptr133) + () + } + } - () - } - } + match ((payload569).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - match ((payload126).max) { - None => { - mbt_ffi_store8((iter_base) + 56, (0)) + () + } + Some(payload581) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () - } - Some(payload135) => { - mbt_ffi_store8((iter_base) + 56, (1)) - mbt_ffi_store64((iter_base) + 64, (payload135).mantissa) - mbt_ffi_store32((iter_base) + 72, (payload135).scale) + let ptr582 = mbt_ffi_str2ptr(payload581) + mbt_ffi_store32((iter_base) + 72, payload581.length()) + mbt_ffi_store32((iter_base) + 68, ptr582) + cleanup_list.push(ptr582) - let ptr136 = mbt_ffi_str2ptr((payload135).unit) - mbt_ffi_store32((iter_base) + 80, (payload135).unit.length()) - mbt_ffi_store32((iter_base) + 76, ptr136) - cleanup_list.push(ptr136) + () + } + } () } } - cleanup_list.push(ptr127) - cleanup_list.push(address129) () } - UnionType(payload137) => { - mbt_ffi_store8((iter_base) + 0, (31)) + F64Type(payload583) => { + mbt_ffi_store8((iter_base) + 0, (11)) - let address173 = mbt_ffi_malloc(((payload137).branches).length() * 92); - for index174 = 0; index174 < ((payload137).branches).length(); index174 = index174 + 1 { - let iter_elem : @types.UnionBranch = ((payload137).branches)[(index174)] - let iter_base = address173 + (index174 * 92); + match (payload583) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let ptr138 = mbt_ffi_str2ptr((iter_elem).tag) - mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) - mbt_ffi_store32((iter_base) + 0, ptr138) - mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + () + } + Some(payload585) => { + mbt_ffi_store8((iter_base) + 8, (1)) - match (iter_elem).discriminator { - Prefix(payload139) => { - mbt_ffi_store8((iter_base) + 12, (0)) + match ((payload585).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr140 = mbt_ffi_str2ptr(payload139) - mbt_ffi_store32((iter_base) + 20, payload139.length()) - mbt_ffi_store32((iter_base) + 16, ptr140) - cleanup_list.push(ptr140) + () + } + Some(payload587) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload587 { + Signed(payload588) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload588) + + () + } + Unsigned(payload589) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload589).reinterpret_as_int64()) + + () + } + FloatBits(payload590) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload590).reinterpret_as_int64()) + + () + } + } - () + () + } } - Suffix(payload141) => { - mbt_ffi_store8((iter_base) + 12, (1)) - - let ptr142 = mbt_ffi_str2ptr(payload141) - mbt_ffi_store32((iter_base) + 20, payload141.length()) - mbt_ffi_store32((iter_base) + 16, ptr142) - cleanup_list.push(ptr142) - () - } - Contains(payload143) => { - mbt_ffi_store8((iter_base) + 12, (2)) + match ((payload585).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - let ptr144 = mbt_ffi_str2ptr(payload143) - mbt_ffi_store32((iter_base) + 20, payload143.length()) - mbt_ffi_store32((iter_base) + 16, ptr144) - cleanup_list.push(ptr144) + () + } + Some(payload592) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload592 { + Signed(payload593) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload593) + + () + } + Unsigned(payload594) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload594).reinterpret_as_int64()) + + () + } + FloatBits(payload595) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload595).reinterpret_as_int64()) + + () + } + } - () + () + } } - Regex(payload145) => { - mbt_ffi_store8((iter_base) + 12, (3)) - let ptr146 = mbt_ffi_str2ptr(payload145) - mbt_ffi_store32((iter_base) + 20, payload145.length()) - mbt_ffi_store32((iter_base) + 16, ptr146) - cleanup_list.push(ptr146) + match ((payload585).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () - } - FieldEquals(payload147) => { - mbt_ffi_store8((iter_base) + 12, (4)) + () + } + Some(payload597) => { + mbt_ffi_store8((iter_base) + 64, (1)) - let ptr148 = mbt_ffi_str2ptr((payload147).field_name) - mbt_ffi_store32((iter_base) + 20, (payload147).field_name.length()) - mbt_ffi_store32((iter_base) + 16, ptr148) + let ptr598 = mbt_ffi_str2ptr(payload597) + mbt_ffi_store32((iter_base) + 72, payload597.length()) + mbt_ffi_store32((iter_base) + 68, ptr598) + cleanup_list.push(ptr598) - match ((payload147).literal) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + () + } + } - () - } - Some(payload150) => { - mbt_ffi_store8((iter_base) + 24, (1)) + () + } + } - let ptr151 = mbt_ffi_str2ptr(payload150) - mbt_ffi_store32((iter_base) + 32, payload150.length()) - mbt_ffi_store32((iter_base) + 28, ptr151) - cleanup_list.push(ptr151) + () + } + CharType => { + mbt_ffi_store8((iter_base) + 0, (12)) - () - } - } - cleanup_list.push(ptr148) + () + } + StringType => { + mbt_ffi_store8((iter_base) + 0, (13)) - () - } - FieldAbsent(payload152) => { - mbt_ffi_store8((iter_base) + 12, (5)) + () + } + RecordType(payload601) => { + mbt_ffi_store8((iter_base) + 0, (14)) - let ptr153 = mbt_ffi_str2ptr(payload152) - mbt_ffi_store32((iter_base) + 20, payload152.length()) - mbt_ffi_store32((iter_base) + 16, ptr153) - cleanup_list.push(ptr153) + let address622 = mbt_ffi_malloc((payload601).length() * 68); + for index623 = 0; index623 < (payload601).length(); index623 = index623 + 1 { + let iter_elem : @types.NamedFieldType = (payload601)[(index623)] + let iter_base = address622 + (index623 * 68); - () - } - } + let ptr602 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr602) + mbt_ffi_store32((iter_base) + 8, (iter_elem).body) match (((iter_elem).metadata).doc) { None => { - mbt_ffi_store8((iter_base) + 36, (0)) + mbt_ffi_store8((iter_base) + 12, (0)) () } - Some(payload155) => { - mbt_ffi_store8((iter_base) + 36, (1)) + Some(payload604) => { + mbt_ffi_store8((iter_base) + 12, (1)) - let ptr156 = mbt_ffi_str2ptr(payload155) - mbt_ffi_store32((iter_base) + 44, payload155.length()) - mbt_ffi_store32((iter_base) + 40, ptr156) - cleanup_list.push(ptr156) + let ptr605 = mbt_ffi_str2ptr(payload604) + mbt_ffi_store32((iter_base) + 20, payload604.length()) + mbt_ffi_store32((iter_base) + 16, ptr605) + cleanup_list.push(ptr605) () } } - let address158 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index159 = 0; index159 < (((iter_elem).metadata).aliases).length(); index159 = index159 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index159)] - let iter_base = address158 + (index159 * 8); + let address607 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index608 = 0; index608 < (((iter_elem).metadata).aliases).length(); index608 = index608 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index608)] + let iter_base = address607 + (index608 * 8); - let ptr157 = mbt_ffi_str2ptr(iter_elem) + let ptr606 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr157) - cleanup_list.push(ptr157) + mbt_ffi_store32((iter_base) + 0, ptr606) + cleanup_list.push(ptr606) } - mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 48, address158) + mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 24, address607) - let address161 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index162 = 0; index162 < (((iter_elem).metadata).examples).length(); index162 = index162 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index162)] - let iter_base = address161 + (index162 * 8); + let address610 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index611 = 0; index611 < (((iter_elem).metadata).examples).length(); index611 = index611 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index611)] + let iter_base = address610 + (index611 * 8); - let ptr160 = mbt_ffi_str2ptr(iter_elem) + let ptr609 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr160) - cleanup_list.push(ptr160) + mbt_ffi_store32((iter_base) + 0, ptr609) + cleanup_list.push(ptr609) } - mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 56, address161) + mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 32, address610) match (((iter_elem).metadata).deprecated) { None => { - mbt_ffi_store8((iter_base) + 64, (0)) + mbt_ffi_store8((iter_base) + 40, (0)) () } - Some(payload164) => { - mbt_ffi_store8((iter_base) + 64, (1)) + Some(payload613) => { + mbt_ffi_store8((iter_base) + 40, (1)) - let ptr165 = mbt_ffi_str2ptr(payload164) - mbt_ffi_store32((iter_base) + 72, payload164.length()) - mbt_ffi_store32((iter_base) + 68, ptr165) - cleanup_list.push(ptr165) + let ptr614 = mbt_ffi_str2ptr(payload613) + mbt_ffi_store32((iter_base) + 48, payload613.length()) + mbt_ffi_store32((iter_base) + 44, ptr614) + cleanup_list.push(ptr614) () } @@ -1176,36 +4006,36 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty match (((iter_elem).metadata).role) { None => { - mbt_ffi_store8((iter_base) + 76, (0)) + mbt_ffi_store8((iter_base) + 52, (0)) () } - Some(payload167) => { - mbt_ffi_store8((iter_base) + 76, (1)) + Some(payload616) => { + mbt_ffi_store8((iter_base) + 52, (1)) - match payload167 { + match payload616 { Multimodal => { - mbt_ffi_store8((iter_base) + 80, (0)) + mbt_ffi_store8((iter_base) + 56, (0)) () } UnstructuredText => { - mbt_ffi_store8((iter_base) + 80, (1)) + mbt_ffi_store8((iter_base) + 56, (1)) () } UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 80, (2)) + mbt_ffi_store8((iter_base) + 56, (2)) () } - Other(payload171) => { - mbt_ffi_store8((iter_base) + 80, (3)) + Other(payload620) => { + mbt_ffi_store8((iter_base) + 56, (3)) - let ptr172 = mbt_ffi_str2ptr(payload171) - mbt_ffi_store32((iter_base) + 88, payload171.length()) - mbt_ffi_store32((iter_base) + 84, ptr172) - cleanup_list.push(ptr172) + let ptr621 = mbt_ffi_str2ptr(payload620) + mbt_ffi_store32((iter_base) + 64, payload620.length()) + mbt_ffi_store32((iter_base) + 60, ptr621) + cleanup_list.push(ptr621) () } @@ -1214,365 +4044,266 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty () } } - cleanup_list.push(ptr138) - cleanup_list.push(address158) - cleanup_list.push(address161) + cleanup_list.push(ptr602) + cleanup_list.push(address607) + cleanup_list.push(address610) } - mbt_ffi_store32((iter_base) + 12, ((payload137).branches).length()) - mbt_ffi_store32((iter_base) + 8, address173) - cleanup_list.push(address173) + mbt_ffi_store32((iter_base) + 12, (payload601).length()) + mbt_ffi_store32((iter_base) + 8, address622) + cleanup_list.push(address622) () } - SecretType(payload175) => { - mbt_ffi_store8((iter_base) + 0, (32)) - - match ((payload175).category) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) - - () - } - Some(payload177) => { - mbt_ffi_store8((iter_base) + 8, (1)) - - let ptr178 = mbt_ffi_str2ptr(payload177) - mbt_ffi_store32((iter_base) + 16, payload177.length()) - mbt_ffi_store32((iter_base) + 12, ptr178) - cleanup_list.push(ptr178) - - () - } - } + VariantType(payload624) => { + mbt_ffi_store8((iter_base) + 0, (15)) - () - } - QuotaTokenType(payload179) => { - mbt_ffi_store8((iter_base) + 0, (33)) + let address647 = mbt_ffi_malloc((payload624).length() * 72); + for index648 = 0; index648 < (payload624).length(); index648 = index648 + 1 { + let iter_elem : @types.VariantCaseType = (payload624)[(index648)] + let iter_base = address647 + (index648 * 72); - match ((payload179).resource_name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let ptr625 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr625) - () - } - Some(payload181) => { - mbt_ffi_store8((iter_base) + 8, (1)) + match ((iter_elem).payload) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let ptr182 = mbt_ffi_str2ptr(payload181) - mbt_ffi_store32((iter_base) + 16, payload181.length()) - mbt_ffi_store32((iter_base) + 12, ptr182) - cleanup_list.push(ptr182) + () + } + Some(payload627) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload627) - () + () + } } - } - () - } - FutureType(payload183) => { - mbt_ffi_store8((iter_base) + 0, (34)) + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - match (payload183) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + () + } + Some(payload629) => { + mbt_ffi_store8((iter_base) + 16, (1)) - () - } - Some(payload185) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload185) + let ptr630 = mbt_ffi_str2ptr(payload629) + mbt_ffi_store32((iter_base) + 24, payload629.length()) + mbt_ffi_store32((iter_base) + 20, ptr630) + cleanup_list.push(ptr630) - () + () + } } - } - - () - } - StreamType(payload186) => { - mbt_ffi_store8((iter_base) + 0, (35)) - match (payload186) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let address632 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index633 = 0; index633 < (((iter_elem).metadata).aliases).length(); index633 = index633 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index633)] + let iter_base = address632 + (index633 * 8); - () - } - Some(payload188) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload188) + let ptr631 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr631) + cleanup_list.push(ptr631) - () } - } - - () - } - } - - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 88, (0)) - - () - } - Some(payload190) => { - mbt_ffi_store8((iter_base) + 88, (1)) - - let ptr191 = mbt_ffi_str2ptr(payload190) - mbt_ffi_store32((iter_base) + 96, payload190.length()) - mbt_ffi_store32((iter_base) + 92, ptr191) - cleanup_list.push(ptr191) - - () - } - } - - let address193 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index194 = 0; index194 < (((iter_elem).metadata).aliases).length(); index194 = index194 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index194)] - let iter_base = address193 + (index194 * 8); - - let ptr192 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr192) - cleanup_list.push(ptr192) - - } - mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 100, address193) - - let address196 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index197 = 0; index197 < (((iter_elem).metadata).examples).length(); index197 = index197 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index197)] - let iter_base = address196 + (index197 * 8); - - let ptr195 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr195) - cleanup_list.push(ptr195) - - } - mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 108, address196) - - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 116, (0)) - - () - } - Some(payload199) => { - mbt_ffi_store8((iter_base) + 116, (1)) - - let ptr200 = mbt_ffi_str2ptr(payload199) - mbt_ffi_store32((iter_base) + 124, payload199.length()) - mbt_ffi_store32((iter_base) + 120, ptr200) - cleanup_list.push(ptr200) + mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 28, address632) - () - } - } + let address635 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index636 = 0; index636 < (((iter_elem).metadata).examples).length(); index636 = index636 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index636)] + let iter_base = address635 + (index636 * 8); - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 128, (0)) + let ptr634 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr634) + cleanup_list.push(ptr634) - () - } - Some(payload202) => { - mbt_ffi_store8((iter_base) + 128, (1)) + } + mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 36, address635) - match payload202 { - Multimodal => { - mbt_ffi_store8((iter_base) + 132, (0)) + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 44, (0)) - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 132, (1)) + () + } + Some(payload638) => { + mbt_ffi_store8((iter_base) + 44, (1)) - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 132, (2)) + let ptr639 = mbt_ffi_str2ptr(payload638) + mbt_ffi_store32((iter_base) + 52, payload638.length()) + mbt_ffi_store32((iter_base) + 48, ptr639) + cleanup_list.push(ptr639) - () + () + } } - Other(payload206) => { - mbt_ffi_store8((iter_base) + 132, (3)) - let ptr207 = mbt_ffi_str2ptr(payload206) - mbt_ffi_store32((iter_base) + 140, payload206.length()) - mbt_ffi_store32((iter_base) + 136, ptr207) - cleanup_list.push(ptr207) + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 56, (0)) - () - } - } + () + } + Some(payload641) => { + mbt_ffi_store8((iter_base) + 56, (1)) - () - } - } - cleanup_list.push(address193) - cleanup_list.push(address196) + match payload641 { + Multimodal => { + mbt_ffi_store8((iter_base) + 60, (0)) - } - mbt_ffi_store32((return_area) + 12, (((request).graph).type_nodes).length()) - mbt_ffi_store32((return_area) + 8, address208) + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 60, (1)) - let address214 = mbt_ffi_malloc((((request).graph).defs).length() * 24); - for index215 = 0; index215 < (((request).graph).defs).length(); index215 = index215 + 1 { - let iter_elem : @types.SchemaTypeDef = (((request).graph).defs)[(index215)] - let iter_base = address214 + (index215 * 24); + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 60, (2)) - let ptr210 = mbt_ffi_str2ptr((iter_elem).id) - mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) - mbt_ffi_store32((iter_base) + 0, ptr210) + () + } + Other(payload645) => { + mbt_ffi_store8((iter_base) + 60, (3)) - match ((iter_elem).name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let ptr646 = mbt_ffi_str2ptr(payload645) + mbt_ffi_store32((iter_base) + 68, payload645.length()) + mbt_ffi_store32((iter_base) + 64, ptr646) + cleanup_list.push(ptr646) - () - } - Some(payload212) => { - mbt_ffi_store8((iter_base) + 8, (1)) + () + } + } + + () + } + } + cleanup_list.push(ptr625) + cleanup_list.push(address632) + cleanup_list.push(address635) - let ptr213 = mbt_ffi_str2ptr(payload212) - mbt_ffi_store32((iter_base) + 16, payload212.length()) - mbt_ffi_store32((iter_base) + 12, ptr213) - cleanup_list.push(ptr213) + } + mbt_ffi_store32((iter_base) + 12, (payload624).length()) + mbt_ffi_store32((iter_base) + 8, address647) + cleanup_list.push(address647) () } - } - mbt_ffi_store32((iter_base) + 20, (iter_elem).body) - cleanup_list.push(ptr210) + EnumType(payload649) => { + mbt_ffi_store8((iter_base) + 0, (16)) - } - mbt_ffi_store32((return_area) + 20, (((request).graph).defs).length()) - mbt_ffi_store32((return_area) + 16, address214) - mbt_ffi_store32((return_area) + 24, ((request).graph).root) + let address651 = mbt_ffi_malloc((payload649).length() * 8); + for index652 = 0; index652 < (payload649).length(); index652 = index652 + 1 { + let iter_elem : String = (payload649)[(index652)] + let iter_base = address651 + (index652 * 8); - let address285 = mbt_ffi_malloc((((request).value).value_nodes).length() * 32); - for index286 = 0; index286 < (((request).value).value_nodes).length(); index286 = index286 + 1 { - let iter_elem : @types.SchemaValueNode = (((request).value).value_nodes)[(index286)] - let iter_base = address285 + (index286 * 32); + let ptr650 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr650) + cleanup_list.push(ptr650) - match iter_elem { - BoolValue(payload216) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload216 { 1 } else { 0 })) + } + mbt_ffi_store32((iter_base) + 12, (payload649).length()) + mbt_ffi_store32((iter_base) + 8, address651) + cleanup_list.push(address651) () } - S8Value(payload217) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload217)) + FlagsType(payload653) => { + mbt_ffi_store8((iter_base) + 0, (17)) - () - } - S16Value(payload218) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload218)) + let address655 = mbt_ffi_malloc((payload653).length() * 8); + for index656 = 0; index656 < (payload653).length(); index656 = index656 + 1 { + let iter_elem : String = (payload653)[(index656)] + let iter_base = address655 + (index656 * 8); - () - } - S32Value(payload219) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload219) + let ptr654 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr654) + cleanup_list.push(ptr654) - () - } - S64Value(payload220) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload220) + } + mbt_ffi_store32((iter_base) + 12, (payload653).length()) + mbt_ffi_store32((iter_base) + 8, address655) + cleanup_list.push(address655) () } - U8Value(payload221) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload221).to_int()) + TupleType(payload657) => { + mbt_ffi_store8((iter_base) + 0, (18)) - () - } - U16Value(payload222) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload222).reinterpret_as_int()) + let address658 = mbt_ffi_malloc((payload657).length() * 4); + for index659 = 0; index659 < (payload657).length(); index659 = index659 + 1 { + let iter_elem : Int = (payload657)[(index659)] + let iter_base = address658 + (index659 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - () - } - U32Value(payload223) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload223).reinterpret_as_int()) + } + mbt_ffi_store32((iter_base) + 12, (payload657).length()) + mbt_ffi_store32((iter_base) + 8, address658) + cleanup_list.push(address658) () } - U64Value(payload224) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload224).reinterpret_as_int64()) + ListType(payload660) => { + mbt_ffi_store8((iter_base) + 0, (19)) + mbt_ffi_store32((iter_base) + 8, payload660) () } - F32Value(payload225) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload225) + FixedListType(payload661) => { + mbt_ffi_store8((iter_base) + 0, (20)) + mbt_ffi_store32((iter_base) + 8, (payload661).element) + mbt_ffi_store32((iter_base) + 12, ((payload661).length).reinterpret_as_int()) () } - F64Value(payload226) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload226) + MapType(payload662) => { + mbt_ffi_store8((iter_base) + 0, (21)) + mbt_ffi_store32((iter_base) + 8, (payload662).key) + mbt_ffi_store32((iter_base) + 12, (payload662).value) () } - CharValue(payload227) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload227).to_int()) + OptionType(payload663) => { + mbt_ffi_store8((iter_base) + 0, (22)) + mbt_ffi_store32((iter_base) + 8, payload663) () } - StringValue(payload228) => { - mbt_ffi_store8((iter_base) + 0, (12)) - - let ptr229 = mbt_ffi_str2ptr(payload228) - mbt_ffi_store32((iter_base) + 12, payload228.length()) - mbt_ffi_store32((iter_base) + 8, ptr229) - cleanup_list.push(ptr229) + ResultType(payload664) => { + mbt_ffi_store8((iter_base) + 0, (23)) - () - } - RecordValue(payload230) => { - mbt_ffi_store8((iter_base) + 0, (13)) + match ((payload664).ok) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let address231 = mbt_ffi_malloc((payload230).length() * 4); - for index232 = 0; index232 < (payload230).length(); index232 = index232 + 1 { - let iter_elem : Int = (payload230)[(index232)] - let iter_base = address231 + (index232 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + () + } + Some(payload666) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload666) + () + } } - mbt_ffi_store32((iter_base) + 12, (payload230).length()) - mbt_ffi_store32((iter_base) + 8, address231) - cleanup_list.push(address231) - - () - } - VariantValue(payload233) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload233).case).reinterpret_as_int()) - match ((payload233).payload) { + match ((payload664).err) { None => { - mbt_ffi_store8((iter_base) + 12, (0)) + mbt_ffi_store8((iter_base) + 16, (0)) () } - Some(payload235) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload235) + Some(payload668) => { + mbt_ffi_store8((iter_base) + 16, (1)) + mbt_ffi_store32((iter_base) + 20, payload668) () } @@ -1580,445 +4311,498 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty () } - EnumValue(payload236) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload236).reinterpret_as_int()) + TextType(payload669) => { + mbt_ffi_store8((iter_base) + 0, (24)) - () - } - FlagsValue(payload237) => { - mbt_ffi_store8((iter_base) + 0, (16)) + match ((payload669).languages) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let address238 = mbt_ffi_malloc((payload237).length() * 1); - for index239 = 0; index239 < (payload237).length(); index239 = index239 + 1 { - let iter_elem : Bool = (payload237)[(index239)] - let iter_base = address238 + (index239 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + () + } + Some(payload671) => { + mbt_ffi_store8((iter_base) + 8, (1)) - } - mbt_ffi_store32((iter_base) + 12, (payload237).length()) - mbt_ffi_store32((iter_base) + 8, address238) - cleanup_list.push(address238) + let address673 = mbt_ffi_malloc((payload671).length() * 8); + for index674 = 0; index674 < (payload671).length(); index674 = index674 + 1 { + let iter_elem : String = (payload671)[(index674)] + let iter_base = address673 + (index674 * 8); - () - } - TupleValue(payload240) => { - mbt_ffi_store8((iter_base) + 0, (17)) + let ptr672 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr672) + cleanup_list.push(ptr672) - let address241 = mbt_ffi_malloc((payload240).length() * 4); - for index242 = 0; index242 < (payload240).length(); index242 = index242 + 1 { - let iter_elem : Int = (payload240)[(index242)] - let iter_base = address241 + (index242 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + } + mbt_ffi_store32((iter_base) + 16, (payload671).length()) + mbt_ffi_store32((iter_base) + 12, address673) + cleanup_list.push(address673) + () + } } - mbt_ffi_store32((iter_base) + 12, (payload240).length()) - mbt_ffi_store32((iter_base) + 8, address241) - cleanup_list.push(address241) - () - } - ListValue(payload243) => { - mbt_ffi_store8((iter_base) + 0, (18)) + match ((payload669).min_length) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) - let address244 = mbt_ffi_malloc((payload243).length() * 4); - for index245 = 0; index245 < (payload243).length(); index245 = index245 + 1 { - let iter_elem : Int = (payload243)[(index245)] - let iter_base = address244 + (index245 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + () + } + Some(payload676) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload676).reinterpret_as_int()) + () + } } - mbt_ffi_store32((iter_base) + 12, (payload243).length()) - mbt_ffi_store32((iter_base) + 8, address244) - cleanup_list.push(address244) - () - } - FixedListValue(payload246) => { - mbt_ffi_store8((iter_base) + 0, (19)) + match ((payload669).max_length) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) - let address247 = mbt_ffi_malloc((payload246).length() * 4); - for index248 = 0; index248 < (payload246).length(); index248 = index248 + 1 { - let iter_elem : Int = (payload246)[(index248)] - let iter_base = address247 + (index248 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + () + } + Some(payload678) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload678).reinterpret_as_int()) + () + } } - mbt_ffi_store32((iter_base) + 12, (payload246).length()) - mbt_ffi_store32((iter_base) + 8, address247) - cleanup_list.push(address247) - () - } - MapValue(payload249) => { - mbt_ffi_store8((iter_base) + 0, (20)) + match ((payload669).regex) { + None => { + mbt_ffi_store8((iter_base) + 36, (0)) - let address250 = mbt_ffi_malloc((payload249).length() * 8); - for index251 = 0; index251 < (payload249).length(); index251 = index251 + 1 { - let iter_elem : @types.MapEntry = (payload249)[(index251)] - let iter_base = address250 + (index251 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + () + } + Some(payload680) => { + mbt_ffi_store8((iter_base) + 36, (1)) + + let ptr681 = mbt_ffi_str2ptr(payload680) + mbt_ffi_store32((iter_base) + 44, payload680.length()) + mbt_ffi_store32((iter_base) + 40, ptr681) + cleanup_list.push(ptr681) + () + } } - mbt_ffi_store32((iter_base) + 12, (payload249).length()) - mbt_ffi_store32((iter_base) + 8, address250) - cleanup_list.push(address250) () } - OptionValue(payload252) => { - mbt_ffi_store8((iter_base) + 0, (21)) + BinaryType(payload682) => { + mbt_ffi_store8((iter_base) + 0, (25)) - match (payload252) { + match ((payload682).mime_types) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload254) => { + Some(payload684) => { mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload254) + + let address686 = mbt_ffi_malloc((payload684).length() * 8); + for index687 = 0; index687 < (payload684).length(); index687 = index687 + 1 { + let iter_elem : String = (payload684)[(index687)] + let iter_base = address686 + (index687 * 8); + + let ptr685 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr685) + cleanup_list.push(ptr685) + + } + mbt_ffi_store32((iter_base) + 16, (payload684).length()) + mbt_ffi_store32((iter_base) + 12, address686) + cleanup_list.push(address686) () } } - () - } - ResultValue(payload255) => { - mbt_ffi_store8((iter_base) + 0, (22)) + match ((payload682).min_bytes) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) - match payload255 { - OkValue(payload256) => { - mbt_ffi_store8((iter_base) + 8, (0)) + () + } + Some(payload689) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload689).reinterpret_as_int()) - match (payload256) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + () + } + } - () - } - Some(payload258) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload258) + match ((payload682).max_bytes) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) - () - } - } + () + } + Some(payload691) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload691).reinterpret_as_int()) () } - ErrValue(payload259) => { - mbt_ffi_store8((iter_base) + 8, (1)) + } - match (payload259) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + () + } + PathType(payload692) => { + mbt_ffi_store8((iter_base) + 0, (26)) + mbt_ffi_store8((iter_base) + 8, (payload692).direction.ordinal()) + mbt_ffi_store8((iter_base) + 9, (payload692).kind.ordinal()) - () - } - Some(payload261) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload261) + match ((payload692).allowed_mime_types) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload694) => { + mbt_ffi_store8((iter_base) + 12, (1)) + + let address696 = mbt_ffi_malloc((payload694).length() * 8); + for index697 = 0; index697 < (payload694).length(); index697 = index697 + 1 { + let iter_elem : String = (payload694)[(index697)] + let iter_base = address696 + (index697 * 8); + + let ptr695 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr695) + cleanup_list.push(ptr695) - () - } } + mbt_ffi_store32((iter_base) + 20, (payload694).length()) + mbt_ffi_store32((iter_base) + 16, address696) + cleanup_list.push(address696) () } } - () - } - TextValue(payload262) => { - mbt_ffi_store8((iter_base) + 0, (23)) - - let ptr263 = mbt_ffi_str2ptr((payload262).text) - mbt_ffi_store32((iter_base) + 12, (payload262).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr263) - - match ((payload262).language) { + match ((payload692).allowed_extensions) { None => { - mbt_ffi_store8((iter_base) + 16, (0)) + mbt_ffi_store8((iter_base) + 24, (0)) () } - Some(payload265) => { - mbt_ffi_store8((iter_base) + 16, (1)) + Some(payload699) => { + mbt_ffi_store8((iter_base) + 24, (1)) - let ptr266 = mbt_ffi_str2ptr(payload265) - mbt_ffi_store32((iter_base) + 24, payload265.length()) - mbt_ffi_store32((iter_base) + 20, ptr266) - cleanup_list.push(ptr266) + let address701 = mbt_ffi_malloc((payload699).length() * 8); + for index702 = 0; index702 < (payload699).length(); index702 = index702 + 1 { + let iter_elem : String = (payload699)[(index702)] + let iter_base = address701 + (index702 * 8); + + let ptr700 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr700) + cleanup_list.push(ptr700) + + } + mbt_ffi_store32((iter_base) + 32, (payload699).length()) + mbt_ffi_store32((iter_base) + 28, address701) + cleanup_list.push(address701) () } } - cleanup_list.push(ptr263) () } - BinaryValue(payload267) => { - mbt_ffi_store8((iter_base) + 0, (24)) - - let ptr268 = mbt_ffi_bytes2ptr((payload267).bytes) - - mbt_ffi_store32((iter_base) + 12, (payload267).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr268) + UrlType(payload703) => { + mbt_ffi_store8((iter_base) + 0, (27)) - match ((payload267).mime_type) { + match ((payload703).allowed_schemes) { None => { - mbt_ffi_store8((iter_base) + 16, (0)) + mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload270) => { - mbt_ffi_store8((iter_base) + 16, (1)) + Some(payload705) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address707 = mbt_ffi_malloc((payload705).length() * 8); + for index708 = 0; index708 < (payload705).length(); index708 = index708 + 1 { + let iter_elem : String = (payload705)[(index708)] + let iter_base = address707 + (index708 * 8); + + let ptr706 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr706) + cleanup_list.push(ptr706) - let ptr271 = mbt_ffi_str2ptr(payload270) - mbt_ffi_store32((iter_base) + 24, payload270.length()) - mbt_ffi_store32((iter_base) + 20, ptr271) - cleanup_list.push(ptr271) + } + mbt_ffi_store32((iter_base) + 16, (payload705).length()) + mbt_ffi_store32((iter_base) + 12, address707) + cleanup_list.push(address707) () } } - cleanup_list.push(ptr268) - () - } - PathValue(payload272) => { - mbt_ffi_store8((iter_base) + 0, (25)) + match ((payload703).allowed_hosts) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) - let ptr273 = mbt_ffi_str2ptr(payload272) - mbt_ffi_store32((iter_base) + 12, payload272.length()) - mbt_ffi_store32((iter_base) + 8, ptr273) - cleanup_list.push(ptr273) + () + } + Some(payload710) => { + mbt_ffi_store8((iter_base) + 20, (1)) - () - } - UrlValue(payload274) => { - mbt_ffi_store8((iter_base) + 0, (26)) + let address712 = mbt_ffi_malloc((payload710).length() * 8); + for index713 = 0; index713 < (payload710).length(); index713 = index713 + 1 { + let iter_elem : String = (payload710)[(index713)] + let iter_base = address712 + (index713 * 8); - let ptr275 = mbt_ffi_str2ptr(payload274) - mbt_ffi_store32((iter_base) + 12, payload274.length()) - mbt_ffi_store32((iter_base) + 8, ptr275) - cleanup_list.push(ptr275) + let ptr711 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr711) + cleanup_list.push(ptr711) - () - } - DatetimeValue(payload276) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload276).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload276).nanoseconds).reinterpret_as_int()) + } + mbt_ffi_store32((iter_base) + 28, (payload710).length()) + mbt_ffi_store32((iter_base) + 24, address712) + cleanup_list.push(address712) + + () + } + } () } - DurationValue(payload277) => { + DatetimeType => { mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload277).nanoseconds) () } - QuantityValueNode(payload278) => { + DurationType => { mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload278).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload278).scale) - - let ptr279 = mbt_ffi_str2ptr((payload278).unit) - mbt_ffi_store32((iter_base) + 24, (payload278).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr279) - cleanup_list.push(ptr279) () } - UnionValue(payload280) => { + QuantityType(payload716) => { mbt_ffi_store8((iter_base) + 0, (30)) - let ptr281 = mbt_ffi_str2ptr((payload280).tag) - mbt_ffi_store32((iter_base) + 12, (payload280).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr281) - mbt_ffi_store32((iter_base) + 16, (payload280).body) - cleanup_list.push(ptr281) + let ptr717 = mbt_ffi_str2ptr((payload716).base_unit) + mbt_ffi_store32((iter_base) + 12, (payload716).base_unit.length()) + mbt_ffi_store32((iter_base) + 8, ptr717) + + let address719 = mbt_ffi_malloc(((payload716).allowed_suffixes).length() * 8); + for index720 = 0; index720 < ((payload716).allowed_suffixes).length(); index720 = index720 + 1 { + let iter_elem : String = ((payload716).allowed_suffixes)[(index720)] + let iter_base = address719 + (index720 * 8); + + let ptr718 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr718) + cleanup_list.push(ptr718) + + } + mbt_ffi_store32((iter_base) + 20, ((payload716).allowed_suffixes).length()) + mbt_ffi_store32((iter_base) + 16, address719) + + match ((payload716).min) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload722) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload722).mantissa) + mbt_ffi_store32((iter_base) + 40, (payload722).scale) + + let ptr723 = mbt_ffi_str2ptr((payload722).unit) + mbt_ffi_store32((iter_base) + 48, (payload722).unit.length()) + mbt_ffi_store32((iter_base) + 44, ptr723) + cleanup_list.push(ptr723) - () - } - SecretValue(payload282) => { - mbt_ffi_store8((iter_base) + 0, (31)) + () + } + } - let ptr283 = mbt_ffi_str2ptr((payload282).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload282).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr283) - cleanup_list.push(ptr283) + match ((payload716).max) { + None => { + mbt_ffi_store8((iter_base) + 56, (0)) - () - } - QuotaTokenHandle(payload284) => { - mbt_ffi_store8((iter_base) + 0, (32)) + () + } + Some(payload725) => { + mbt_ffi_store8((iter_base) + 56, (1)) + mbt_ffi_store64((iter_base) + 64, (payload725).mantissa) + mbt_ffi_store32((iter_base) + 72, (payload725).scale) - let @types.QuotaToken(handle) = payload284 - mbt_ffi_store32((iter_base) + 8, handle) + let ptr726 = mbt_ffi_str2ptr((payload725).unit) + mbt_ffi_store32((iter_base) + 80, (payload725).unit.length()) + mbt_ffi_store32((iter_base) + 76, ptr726) + cleanup_list.push(ptr726) + + () + } + } + cleanup_list.push(ptr717) + cleanup_list.push(address719) () } - } + UnionType(payload727) => { + mbt_ffi_store8((iter_base) + 0, (31)) - } - mbt_ffi_store32((return_area) + 32, (((request).value).value_nodes).length()) - mbt_ffi_store32((return_area) + 28, address285) - mbt_ffi_store32((return_area) + 36, ((request).value).root) + let address763 = mbt_ffi_malloc(((payload727).branches).length() * 92); + for index764 = 0; index764 < ((payload727).branches).length(); index764 = index764 + 1 { + let iter_elem : @types.UnionBranch = ((payload727).branches)[(index764)] + let iter_base = address763 + (index764 * 92); - let address498 = mbt_ffi_malloc((((response).graph).type_nodes).length() * 144); - for index499 = 0; index499 < (((response).graph).type_nodes).length(); index499 = index499 + 1 { - let iter_elem : @types.SchemaTypeNode = (((response).graph).type_nodes)[(index499)] - let iter_base = address498 + (index499 * 144); + let ptr728 = mbt_ffi_str2ptr((iter_elem).tag) + mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) + mbt_ffi_store32((iter_base) + 0, ptr728) + mbt_ffi_store32((iter_base) + 8, (iter_elem).body) - match (iter_elem).body { - RefType(payload287) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store32((iter_base) + 8, payload287) + match (iter_elem).discriminator { + Prefix(payload729) => { + mbt_ffi_store8((iter_base) + 12, (0)) - () - } - BoolType => { - mbt_ffi_store8((iter_base) + 0, (1)) + let ptr730 = mbt_ffi_str2ptr(payload729) + mbt_ffi_store32((iter_base) + 20, payload729.length()) + mbt_ffi_store32((iter_base) + 16, ptr730) + cleanup_list.push(ptr730) - () - } - S8Type => { - mbt_ffi_store8((iter_base) + 0, (2)) + () + } + Suffix(payload731) => { + mbt_ffi_store8((iter_base) + 12, (1)) - () - } - S16Type => { - mbt_ffi_store8((iter_base) + 0, (3)) + let ptr732 = mbt_ffi_str2ptr(payload731) + mbt_ffi_store32((iter_base) + 20, payload731.length()) + mbt_ffi_store32((iter_base) + 16, ptr732) + cleanup_list.push(ptr732) - () - } - S32Type => { - mbt_ffi_store8((iter_base) + 0, (4)) + () + } + Contains(payload733) => { + mbt_ffi_store8((iter_base) + 12, (2)) - () - } - S64Type => { - mbt_ffi_store8((iter_base) + 0, (5)) + let ptr734 = mbt_ffi_str2ptr(payload733) + mbt_ffi_store32((iter_base) + 20, payload733.length()) + mbt_ffi_store32((iter_base) + 16, ptr734) + cleanup_list.push(ptr734) - () - } - U8Type => { - mbt_ffi_store8((iter_base) + 0, (6)) + () + } + Regex(payload735) => { + mbt_ffi_store8((iter_base) + 12, (3)) - () - } - U16Type => { - mbt_ffi_store8((iter_base) + 0, (7)) + let ptr736 = mbt_ffi_str2ptr(payload735) + mbt_ffi_store32((iter_base) + 20, payload735.length()) + mbt_ffi_store32((iter_base) + 16, ptr736) + cleanup_list.push(ptr736) - () - } - U32Type => { - mbt_ffi_store8((iter_base) + 0, (8)) + () + } + FieldEquals(payload737) => { + mbt_ffi_store8((iter_base) + 12, (4)) - () - } - U64Type => { - mbt_ffi_store8((iter_base) + 0, (9)) + let ptr738 = mbt_ffi_str2ptr((payload737).field_name) + mbt_ffi_store32((iter_base) + 20, (payload737).field_name.length()) + mbt_ffi_store32((iter_base) + 16, ptr738) - () - } - F32Type => { - mbt_ffi_store8((iter_base) + 0, (10)) + match ((payload737).literal) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) - () - } - F64Type => { - mbt_ffi_store8((iter_base) + 0, (11)) + () + } + Some(payload740) => { + mbt_ffi_store8((iter_base) + 24, (1)) - () - } - CharType => { - mbt_ffi_store8((iter_base) + 0, (12)) + let ptr741 = mbt_ffi_str2ptr(payload740) + mbt_ffi_store32((iter_base) + 32, payload740.length()) + mbt_ffi_store32((iter_base) + 28, ptr741) + cleanup_list.push(ptr741) - () - } - StringType => { - mbt_ffi_store8((iter_base) + 0, (13)) + () + } + } + cleanup_list.push(ptr738) - () - } - RecordType(payload301) => { - mbt_ffi_store8((iter_base) + 0, (14)) + () + } + FieldAbsent(payload742) => { + mbt_ffi_store8((iter_base) + 12, (5)) - let address322 = mbt_ffi_malloc((payload301).length() * 68); - for index323 = 0; index323 < (payload301).length(); index323 = index323 + 1 { - let iter_elem : @types.NamedFieldType = (payload301)[(index323)] - let iter_base = address322 + (index323 * 68); + let ptr743 = mbt_ffi_str2ptr(payload742) + mbt_ffi_store32((iter_base) + 20, payload742.length()) + mbt_ffi_store32((iter_base) + 16, ptr743) + cleanup_list.push(ptr743) - let ptr302 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr302) - mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + () + } + } match (((iter_elem).metadata).doc) { None => { - mbt_ffi_store8((iter_base) + 12, (0)) + mbt_ffi_store8((iter_base) + 36, (0)) () } - Some(payload304) => { - mbt_ffi_store8((iter_base) + 12, (1)) + Some(payload745) => { + mbt_ffi_store8((iter_base) + 36, (1)) - let ptr305 = mbt_ffi_str2ptr(payload304) - mbt_ffi_store32((iter_base) + 20, payload304.length()) - mbt_ffi_store32((iter_base) + 16, ptr305) - cleanup_list.push(ptr305) + let ptr746 = mbt_ffi_str2ptr(payload745) + mbt_ffi_store32((iter_base) + 44, payload745.length()) + mbt_ffi_store32((iter_base) + 40, ptr746) + cleanup_list.push(ptr746) () } } - let address307 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index308 = 0; index308 < (((iter_elem).metadata).aliases).length(); index308 = index308 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index308)] - let iter_base = address307 + (index308 * 8); + let address748 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index749 = 0; index749 < (((iter_elem).metadata).aliases).length(); index749 = index749 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index749)] + let iter_base = address748 + (index749 * 8); - let ptr306 = mbt_ffi_str2ptr(iter_elem) + let ptr747 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr306) - cleanup_list.push(ptr306) + mbt_ffi_store32((iter_base) + 0, ptr747) + cleanup_list.push(ptr747) } - mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 24, address307) + mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 48, address748) - let address310 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index311 = 0; index311 < (((iter_elem).metadata).examples).length(); index311 = index311 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index311)] - let iter_base = address310 + (index311 * 8); + let address751 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index752 = 0; index752 < (((iter_elem).metadata).examples).length(); index752 = index752 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index752)] + let iter_base = address751 + (index752 * 8); - let ptr309 = mbt_ffi_str2ptr(iter_elem) + let ptr750 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr309) - cleanup_list.push(ptr309) + mbt_ffi_store32((iter_base) + 0, ptr750) + cleanup_list.push(ptr750) } - mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 32, address310) + mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 56, address751) match (((iter_elem).metadata).deprecated) { None => { - mbt_ffi_store8((iter_base) + 40, (0)) + mbt_ffi_store8((iter_base) + 64, (0)) () } - Some(payload313) => { - mbt_ffi_store8((iter_base) + 40, (1)) + Some(payload754) => { + mbt_ffi_store8((iter_base) + 64, (1)) - let ptr314 = mbt_ffi_str2ptr(payload313) - mbt_ffi_store32((iter_base) + 48, payload313.length()) - mbt_ffi_store32((iter_base) + 44, ptr314) - cleanup_list.push(ptr314) + let ptr755 = mbt_ffi_str2ptr(payload754) + mbt_ffi_store32((iter_base) + 72, payload754.length()) + mbt_ffi_store32((iter_base) + 68, ptr755) + cleanup_list.push(ptr755) () } @@ -2026,36 +4810,36 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty match (((iter_elem).metadata).role) { None => { - mbt_ffi_store8((iter_base) + 52, (0)) + mbt_ffi_store8((iter_base) + 76, (0)) () } - Some(payload316) => { - mbt_ffi_store8((iter_base) + 52, (1)) + Some(payload757) => { + mbt_ffi_store8((iter_base) + 76, (1)) - match payload316 { + match payload757 { Multimodal => { - mbt_ffi_store8((iter_base) + 56, (0)) + mbt_ffi_store8((iter_base) + 80, (0)) () } UnstructuredText => { - mbt_ffi_store8((iter_base) + 56, (1)) + mbt_ffi_store8((iter_base) + 80, (1)) () } UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 56, (2)) + mbt_ffi_store8((iter_base) + 80, (2)) () } - Other(payload320) => { - mbt_ffi_store8((iter_base) + 56, (3)) + Other(payload761) => { + mbt_ffi_store8((iter_base) + 80, (3)) - let ptr321 = mbt_ffi_str2ptr(payload320) - mbt_ffi_store32((iter_base) + 64, payload320.length()) - mbt_ffi_store32((iter_base) + 60, ptr321) - cleanup_list.push(ptr321) + let ptr762 = mbt_ffi_str2ptr(payload761) + mbt_ffi_store32((iter_base) + 88, payload761.length()) + mbt_ffi_store32((iter_base) + 84, ptr762) + cleanup_list.push(ptr762) () } @@ -2064,469 +4848,471 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty () } } - cleanup_list.push(ptr302) - cleanup_list.push(address307) - cleanup_list.push(address310) + cleanup_list.push(ptr728) + cleanup_list.push(address748) + cleanup_list.push(address751) } - mbt_ffi_store32((iter_base) + 12, (payload301).length()) - mbt_ffi_store32((iter_base) + 8, address322) - cleanup_list.push(address322) + mbt_ffi_store32((iter_base) + 12, ((payload727).branches).length()) + mbt_ffi_store32((iter_base) + 8, address763) + cleanup_list.push(address763) () } - VariantType(payload324) => { - mbt_ffi_store8((iter_base) + 0, (15)) - - let address347 = mbt_ffi_malloc((payload324).length() * 72); - for index348 = 0; index348 < (payload324).length(); index348 = index348 + 1 { - let iter_elem : @types.VariantCaseType = (payload324)[(index348)] - let iter_base = address347 + (index348 * 72); + SecretType(payload765) => { + mbt_ffi_store8((iter_base) + 0, (32)) - let ptr325 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr325) + match ((payload765).category) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - match ((iter_elem).payload) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + () + } + Some(payload767) => { + mbt_ffi_store8((iter_base) + 8, (1)) - () - } - Some(payload327) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload327) + let ptr768 = mbt_ffi_str2ptr(payload767) + mbt_ffi_store32((iter_base) + 16, payload767.length()) + mbt_ffi_store32((iter_base) + 12, ptr768) + cleanup_list.push(ptr768) - () - } + () } + } - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + () + } + QuotaTokenType(payload769) => { + mbt_ffi_store8((iter_base) + 0, (33)) - () - } - Some(payload329) => { - mbt_ffi_store8((iter_base) + 16, (1)) + match ((payload769).resource_name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload771) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let ptr330 = mbt_ffi_str2ptr(payload329) - mbt_ffi_store32((iter_base) + 24, payload329.length()) - mbt_ffi_store32((iter_base) + 20, ptr330) - cleanup_list.push(ptr330) + let ptr772 = mbt_ffi_str2ptr(payload771) + mbt_ffi_store32((iter_base) + 16, payload771.length()) + mbt_ffi_store32((iter_base) + 12, ptr772) + cleanup_list.push(ptr772) - () - } + () } + } - let address332 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index333 = 0; index333 < (((iter_elem).metadata).aliases).length(); index333 = index333 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index333)] - let iter_base = address332 + (index333 * 8); + () + } + FutureType(payload773) => { + mbt_ffi_store8((iter_base) + 0, (34)) - let ptr331 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr331) - cleanup_list.push(ptr331) + match (payload773) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + () } - mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 28, address332) + Some(payload775) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload775) + + () + } + } - let address335 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index336 = 0; index336 < (((iter_elem).metadata).examples).length(); index336 = index336 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index336)] - let iter_base = address335 + (index336 * 8); + () + } + StreamType(payload776) => { + mbt_ffi_store8((iter_base) + 0, (35)) - let ptr334 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr334) - cleanup_list.push(ptr334) + match (payload776) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + () } - mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 36, address335) + Some(payload778) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload778) - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 44, (0)) + () + } + } - () - } - Some(payload338) => { - mbt_ffi_store8((iter_base) + 44, (1)) + () + } + } - let ptr339 = mbt_ffi_str2ptr(payload338) - mbt_ffi_store32((iter_base) + 52, payload338.length()) - mbt_ffi_store32((iter_base) + 48, ptr339) - cleanup_list.push(ptr339) + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 88, (0)) - () - } - } + () + } + Some(payload780) => { + mbt_ffi_store8((iter_base) + 88, (1)) - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 56, (0)) + let ptr781 = mbt_ffi_str2ptr(payload780) + mbt_ffi_store32((iter_base) + 96, payload780.length()) + mbt_ffi_store32((iter_base) + 92, ptr781) + cleanup_list.push(ptr781) - () - } - Some(payload341) => { - mbt_ffi_store8((iter_base) + 56, (1)) + () + } + } - match payload341 { - Multimodal => { - mbt_ffi_store8((iter_base) + 60, (0)) + let address783 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index784 = 0; index784 < (((iter_elem).metadata).aliases).length(); index784 = index784 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index784)] + let iter_base = address783 + (index784 * 8); - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 60, (1)) + let ptr782 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr782) + cleanup_list.push(ptr782) - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 60, (2)) + } + mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 100, address783) + + let address786 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index787 = 0; index787 < (((iter_elem).metadata).examples).length(); index787 = index787 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index787)] + let iter_base = address786 + (index787 * 8); + + let ptr785 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr785) + cleanup_list.push(ptr785) + + } + mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 108, address786) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 116, (0)) + + () + } + Some(payload789) => { + mbt_ffi_store8((iter_base) + 116, (1)) + + let ptr790 = mbt_ffi_str2ptr(payload789) + mbt_ffi_store32((iter_base) + 124, payload789.length()) + mbt_ffi_store32((iter_base) + 120, ptr790) + cleanup_list.push(ptr790) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 128, (0)) + + () + } + Some(payload792) => { + mbt_ffi_store8((iter_base) + 128, (1)) - () - } - Other(payload345) => { - mbt_ffi_store8((iter_base) + 60, (3)) + match payload792 { + Multimodal => { + mbt_ffi_store8((iter_base) + 132, (0)) - let ptr346 = mbt_ffi_str2ptr(payload345) - mbt_ffi_store32((iter_base) + 68, payload345.length()) - mbt_ffi_store32((iter_base) + 64, ptr346) - cleanup_list.push(ptr346) + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 132, (1)) - () - } - } + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 132, (2)) - () - } + () } - cleanup_list.push(ptr325) - cleanup_list.push(address332) - cleanup_list.push(address335) + Other(payload796) => { + mbt_ffi_store8((iter_base) + 132, (3)) + let ptr797 = mbt_ffi_str2ptr(payload796) + mbt_ffi_store32((iter_base) + 140, payload796.length()) + mbt_ffi_store32((iter_base) + 136, ptr797) + cleanup_list.push(ptr797) + + () + } } - mbt_ffi_store32((iter_base) + 12, (payload324).length()) - mbt_ffi_store32((iter_base) + 8, address347) - cleanup_list.push(address347) () } - EnumType(payload349) => { - mbt_ffi_store8((iter_base) + 0, (16)) + } + cleanup_list.push(address783) + cleanup_list.push(address786) - let address351 = mbt_ffi_malloc((payload349).length() * 8); - for index352 = 0; index352 < (payload349).length(); index352 = index352 + 1 { - let iter_elem : String = (payload349)[(index352)] - let iter_base = address351 + (index352 * 8); + } + mbt_ffi_store32((return_area) + 44, (((response).graph).type_nodes).length()) + mbt_ffi_store32((return_area) + 40, address798) - let ptr350 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr350) - cleanup_list.push(ptr350) + let address804 = mbt_ffi_malloc((((response).graph).defs).length() * 24); + for index805 = 0; index805 < (((response).graph).defs).length(); index805 = index805 + 1 { + let iter_elem : @types.SchemaTypeDef = (((response).graph).defs)[(index805)] + let iter_base = address804 + (index805 * 24); - } - mbt_ffi_store32((iter_base) + 12, (payload349).length()) - mbt_ffi_store32((iter_base) + 8, address351) - cleanup_list.push(address351) + let ptr800 = mbt_ffi_str2ptr((iter_elem).id) + mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) + mbt_ffi_store32((iter_base) + 0, ptr800) + + match ((iter_elem).name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) () } - FlagsType(payload353) => { - mbt_ffi_store8((iter_base) + 0, (17)) - - let address355 = mbt_ffi_malloc((payload353).length() * 8); - for index356 = 0; index356 < (payload353).length(); index356 = index356 + 1 { - let iter_elem : String = (payload353)[(index356)] - let iter_base = address355 + (index356 * 8); - - let ptr354 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr354) - cleanup_list.push(ptr354) + Some(payload802) => { + mbt_ffi_store8((iter_base) + 8, (1)) - } - mbt_ffi_store32((iter_base) + 12, (payload353).length()) - mbt_ffi_store32((iter_base) + 8, address355) - cleanup_list.push(address355) + let ptr803 = mbt_ffi_str2ptr(payload802) + mbt_ffi_store32((iter_base) + 16, payload802.length()) + mbt_ffi_store32((iter_base) + 12, ptr803) + cleanup_list.push(ptr803) () } - TupleType(payload357) => { - mbt_ffi_store8((iter_base) + 0, (18)) + } + mbt_ffi_store32((iter_base) + 20, (iter_elem).body) + cleanup_list.push(ptr800) - let address358 = mbt_ffi_malloc((payload357).length() * 4); - for index359 = 0; index359 < (payload357).length(); index359 = index359 + 1 { - let iter_elem : Int = (payload357)[(index359)] - let iter_base = address358 + (index359 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + } + mbt_ffi_store32((return_area) + 52, (((response).graph).defs).length()) + mbt_ffi_store32((return_area) + 48, address804) + mbt_ffi_store32((return_area) + 56, ((response).graph).root) - } - mbt_ffi_store32((iter_base) + 12, (payload357).length()) - mbt_ffi_store32((iter_base) + 8, address358) - cleanup_list.push(address358) + let address876 = mbt_ffi_malloc((((response).value).value_nodes).length() * 32); + for index877 = 0; index877 < (((response).value).value_nodes).length(); index877 = index877 + 1 { + let iter_elem : @types.SchemaValueNode = (((response).value).value_nodes)[(index877)] + let iter_base = address876 + (index877 * 32); + + match iter_elem { + BoolValue(payload806) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload806 { 1 } else { 0 })) () } - ListType(payload360) => { - mbt_ffi_store8((iter_base) + 0, (19)) - mbt_ffi_store32((iter_base) + 8, payload360) + S8Value(payload807) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload807)) () } - FixedListType(payload361) => { - mbt_ffi_store8((iter_base) + 0, (20)) - mbt_ffi_store32((iter_base) + 8, (payload361).element) - mbt_ffi_store32((iter_base) + 12, ((payload361).length).reinterpret_as_int()) + S16Value(payload808) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload808)) () } - MapType(payload362) => { - mbt_ffi_store8((iter_base) + 0, (21)) - mbt_ffi_store32((iter_base) + 8, (payload362).key) - mbt_ffi_store32((iter_base) + 12, (payload362).value) + S32Value(payload809) => { + mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload809) () } - OptionType(payload363) => { - mbt_ffi_store8((iter_base) + 0, (22)) - mbt_ffi_store32((iter_base) + 8, payload363) + S64Value(payload810) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload810) () } - ResultType(payload364) => { - mbt_ffi_store8((iter_base) + 0, (23)) - - match ((payload364).ok) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) - - () - } - Some(payload366) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload366) + U8Value(payload811) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload811).to_int()) - () - } - } + () + } + U16Value(payload812) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload812).reinterpret_as_int()) - match ((payload364).err) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + () + } + U32Value(payload813) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload813).reinterpret_as_int()) - () - } - Some(payload368) => { - mbt_ffi_store8((iter_base) + 16, (1)) - mbt_ffi_store32((iter_base) + 20, payload368) + () + } + U64Value(payload814) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload814).reinterpret_as_int64()) - () - } - } + () + } + F32Value(payload815) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload815) () } - TextType(payload369) => { - mbt_ffi_store8((iter_base) + 0, (24)) + F64Value(payload816) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload816) - match ((payload369).languages) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + () + } + CharValue(payload817) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload817).to_int()) - () - } - Some(payload371) => { - mbt_ffi_store8((iter_base) + 8, (1)) + () + } + StringValue(payload818) => { + mbt_ffi_store8((iter_base) + 0, (12)) - let address373 = mbt_ffi_malloc((payload371).length() * 8); - for index374 = 0; index374 < (payload371).length(); index374 = index374 + 1 { - let iter_elem : String = (payload371)[(index374)] - let iter_base = address373 + (index374 * 8); + let ptr819 = mbt_ffi_str2ptr(payload818) + mbt_ffi_store32((iter_base) + 12, payload818.length()) + mbt_ffi_store32((iter_base) + 8, ptr819) + cleanup_list.push(ptr819) - let ptr372 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr372) - cleanup_list.push(ptr372) + () + } + RecordValue(payload820) => { + mbt_ffi_store8((iter_base) + 0, (13)) - } - mbt_ffi_store32((iter_base) + 16, (payload371).length()) - mbt_ffi_store32((iter_base) + 12, address373) - cleanup_list.push(address373) + let address821 = mbt_ffi_malloc((payload820).length() * 4); + for index822 = 0; index822 < (payload820).length(); index822 = index822 + 1 { + let iter_elem : Int = (payload820)[(index822)] + let iter_base = address821 + (index822 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - () - } } + mbt_ffi_store32((iter_base) + 12, (payload820).length()) + mbt_ffi_store32((iter_base) + 8, address821) + cleanup_list.push(address821) - match ((payload369).min_length) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) - - () - } - Some(payload376) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload376).reinterpret_as_int()) - - () - } - } + () + } + VariantValue(payload823) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload823).case).reinterpret_as_int()) - match ((payload369).max_length) { + match ((payload823).payload) { None => { - mbt_ffi_store8((iter_base) + 28, (0)) + mbt_ffi_store8((iter_base) + 12, (0)) () } - Some(payload378) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload378).reinterpret_as_int()) + Some(payload825) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload825) () } } - match ((payload369).regex) { - None => { - mbt_ffi_store8((iter_base) + 36, (0)) + () + } + EnumValue(payload826) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload826).reinterpret_as_int()) - () - } - Some(payload380) => { - mbt_ffi_store8((iter_base) + 36, (1)) + () + } + FlagsValue(payload827) => { + mbt_ffi_store8((iter_base) + 0, (16)) - let ptr381 = mbt_ffi_str2ptr(payload380) - mbt_ffi_store32((iter_base) + 44, payload380.length()) - mbt_ffi_store32((iter_base) + 40, ptr381) - cleanup_list.push(ptr381) + let address828 = mbt_ffi_malloc((payload827).length() * 1); + for index829 = 0; index829 < (payload827).length(); index829 = index829 + 1 { + let iter_elem : Bool = (payload827)[(index829)] + let iter_base = address828 + (index829 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) - () - } } + mbt_ffi_store32((iter_base) + 12, (payload827).length()) + mbt_ffi_store32((iter_base) + 8, address828) + cleanup_list.push(address828) () } - BinaryType(payload382) => { - mbt_ffi_store8((iter_base) + 0, (25)) - - match ((payload382).mime_types) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) - - () - } - Some(payload384) => { - mbt_ffi_store8((iter_base) + 8, (1)) - - let address386 = mbt_ffi_malloc((payload384).length() * 8); - for index387 = 0; index387 < (payload384).length(); index387 = index387 + 1 { - let iter_elem : String = (payload384)[(index387)] - let iter_base = address386 + (index387 * 8); - - let ptr385 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr385) - cleanup_list.push(ptr385) + TupleValue(payload830) => { + mbt_ffi_store8((iter_base) + 0, (17)) - } - mbt_ffi_store32((iter_base) + 16, (payload384).length()) - mbt_ffi_store32((iter_base) + 12, address386) - cleanup_list.push(address386) + let address831 = mbt_ffi_malloc((payload830).length() * 4); + for index832 = 0; index832 < (payload830).length(); index832 = index832 + 1 { + let iter_elem : Int = (payload830)[(index832)] + let iter_base = address831 + (index832 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - () - } } + mbt_ffi_store32((iter_base) + 12, (payload830).length()) + mbt_ffi_store32((iter_base) + 8, address831) + cleanup_list.push(address831) - match ((payload382).min_bytes) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + () + } + ListValue(payload833) => { + mbt_ffi_store8((iter_base) + 0, (18)) - () - } - Some(payload389) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload389).reinterpret_as_int()) + let address834 = mbt_ffi_malloc((payload833).length() * 4); + for index835 = 0; index835 < (payload833).length(); index835 = index835 + 1 { + let iter_elem : Int = (payload833)[(index835)] + let iter_base = address834 + (index835 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - () - } } + mbt_ffi_store32((iter_base) + 12, (payload833).length()) + mbt_ffi_store32((iter_base) + 8, address834) + cleanup_list.push(address834) - match ((payload382).max_bytes) { - None => { - mbt_ffi_store8((iter_base) + 28, (0)) + () + } + FixedListValue(payload836) => { + mbt_ffi_store8((iter_base) + 0, (19)) - () - } - Some(payload391) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload391).reinterpret_as_int()) + let address837 = mbt_ffi_malloc((payload836).length() * 4); + for index838 = 0; index838 < (payload836).length(); index838 = index838 + 1 { + let iter_elem : Int = (payload836)[(index838)] + let iter_base = address837 + (index838 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - () - } } + mbt_ffi_store32((iter_base) + 12, (payload836).length()) + mbt_ffi_store32((iter_base) + 8, address837) + cleanup_list.push(address837) () } - PathType(payload392) => { - mbt_ffi_store8((iter_base) + 0, (26)) - mbt_ffi_store8((iter_base) + 8, (payload392).direction.ordinal()) - mbt_ffi_store8((iter_base) + 9, (payload392).kind.ordinal()) - - match ((payload392).allowed_mime_types) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) - - () - } - Some(payload394) => { - mbt_ffi_store8((iter_base) + 12, (1)) - - let address396 = mbt_ffi_malloc((payload394).length() * 8); - for index397 = 0; index397 < (payload394).length(); index397 = index397 + 1 { - let iter_elem : String = (payload394)[(index397)] - let iter_base = address396 + (index397 * 8); - - let ptr395 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr395) - cleanup_list.push(ptr395) + MapValue(payload839) => { + mbt_ffi_store8((iter_base) + 0, (20)) - } - mbt_ffi_store32((iter_base) + 20, (payload394).length()) - mbt_ffi_store32((iter_base) + 16, address396) - cleanup_list.push(address396) + let address840 = mbt_ffi_malloc((payload839).length() * 8); + for index841 = 0; index841 < (payload839).length(); index841 = index841 + 1 { + let iter_elem : @types.MapEntry = (payload839)[(index841)] + let iter_base = address840 + (index841 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) - () - } } + mbt_ffi_store32((iter_base) + 12, (payload839).length()) + mbt_ffi_store32((iter_base) + 8, address840) + cleanup_list.push(address840) - match ((payload392).allowed_extensions) { + () + } + OptionValue(payload842) => { + mbt_ffi_store8((iter_base) + 0, (21)) + + match (payload842) { None => { - mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload399) => { - mbt_ffi_store8((iter_base) + 24, (1)) - - let address401 = mbt_ffi_malloc((payload399).length() * 8); - for index402 = 0; index402 < (payload399).length(); index402 = index402 + 1 { - let iter_elem : String = (payload399)[(index402)] - let iter_base = address401 + (index402 * 8); - - let ptr400 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr400) - cleanup_list.push(ptr400) - - } - mbt_ffi_store32((iter_base) + 32, (payload399).length()) - mbt_ffi_store32((iter_base) + 28, address401) - cleanup_list.push(address401) + Some(payload844) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload844) () } @@ -2534,1130 +5320,1024 @@ pub fn persist_durable_function_invocation(function_name : String, request : @ty () } - UrlType(payload403) => { - mbt_ffi_store8((iter_base) + 0, (27)) + ResultValue(payload845) => { + mbt_ffi_store8((iter_base) + 0, (22)) - match ((payload403).allowed_schemes) { - None => { + match payload845 { + OkValue(payload846) => { mbt_ffi_store8((iter_base) + 8, (0)) - () - } - Some(payload405) => { - mbt_ffi_store8((iter_base) + 8, (1)) - - let address407 = mbt_ffi_malloc((payload405).length() * 8); - for index408 = 0; index408 < (payload405).length(); index408 = index408 + 1 { - let iter_elem : String = (payload405)[(index408)] - let iter_base = address407 + (index408 * 8); + match (payload846) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - let ptr406 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr406) - cleanup_list.push(ptr406) + () + } + Some(payload848) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload848) + () + } } - mbt_ffi_store32((iter_base) + 16, (payload405).length()) - mbt_ffi_store32((iter_base) + 12, address407) - cleanup_list.push(address407) - - () - } - } - - match ((payload403).allowed_hosts) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) () } - Some(payload410) => { - mbt_ffi_store8((iter_base) + 20, (1)) + ErrValue(payload849) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let address412 = mbt_ffi_malloc((payload410).length() * 8); - for index413 = 0; index413 < (payload410).length(); index413 = index413 + 1 { - let iter_elem : String = (payload410)[(index413)] - let iter_base = address412 + (index413 * 8); + match (payload849) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - let ptr411 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr411) - cleanup_list.push(ptr411) + () + } + Some(payload851) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload851) + () + } } - mbt_ffi_store32((iter_base) + 28, (payload410).length()) - mbt_ffi_store32((iter_base) + 24, address412) - cleanup_list.push(address412) () } - } - - () - } - DatetimeType => { - mbt_ffi_store8((iter_base) + 0, (28)) - - () - } - DurationType => { - mbt_ffi_store8((iter_base) + 0, (29)) + } () } - QuantityType(payload416) => { - mbt_ffi_store8((iter_base) + 0, (30)) - - let ptr417 = mbt_ffi_str2ptr((payload416).base_unit) - mbt_ffi_store32((iter_base) + 12, (payload416).base_unit.length()) - mbt_ffi_store32((iter_base) + 8, ptr417) - - let address419 = mbt_ffi_malloc(((payload416).allowed_suffixes).length() * 8); - for index420 = 0; index420 < ((payload416).allowed_suffixes).length(); index420 = index420 + 1 { - let iter_elem : String = ((payload416).allowed_suffixes)[(index420)] - let iter_base = address419 + (index420 * 8); - - let ptr418 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr418) - cleanup_list.push(ptr418) + TextValue(payload852) => { + mbt_ffi_store8((iter_base) + 0, (23)) - } - mbt_ffi_store32((iter_base) + 20, ((payload416).allowed_suffixes).length()) - mbt_ffi_store32((iter_base) + 16, address419) + let ptr853 = mbt_ffi_str2ptr((payload852).text) + mbt_ffi_store32((iter_base) + 12, (payload852).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr853) - match ((payload416).min) { + match ((payload852).language) { None => { - mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store8((iter_base) + 16, (0)) () } - Some(payload422) => { - mbt_ffi_store8((iter_base) + 24, (1)) - mbt_ffi_store64((iter_base) + 32, (payload422).mantissa) - mbt_ffi_store32((iter_base) + 40, (payload422).scale) + Some(payload855) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let ptr423 = mbt_ffi_str2ptr((payload422).unit) - mbt_ffi_store32((iter_base) + 48, (payload422).unit.length()) - mbt_ffi_store32((iter_base) + 44, ptr423) - cleanup_list.push(ptr423) + let ptr856 = mbt_ffi_str2ptr(payload855) + mbt_ffi_store32((iter_base) + 24, payload855.length()) + mbt_ffi_store32((iter_base) + 20, ptr856) + cleanup_list.push(ptr856) () } } + cleanup_list.push(ptr853) + + () + } + BinaryValue(payload857) => { + mbt_ffi_store8((iter_base) + 0, (24)) - match ((payload416).max) { + let ptr858 = mbt_ffi_bytes2ptr((payload857).bytes) + + mbt_ffi_store32((iter_base) + 12, (payload857).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr858) + + match ((payload857).mime_type) { None => { - mbt_ffi_store8((iter_base) + 56, (0)) + mbt_ffi_store8((iter_base) + 16, (0)) () } - Some(payload425) => { - mbt_ffi_store8((iter_base) + 56, (1)) - mbt_ffi_store64((iter_base) + 64, (payload425).mantissa) - mbt_ffi_store32((iter_base) + 72, (payload425).scale) + Some(payload860) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let ptr426 = mbt_ffi_str2ptr((payload425).unit) - mbt_ffi_store32((iter_base) + 80, (payload425).unit.length()) - mbt_ffi_store32((iter_base) + 76, ptr426) - cleanup_list.push(ptr426) + let ptr861 = mbt_ffi_str2ptr(payload860) + mbt_ffi_store32((iter_base) + 24, payload860.length()) + mbt_ffi_store32((iter_base) + 20, ptr861) + cleanup_list.push(ptr861) () } } - cleanup_list.push(ptr417) - cleanup_list.push(address419) + cleanup_list.push(ptr858) () } - UnionType(payload427) => { - mbt_ffi_store8((iter_base) + 0, (31)) + PathValue(payload862) => { + mbt_ffi_store8((iter_base) + 0, (25)) - let address463 = mbt_ffi_malloc(((payload427).branches).length() * 92); - for index464 = 0; index464 < ((payload427).branches).length(); index464 = index464 + 1 { - let iter_elem : @types.UnionBranch = ((payload427).branches)[(index464)] - let iter_base = address463 + (index464 * 92); + let ptr863 = mbt_ffi_str2ptr(payload862) + mbt_ffi_store32((iter_base) + 12, payload862.length()) + mbt_ffi_store32((iter_base) + 8, ptr863) + cleanup_list.push(ptr863) - let ptr428 = mbt_ffi_str2ptr((iter_elem).tag) - mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) - mbt_ffi_store32((iter_base) + 0, ptr428) - mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + () + } + UrlValue(payload864) => { + mbt_ffi_store8((iter_base) + 0, (26)) - match (iter_elem).discriminator { - Prefix(payload429) => { - mbt_ffi_store8((iter_base) + 12, (0)) + let ptr865 = mbt_ffi_str2ptr(payload864) + mbt_ffi_store32((iter_base) + 12, payload864.length()) + mbt_ffi_store32((iter_base) + 8, ptr865) + cleanup_list.push(ptr865) - let ptr430 = mbt_ffi_str2ptr(payload429) - mbt_ffi_store32((iter_base) + 20, payload429.length()) - mbt_ffi_store32((iter_base) + 16, ptr430) - cleanup_list.push(ptr430) + () + } + DatetimeValue(payload866) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload866).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload866).nanoseconds).reinterpret_as_int()) - () - } - Suffix(payload431) => { - mbt_ffi_store8((iter_base) + 12, (1)) + () + } + DurationValue(payload867) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload867).nanoseconds) - let ptr432 = mbt_ffi_str2ptr(payload431) - mbt_ffi_store32((iter_base) + 20, payload431.length()) - mbt_ffi_store32((iter_base) + 16, ptr432) - cleanup_list.push(ptr432) + () + } + QuantityValueNode(payload868) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload868).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload868).scale) - () - } - Contains(payload433) => { - mbt_ffi_store8((iter_base) + 12, (2)) + let ptr869 = mbt_ffi_str2ptr((payload868).unit) + mbt_ffi_store32((iter_base) + 24, (payload868).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr869) + cleanup_list.push(ptr869) - let ptr434 = mbt_ffi_str2ptr(payload433) - mbt_ffi_store32((iter_base) + 20, payload433.length()) - mbt_ffi_store32((iter_base) + 16, ptr434) - cleanup_list.push(ptr434) + () + } + UnionValue(payload870) => { + mbt_ffi_store8((iter_base) + 0, (30)) - () - } - Regex(payload435) => { - mbt_ffi_store8((iter_base) + 12, (3)) + let ptr871 = mbt_ffi_str2ptr((payload870).tag) + mbt_ffi_store32((iter_base) + 12, (payload870).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr871) + mbt_ffi_store32((iter_base) + 16, (payload870).body) + cleanup_list.push(ptr871) - let ptr436 = mbt_ffi_str2ptr(payload435) - mbt_ffi_store32((iter_base) + 20, payload435.length()) - mbt_ffi_store32((iter_base) + 16, ptr436) - cleanup_list.push(ptr436) + () + } + SecretValue(payload872) => { + mbt_ffi_store8((iter_base) + 0, (31)) - () - } - FieldEquals(payload437) => { - mbt_ffi_store8((iter_base) + 12, (4)) + let ptr873 = mbt_ffi_str2ptr((payload872).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload872).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr873) + cleanup_list.push(ptr873) - let ptr438 = mbt_ffi_str2ptr((payload437).field_name) - mbt_ffi_store32((iter_base) + 20, (payload437).field_name.length()) - mbt_ffi_store32((iter_base) + 16, ptr438) + () + } + QuotaTokenHandle(payload874) => { + mbt_ffi_store8((iter_base) + 0, (32)) - match ((payload437).literal) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + let @types.QuotaToken(handle875) = payload874 + mbt_ffi_store32((iter_base) + 8, handle875) - () - } - Some(payload440) => { - mbt_ffi_store8((iter_base) + 24, (1)) + () + } + } - let ptr441 = mbt_ffi_str2ptr(payload440) - mbt_ffi_store32((iter_base) + 32, payload440.length()) - mbt_ffi_store32((iter_base) + 28, ptr441) - cleanup_list.push(ptr441) + } + mbt_ffi_store32((return_area) + 64, (((response).value).value_nodes).length()) + mbt_ffi_store32((return_area) + 60, address876) + mbt_ffi_store32((return_area) + 68, ((response).value).root) - () - } - } - cleanup_list.push(ptr438) + match function_type { + ReadLocal => { + mbt_ffi_store8((return_area) + 72, (0)) - () - } - FieldAbsent(payload442) => { - mbt_ffi_store8((iter_base) + 12, (5)) + () + } + WriteLocal => { + mbt_ffi_store8((return_area) + 72, (1)) - let ptr443 = mbt_ffi_str2ptr(payload442) - mbt_ffi_store32((iter_base) + 20, payload442.length()) - mbt_ffi_store32((iter_base) + 16, ptr443) - cleanup_list.push(ptr443) + () + } + ReadRemote => { + mbt_ffi_store8((return_area) + 72, (2)) - () - } - } + () + } + WriteRemote => { + mbt_ffi_store8((return_area) + 72, (3)) - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 36, (0)) + () + } + WriteRemoteBatched(payload882) => { + mbt_ffi_store8((return_area) + 72, (4)) - () - } - Some(payload445) => { - mbt_ffi_store8((iter_base) + 36, (1)) + match (payload882) { + None => { + mbt_ffi_store8((return_area) + 80, (0)) - let ptr446 = mbt_ffi_str2ptr(payload445) - mbt_ffi_store32((iter_base) + 44, payload445.length()) - mbt_ffi_store32((iter_base) + 40, ptr446) - cleanup_list.push(ptr446) + () + } + Some(payload884) => { + mbt_ffi_store8((return_area) + 80, (1)) + mbt_ffi_store64((return_area) + 88, (payload884).reinterpret_as_int64()) - () - } - } + () + } + } - let address448 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index449 = 0; index449 < (((iter_elem).metadata).aliases).length(); index449 = index449 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index449)] - let iter_base = address448 + (index449 * 8); + () + } + WriteRemoteTransaction(payload885) => { + mbt_ffi_store8((return_area) + 72, (5)) - let ptr447 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr447) - cleanup_list.push(ptr447) + match (payload885) { + None => { + mbt_ffi_store8((return_area) + 80, (0)) - } - mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 48, address448) + () + } + Some(payload887) => { + mbt_ffi_store8((return_area) + 80, (1)) + mbt_ffi_store64((return_area) + 88, (payload887).reinterpret_as_int64()) + + () + } + } - let address451 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index452 = 0; index452 < (((iter_elem).metadata).examples).length(); index452 = index452 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index452)] - let iter_base = address451 + (index452 * 8); + () + } + } + wasmImportPersistDurableFunctionInvocation(return_area); + mbt_ffi_free(return_area) + mbt_ffi_free(ptr) + mbt_ffi_free(address358) + mbt_ffi_free(address364) + mbt_ffi_free(address435) + mbt_ffi_free(address798) + mbt_ffi_free(address804) + mbt_ffi_free(address876) - let ptr450 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr450) - cleanup_list.push(ptr450) + cleanup_list.each(mbt_ffi_free) - } - mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 56, address451) +} +///| +/// Reads the next persisted durable function invocation from the oplog during replay +pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionInvocation { - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 64, (0)) + let return_area = mbt_ffi_malloc(88) + wasmImportReadPersistedDurableFunctionInvocation(return_area); - () - } - Some(payload454) => { - mbt_ffi_store8((iter_base) + 64, (1)) + let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) - let ptr455 = mbt_ffi_str2ptr(payload454) - mbt_ffi_store32((iter_base) + 72, payload454.length()) - mbt_ffi_store32((iter_base) + 68, ptr455) - cleanup_list.push(ptr455) + let array193 : Array[@types.SchemaTypeNode] = []; + for index194 = 0; index194 < (mbt_ffi_load32((return_area) + 28)); index194 = index194 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 24)) + (index194 * 144) - () - } - } + let lifted179 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 76, (0)) + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { - () - } - Some(payload457) => { - mbt_ffi_store8((iter_base) + 76, (1)) + @types.SchemaTypeBody::BoolType + } + 2 => { - match payload457 { - Multimodal => { - mbt_ffi_store8((iter_base) + 80, (0)) + let lifted5 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 80, (1)) + let lifted0 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 80, (2)) + let lifted = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - Other(payload461) => { - mbt_ffi_store8((iter_base) + 80, (3)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let ptr462 = mbt_ffi_str2ptr(payload461) - mbt_ffi_store32((iter_base) + 88, payload461.length()) - mbt_ffi_store32((iter_base) + 84, ptr462) - cleanup_list.push(ptr462) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - } - () + Option::Some(lifted) + } + _ => panic() } - } - cleanup_list.push(ptr428) - cleanup_list.push(address448) - cleanup_list.push(address451) - } - mbt_ffi_store32((iter_base) + 12, ((payload427).branches).length()) - mbt_ffi_store32((iter_base) + 8, address463) - cleanup_list.push(address463) + let lifted2 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - SecretType(payload465) => { - mbt_ffi_store8((iter_base) + 0, (32)) + let lifted1 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - match ((payload465).category) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - Some(payload467) => { - mbt_ffi_store8((iter_base) + 8, (1)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let ptr468 = mbt_ffi_str2ptr(payload467) - mbt_ffi_store32((iter_base) + 16, payload467.length()) - mbt_ffi_store32((iter_base) + 12, ptr468) - cleanup_list.push(ptr468) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () + Option::Some(lifted1) + } + _ => panic() + } + + let lifted4 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result3 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result3) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted0, max : lifted2, unit : lifted4}) } + _ => panic() } - () + @types.SchemaTypeBody::S8Type(lifted5) } - QuotaTokenType(payload469) => { - mbt_ffi_store8((iter_base) + 0, (33)) + 3 => { - match ((payload469).resource_name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted12 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - Some(payload471) => { - mbt_ffi_store8((iter_base) + 8, (1)) + let lifted7 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let ptr472 = mbt_ffi_str2ptr(payload471) - mbt_ffi_store32((iter_base) + 16, payload471.length()) - mbt_ffi_store32((iter_base) + 12, ptr472) - cleanup_list.push(ptr472) + let lifted6 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - FutureType(payload473) => { - mbt_ffi_store8((iter_base) + 0, (34)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - match (payload473) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload475) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload475) + Option::Some(lifted6) + } + _ => panic() + } - () - } - } + let lifted9 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - StreamType(payload476) => { - mbt_ffi_store8((iter_base) + 0, (35)) + let lifted8 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - match (payload476) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - Some(payload478) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload478) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - } + Option::Some(lifted8) + } + _ => panic() + } - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 88, (0)) + let lifted11 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - Some(payload480) => { - mbt_ffi_store8((iter_base) + 88, (1)) + let result10 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result10) + } + _ => panic() + } - let ptr481 = mbt_ffi_str2ptr(payload480) - mbt_ffi_store32((iter_base) + 96, payload480.length()) - mbt_ffi_store32((iter_base) + 92, ptr481) - cleanup_list.push(ptr481) + Option::Some(@types.NumericRestrictions::{min : lifted7, max : lifted9, unit : lifted11}) + } + _ => panic() + } - () + @types.SchemaTypeBody::S16Type(lifted12) } - } - - let address483 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index484 = 0; index484 < (((iter_elem).metadata).aliases).length(); index484 = index484 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index484)] - let iter_base = address483 + (index484 * 8); + 4 => { - let ptr482 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr482) - cleanup_list.push(ptr482) + let lifted19 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 100, address483) + let lifted14 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let address486 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index487 = 0; index487 < (((iter_elem).metadata).examples).length(); index487 = index487 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index487)] - let iter_base = address486 + (index487 * 8); + let lifted13 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let ptr485 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr485) - cleanup_list.push(ptr485) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - } - mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 108, address486) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 116, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload489) => { - mbt_ffi_store8((iter_base) + 116, (1)) + Option::Some(lifted13) + } + _ => panic() + } - let ptr490 = mbt_ffi_str2ptr(payload489) - mbt_ffi_store32((iter_base) + 124, payload489.length()) - mbt_ffi_store32((iter_base) + 120, ptr490) - cleanup_list.push(ptr490) + let lifted16 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - } + let lifted15 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 128, (0)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - Some(payload492) => { - mbt_ffi_store8((iter_base) + 128, (1)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - match payload492 { - Multimodal => { - mbt_ffi_store8((iter_base) + 132, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 132, (1)) + Option::Some(lifted15) + } + _ => panic() + } - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 132, (2)) + let lifted18 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - Other(payload496) => { - mbt_ffi_store8((iter_base) + 132, (3)) + let result17 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let ptr497 = mbt_ffi_str2ptr(payload496) - mbt_ffi_store32((iter_base) + 140, payload496.length()) - mbt_ffi_store32((iter_base) + 136, ptr497) - cleanup_list.push(ptr497) + Option::Some(result17) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{min : lifted14, max : lifted16, unit : lifted18}) } + _ => panic() } - () + @types.SchemaTypeBody::S32Type(lifted19) } - } - cleanup_list.push(address483) - cleanup_list.push(address486) + 5 => { - } - mbt_ffi_store32((return_area) + 44, (((response).graph).type_nodes).length()) - mbt_ffi_store32((return_area) + 40, address498) + let lifted26 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let address504 = mbt_ffi_malloc((((response).graph).defs).length() * 24); - for index505 = 0; index505 < (((response).graph).defs).length(); index505 = index505 + 1 { - let iter_elem : @types.SchemaTypeDef = (((response).graph).defs)[(index505)] - let iter_base = address504 + (index505 * 24); + let lifted21 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let ptr500 = mbt_ffi_str2ptr((iter_elem).id) - mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) - mbt_ffi_store32((iter_base) + 0, ptr500) + let lifted20 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - match ((iter_elem).name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - Some(payload502) => { - mbt_ffi_store8((iter_base) + 8, (1)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let ptr503 = mbt_ffi_str2ptr(payload502) - mbt_ffi_store32((iter_base) + 16, payload502.length()) - mbt_ffi_store32((iter_base) + 12, ptr503) - cleanup_list.push(ptr503) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - } - mbt_ffi_store32((iter_base) + 20, (iter_elem).body) - cleanup_list.push(ptr500) + Option::Some(lifted20) + } + _ => panic() + } - } - mbt_ffi_store32((return_area) + 52, (((response).graph).defs).length()) - mbt_ffi_store32((return_area) + 48, address504) - mbt_ffi_store32((return_area) + 56, ((response).graph).root) + let lifted23 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let address576 = mbt_ffi_malloc((((response).value).value_nodes).length() * 32); - for index577 = 0; index577 < (((response).value).value_nodes).length(); index577 = index577 + 1 { - let iter_elem : @types.SchemaValueNode = (((response).value).value_nodes)[(index577)] - let iter_base = address576 + (index577 * 32); + let lifted22 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - match iter_elem { - BoolValue(payload506) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload506 { 1 } else { 0 })) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - S8Value(payload507) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload507)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - S16Value(payload508) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload508)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - S32Value(payload509) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload509) + Option::Some(lifted22) + } + _ => panic() + } - () - } - S64Value(payload510) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload510) + let lifted25 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - U8Value(payload511) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload511).to_int()) + let result24 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - U16Value(payload512) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload512).reinterpret_as_int()) + Option::Some(result24) + } + _ => panic() + } - () - } - U32Value(payload513) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload513).reinterpret_as_int()) + Option::Some(@types.NumericRestrictions::{min : lifted21, max : lifted23, unit : lifted25}) + } + _ => panic() + } - () + @types.SchemaTypeBody::S64Type(lifted26) } - U64Value(payload514) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload514).reinterpret_as_int64()) + 6 => { - () - } - F32Value(payload515) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload515) + let lifted33 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - F64Value(payload516) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload516) + let lifted28 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - CharValue(payload517) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload517).to_int()) + let lifted27 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - StringValue(payload518) => { - mbt_ffi_store8((iter_base) + 0, (12)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let ptr519 = mbt_ffi_str2ptr(payload518) - mbt_ffi_store32((iter_base) + 12, payload518.length()) - mbt_ffi_store32((iter_base) + 8, ptr519) - cleanup_list.push(ptr519) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - RecordValue(payload520) => { - mbt_ffi_store8((iter_base) + 0, (13)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let address521 = mbt_ffi_malloc((payload520).length() * 4); - for index522 = 0; index522 < (payload520).length(); index522 = index522 + 1 { - let iter_elem : Int = (payload520)[(index522)] - let iter_base = address521 + (index522 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + Option::Some(lifted27) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload520).length()) - mbt_ffi_store32((iter_base) + 8, address521) - cleanup_list.push(address521) + let lifted30 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - VariantValue(payload523) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload523).case).reinterpret_as_int()) + let lifted29 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - match ((payload523).payload) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - Some(payload525) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload525) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - EnumValue(payload526) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload526).reinterpret_as_int()) + Option::Some(lifted29) + } + _ => panic() + } - () - } - FlagsValue(payload527) => { - mbt_ffi_store8((iter_base) + 0, (16)) + let lifted32 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let address528 = mbt_ffi_malloc((payload527).length() * 1); - for index529 = 0; index529 < (payload527).length(); index529 = index529 + 1 { - let iter_elem : Bool = (payload527)[(index529)] - let iter_base = address528 + (index529 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + let result31 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result31) + } + _ => panic() + } + Option::Some(@types.NumericRestrictions::{min : lifted28, max : lifted30, unit : lifted32}) + } + _ => panic() } - mbt_ffi_store32((iter_base) + 12, (payload527).length()) - mbt_ffi_store32((iter_base) + 8, address528) - cleanup_list.push(address528) - () + @types.SchemaTypeBody::U8Type(lifted33) } - TupleValue(payload530) => { - mbt_ffi_store8((iter_base) + 0, (17)) + 7 => { - let address531 = mbt_ffi_malloc((payload530).length() * 4); - for index532 = 0; index532 < (payload530).length(); index532 = index532 + 1 { - let iter_elem : Int = (payload530)[(index532)] - let iter_base = address531 + (index532 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted40 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload530).length()) - mbt_ffi_store32((iter_base) + 8, address531) - cleanup_list.push(address531) + let lifted35 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - ListValue(payload533) => { - mbt_ffi_store8((iter_base) + 0, (18)) + let lifted34 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let address534 = mbt_ffi_malloc((payload533).length() * 4); - for index535 = 0; index535 < (payload533).length(); index535 = index535 + 1 { - let iter_elem : Int = (payload533)[(index535)] - let iter_base = address534 + (index535 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload533).length()) - mbt_ffi_store32((iter_base) + 8, address534) - cleanup_list.push(address534) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - FixedListValue(payload536) => { - mbt_ffi_store8((iter_base) + 0, (19)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let address537 = mbt_ffi_malloc((payload536).length() * 4); - for index538 = 0; index538 < (payload536).length(); index538 = index538 + 1 { - let iter_elem : Int = (payload536)[(index538)] - let iter_base = address537 + (index538 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + Option::Some(lifted34) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload536).length()) - mbt_ffi_store32((iter_base) + 8, address537) - cleanup_list.push(address537) + let lifted37 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - MapValue(payload539) => { - mbt_ffi_store8((iter_base) + 0, (20)) + let lifted36 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let address540 = mbt_ffi_malloc((payload539).length() * 8); - for index541 = 0; index541 < (payload539).length(); index541 = index541 + 1 { - let iter_elem : @types.MapEntry = (payload539)[(index541)] - let iter_base = address540 + (index541 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload539).length()) - mbt_ffi_store32((iter_base) + 8, address540) - cleanup_list.push(address540) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - OptionValue(payload542) => { - mbt_ffi_store8((iter_base) + 0, (21)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - match (payload542) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + Option::Some(lifted36) + } + _ => panic() + } - () - } - Some(payload544) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload544) + let lifted39 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () + let result38 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result38) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted35, max : lifted37, unit : lifted39}) } + _ => panic() } - () + @types.SchemaTypeBody::U16Type(lifted40) } - ResultValue(payload545) => { - mbt_ffi_store8((iter_base) + 0, (22)) - - match payload545 { - OkValue(payload546) => { - mbt_ffi_store8((iter_base) + 8, (0)) + 8 => { - match (payload546) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let lifted47 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - Some(payload548) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload548) + let lifted42 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - } + let lifted41 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - ErrValue(payload549) => { - mbt_ffi_store8((iter_base) + 8, (1)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - match (payload549) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - Some(payload551) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload551) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () + Option::Some(lifted41) } + _ => panic() } - () - } - } + let lifted44 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - TextValue(payload552) => { - mbt_ffi_store8((iter_base) + 0, (23)) + let lifted43 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let ptr553 = mbt_ffi_str2ptr((payload552).text) - mbt_ffi_store32((iter_base) + 12, (payload552).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr553) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - match ((payload552).language) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - Some(payload555) => { - mbt_ffi_store8((iter_base) + 16, (1)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted43) + } + _ => panic() + } - let ptr556 = mbt_ffi_str2ptr(payload555) - mbt_ffi_store32((iter_base) + 24, payload555.length()) - mbt_ffi_store32((iter_base) + 20, ptr556) - cleanup_list.push(ptr556) + let lifted46 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () + let result45 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result45) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted42, max : lifted44, unit : lifted46}) } + _ => panic() } - cleanup_list.push(ptr553) - () + @types.SchemaTypeBody::U32Type(lifted47) } - BinaryValue(payload557) => { - mbt_ffi_store8((iter_base) + 0, (24)) + 9 => { - let ptr558 = mbt_ffi_bytes2ptr((payload557).bytes) + let lifted54 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - mbt_ffi_store32((iter_base) + 12, (payload557).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr558) + let lifted49 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - match ((payload557).mime_type) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + let lifted48 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - Some(payload560) => { - mbt_ffi_store8((iter_base) + 16, (1)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let ptr561 = mbt_ffi_str2ptr(payload560) - mbt_ffi_store32((iter_base) + 24, payload560.length()) - mbt_ffi_store32((iter_base) + 20, ptr561) - cleanup_list.push(ptr561) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - } - cleanup_list.push(ptr558) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - PathValue(payload562) => { - mbt_ffi_store8((iter_base) + 0, (25)) + Option::Some(lifted48) + } + _ => panic() + } - let ptr563 = mbt_ffi_str2ptr(payload562) - mbt_ffi_store32((iter_base) + 12, payload562.length()) - mbt_ffi_store32((iter_base) + 8, ptr563) - cleanup_list.push(ptr563) + let lifted51 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - UrlValue(payload564) => { - mbt_ffi_store8((iter_base) + 0, (26)) + let lifted50 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let ptr565 = mbt_ffi_str2ptr(payload564) - mbt_ffi_store32((iter_base) + 12, payload564.length()) - mbt_ffi_store32((iter_base) + 8, ptr565) - cleanup_list.push(ptr565) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - DatetimeValue(payload566) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload566).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload566).nanoseconds).reinterpret_as_int()) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - DurationValue(payload567) => { - mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload567).nanoseconds) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - QuantityValueNode(payload568) => { - mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload568).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload568).scale) + Option::Some(lifted50) + } + _ => panic() + } - let ptr569 = mbt_ffi_str2ptr((payload568).unit) - mbt_ffi_store32((iter_base) + 24, (payload568).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr569) - cleanup_list.push(ptr569) + let lifted53 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - UnionValue(payload570) => { - mbt_ffi_store8((iter_base) + 0, (30)) + let result52 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let ptr571 = mbt_ffi_str2ptr((payload570).tag) - mbt_ffi_store32((iter_base) + 12, (payload570).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr571) - mbt_ffi_store32((iter_base) + 16, (payload570).body) - cleanup_list.push(ptr571) + Option::Some(result52) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{min : lifted49, max : lifted51, unit : lifted53}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted54) } - SecretValue(payload572) => { - mbt_ffi_store8((iter_base) + 0, (31)) + 10 => { - let ptr573 = mbt_ffi_str2ptr((payload572).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload572).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr573) - cleanup_list.push(ptr573) + let lifted61 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - QuotaTokenHandle(payload574) => { - mbt_ffi_store8((iter_base) + 0, (32)) + let lifted56 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let @types.QuotaToken(handle575) = payload574 - mbt_ffi_store32((iter_base) + 8, handle575) + let lifted55 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - } - mbt_ffi_store32((return_area) + 64, (((response).value).value_nodes).length()) - mbt_ffi_store32((return_area) + 60, address576) - mbt_ffi_store32((return_area) + 68, ((response).value).root) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - match function_type { - ReadLocal => { - mbt_ffi_store8((return_area) + 72, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - WriteLocal => { - mbt_ffi_store8((return_area) + 72, (1)) + Option::Some(lifted55) + } + _ => panic() + } - () - } - ReadRemote => { - mbt_ffi_store8((return_area) + 72, (2)) + let lifted58 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - WriteRemote => { - mbt_ffi_store8((return_area) + 72, (3)) + let lifted57 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - WriteRemoteBatched(payload582) => { - mbt_ffi_store8((return_area) + 72, (4)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - match (payload582) { - None => { - mbt_ffi_store8((return_area) + 80, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - Some(payload584) => { - mbt_ffi_store8((return_area) + 80, (1)) - mbt_ffi_store64((return_area) + 88, (payload584).reinterpret_as_int64()) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - } + Option::Some(lifted57) + } + _ => panic() + } - () - } - WriteRemoteTransaction(payload585) => { - mbt_ffi_store8((return_area) + 72, (5)) + let lifted60 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - match (payload585) { - None => { - mbt_ffi_store8((return_area) + 80, (0)) + let result59 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - Some(payload587) => { - mbt_ffi_store8((return_area) + 80, (1)) - mbt_ffi_store64((return_area) + 88, (payload587).reinterpret_as_int64()) + Option::Some(result59) + } + _ => panic() + } - () + Option::Some(@types.NumericRestrictions::{min : lifted56, max : lifted58, unit : lifted60}) + } + _ => panic() } - } - () - } - } - wasmImportPersistDurableFunctionInvocation(return_area); - mbt_ffi_free(return_area) - mbt_ffi_free(ptr) - mbt_ffi_free(address208) - mbt_ffi_free(address214) - mbt_ffi_free(address285) - mbt_ffi_free(address498) - mbt_ffi_free(address504) - mbt_ffi_free(address576) + @types.SchemaTypeBody::F32Type(lifted61) + } + 11 => { - cleanup_list.each(mbt_ffi_free) + let lifted68 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { -} -///| -/// Reads the next persisted durable function invocation from the oplog during replay -pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionInvocation { + let lifted63 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let return_area = mbt_ffi_malloc(88) - wasmImportReadPersistedDurableFunctionInvocation(return_area); + let lifted62 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let array123 : Array[@types.SchemaTypeNode] = []; - for index124 = 0; index124 < (mbt_ffi_load32((return_area) + 28)); index124 = index124 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 24)) + (index124 * 144) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted109 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { + Option::Some(lifted62) + } + _ => panic() + } - @types.SchemaTypeBody::BoolType - } - 2 => { + let lifted65 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S8Type - } - 3 => { + let lifted64 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::S16Type - } - 4 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U8Type - } - 7 => { + Option::Some(lifted64) + } + _ => panic() + } - @types.SchemaTypeBody::U16Type - } - 8 => { + let lifted67 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + let result66 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(result66) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + Option::Some(@types.NumericRestrictions::{min : lifted63, max : lifted65, unit : lifted67}) + } + _ => panic() + } - @types.SchemaTypeBody::F64Type + @types.SchemaTypeBody::F64Type(lifted68) } 12 => { @@ -3669,19 +6349,19 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } 14 => { - let array11 : Array[@types.NamedFieldType] = []; - for index12 = 0; index12 < (mbt_ffi_load32((iter_base) + 12)); index12 = index12 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index12 * 68) + let array81 : Array[@types.NamedFieldType] = []; + for index82 = 0; index82 < (mbt_ffi_load32((iter_base) + 12)); index82 = index82 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index82 * 68) - let result0 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result69 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted71 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result1 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result70 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result1) + Option::Some(result70) } _ => panic() } @@ -3690,38 +6370,38 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI for index = 0; index < (mbt_ffi_load32((iter_base) + 28)); index = index + 1 { let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index * 8) - let result2 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array.push(result2) + array.push(result72) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array4 : Array[String] = []; - for index5 = 0; index5 < (mbt_ffi_load32((iter_base) + 36)); index5 = index5 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index5 * 8) + let array74 : Array[String] = []; + for index75 = 0; index75 < (mbt_ffi_load32((iter_base) + 36)); index75 = index75 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index75 * 8) - let result3 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array4.push(result3) + array74.push(result73) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted7 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted77 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result6 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result76 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result6) + Option::Some(result76) } _ => panic() } - let lifted10 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted80 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted9 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted79 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -3736,33 +6416,33 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } 3 => { - let result8 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result8) + @types.Role::Other(result78) } _ => panic() } - Option::Some(lifted9) + Option::Some(lifted79) } _ => panic() } - array11.push(@types.NamedFieldType::{name : result0, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted, aliases : array, examples : array4, deprecated : lifted7, role : lifted10}}) + array81.push(@types.NamedFieldType::{name : result69, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted71, aliases : array, examples : array74, deprecated : lifted77, role : lifted80}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array11) + @types.SchemaTypeBody::RecordType(array81) } 15 => { - let array28 : Array[@types.VariantCaseType] = []; - for index29 = 0; index29 < (mbt_ffi_load32((iter_base) + 12)); index29 = index29 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index29 * 72) + let array98 : Array[@types.VariantCaseType] = []; + for index99 = 0; index99 < (mbt_ffi_load32((iter_base) + 12)); index99 = index99 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index99 * 72) - let result13 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted14 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted84 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -3771,53 +6451,53 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - let lifted16 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted86 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result15 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result15) + Option::Some(result85) } _ => panic() } - let array18 : Array[String] = []; - for index19 = 0; index19 < (mbt_ffi_load32((iter_base) + 32)); index19 = index19 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index19 * 8) + let array88 : Array[String] = []; + for index89 = 0; index89 < (mbt_ffi_load32((iter_base) + 32)); index89 = index89 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index89 * 8) - let result17 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array18.push(result17) + array88.push(result87) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array21 : Array[String] = []; - for index22 = 0; index22 < (mbt_ffi_load32((iter_base) + 40)); index22 = index22 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index22 * 8) + let array91 : Array[String] = []; + for index92 = 0; index92 < (mbt_ffi_load32((iter_base) + 40)); index92 = index92 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index92 * 8) - let result20 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array21.push(result20) + array91.push(result90) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted24 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted94 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result23 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result23) + Option::Some(result93) } _ => panic() } - let lifted27 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted97 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted26 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted96 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -3832,63 +6512,63 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } 3 => { - let result25 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result95 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result25) + @types.Role::Other(result95) } _ => panic() } - Option::Some(lifted26) + Option::Some(lifted96) } _ => panic() } - array28.push(@types.VariantCaseType::{name : result13, payload : lifted14, metadata : @types.MetadataEnvelope::{doc : lifted16, aliases : array18, examples : array21, deprecated : lifted24, role : lifted27}}) + array98.push(@types.VariantCaseType::{name : result83, payload : lifted84, metadata : @types.MetadataEnvelope::{doc : lifted86, aliases : array88, examples : array91, deprecated : lifted94, role : lifted97}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array28) + @types.SchemaTypeBody::VariantType(array98) } 16 => { - let array31 : Array[String] = []; - for index32 = 0; index32 < (mbt_ffi_load32((iter_base) + 12)); index32 = index32 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index32 * 8) + let array101 : Array[String] = []; + for index102 = 0; index102 < (mbt_ffi_load32((iter_base) + 12)); index102 = index102 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index102 * 8) - let result30 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result100 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array31.push(result30) + array101.push(result100) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array31) + @types.SchemaTypeBody::EnumType(array101) } 17 => { - let array34 : Array[String] = []; - for index35 = 0; index35 < (mbt_ffi_load32((iter_base) + 12)); index35 = index35 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index35 * 8) + let array104 : Array[String] = []; + for index105 = 0; index105 < (mbt_ffi_load32((iter_base) + 12)); index105 = index105 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index105 * 8) - let result33 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array34.push(result33) + array104.push(result103) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array34) + @types.SchemaTypeBody::FlagsType(array104) } 18 => { - let array36 : Array[Int] = []; - for index37 = 0; index37 < (mbt_ffi_load32((iter_base) + 12)); index37 = index37 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index37 * 4) + let array106 : Array[Int] = []; + for index107 = 0; index107 < (mbt_ffi_load32((iter_base) + 12)); index107 = index107 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index107 * 4) - array36.push(mbt_ffi_load32((iter_base) + 0)) + array106.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array36) + @types.SchemaTypeBody::TupleType(array106) } 19 => { @@ -3908,7 +6588,7 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } 23 => { - let lifted38 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted108 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -3917,7 +6597,7 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - let lifted39 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted109 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -3926,30 +6606,30 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted38, err : lifted39}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted108, err : lifted109}) } 24 => { - let lifted43 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted113 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array41 : Array[String] = []; - for index42 = 0; index42 < (mbt_ffi_load32((iter_base) + 16)); index42 = index42 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index42 * 8) + let array111 : Array[String] = []; + for index112 = 0; index112 < (mbt_ffi_load32((iter_base) + 16)); index112 = index112 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index112 * 8) - let result40 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array41.push(result40) + array111.push(result110) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array41) + Option::Some(array111) } _ => panic() } - let lifted44 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted114 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -3958,7 +6638,7 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - let lifted45 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted115 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -3967,41 +6647,41 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - let lifted47 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted117 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result46 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result116 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result46) + Option::Some(result116) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted43, min_length : lifted44, max_length : lifted45, regex : lifted47}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted113, min_length : lifted114, max_length : lifted115, regex : lifted117}) } 25 => { - let lifted51 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted121 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array49 : Array[String] = []; - for index50 = 0; index50 < (mbt_ffi_load32((iter_base) + 16)); index50 = index50 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index50 * 8) + let array119 : Array[String] = []; + for index120 = 0; index120 < (mbt_ffi_load32((iter_base) + 16)); index120 = index120 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index120 * 8) - let result48 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array49.push(result48) + array119.push(result118) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array49) + Option::Some(array119) } _ => panic() } - let lifted52 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted122 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -4010,7 +6690,7 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - let lifted53 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted123 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -4019,91 +6699,91 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted51, min_bytes : lifted52, max_bytes : lifted53}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted121, min_bytes : lifted122, max_bytes : lifted123}) } 26 => { - let lifted57 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted127 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array55 : Array[String] = []; - for index56 = 0; index56 < (mbt_ffi_load32((iter_base) + 20)); index56 = index56 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index56 * 8) + let array125 : Array[String] = []; + for index126 = 0; index126 < (mbt_ffi_load32((iter_base) + 20)); index126 = index126 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index126 * 8) - let result54 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result124 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array55.push(result54) + array125.push(result124) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array55) + Option::Some(array125) } _ => panic() } - let lifted61 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted131 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array59 : Array[String] = []; - for index60 = 0; index60 < (mbt_ffi_load32((iter_base) + 32)); index60 = index60 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index60 * 8) + let array129 : Array[String] = []; + for index130 = 0; index130 < (mbt_ffi_load32((iter_base) + 32)); index130 = index130 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index130 * 8) - let result58 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result128 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array59.push(result58) + array129.push(result128) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array59) + Option::Some(array129) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted57, allowed_extensions : lifted61}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted127, allowed_extensions : lifted131}) } 27 => { - let lifted65 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted135 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array63 : Array[String] = []; - for index64 = 0; index64 < (mbt_ffi_load32((iter_base) + 16)); index64 = index64 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index64 * 8) + let array133 : Array[String] = []; + for index134 = 0; index134 < (mbt_ffi_load32((iter_base) + 16)); index134 = index134 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index134 * 8) - let result62 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array63.push(result62) + array133.push(result132) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array63) + Option::Some(array133) } _ => panic() } - let lifted69 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted139 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array67 : Array[String] = []; - for index68 = 0; index68 < (mbt_ffi_load32((iter_base) + 28)); index68 = index68 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index68 * 8) + let array137 : Array[String] = []; + for index138 = 0; index138 < (mbt_ffi_load32((iter_base) + 28)); index138 = index138 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index138 * 8) - let result66 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result136 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array67.push(result66) + array137.push(result136) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array67) + Option::Some(array137) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted65, allowed_hosts : lifted69}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted135, allowed_hosts : lifted139}) } 28 => { @@ -4115,148 +6795,148 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } 30 => { - let result70 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result140 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array72 : Array[String] = []; - for index73 = 0; index73 < (mbt_ffi_load32((iter_base) + 20)); index73 = index73 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index73 * 8) + let array142 : Array[String] = []; + for index143 = 0; index143 < (mbt_ffi_load32((iter_base) + 20)); index143 = index143 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index143 * 8) - let result71 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array72.push(result71) + array142.push(result141) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted75 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted145 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result74 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result74}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result144}) } _ => panic() } - let lifted77 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted147 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result76 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result76}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result146}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result70, allowed_suffixes : array72, min : lifted75, max : lifted77}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result140, allowed_suffixes : array142, min : lifted145, max : lifted147}) } 31 => { - let array101 : Array[@types.UnionBranch] = []; - for index102 = 0; index102 < (mbt_ffi_load32((iter_base) + 12)); index102 = index102 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index102 * 92) + let array171 : Array[@types.UnionBranch] = []; + for index172 = 0; index172 < (mbt_ffi_load32((iter_base) + 12)); index172 = index172 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index172 * 92) - let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted87 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted157 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result79) + @types.DiscriminatorRule::Prefix(result149) } 1 => { - let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result80) + @types.DiscriminatorRule::Suffix(result150) } 2 => { - let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result81) + @types.DiscriminatorRule::Contains(result151) } 3 => { - let result82 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result82) + @types.DiscriminatorRule::Regex(result152) } 4 => { - let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted85 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted155 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result84 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result154 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result84) + Option::Some(result154) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result83, literal : lifted85}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result153, literal : lifted155}) } 5 => { - let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result86) + @types.DiscriminatorRule::FieldAbsent(result156) } _ => panic() } - let lifted89 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted159 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result88) + Option::Some(result158) } _ => panic() } - let array91 : Array[String] = []; - for index92 = 0; index92 < (mbt_ffi_load32((iter_base) + 52)); index92 = index92 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index92 * 8) + let array161 : Array[String] = []; + for index162 = 0; index162 < (mbt_ffi_load32((iter_base) + 52)); index162 = index162 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index162 * 8) - let result90 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result160 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array91.push(result90) + array161.push(result160) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array94 : Array[String] = []; - for index95 = 0; index95 < (mbt_ffi_load32((iter_base) + 60)); index95 = index95 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index95 * 8) + let array164 : Array[String] = []; + for index165 = 0; index165 < (mbt_ffi_load32((iter_base) + 60)); index165 = index165 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index165 * 8) - let result93 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result163 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array94.push(result93) + array164.push(result163) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted97 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted167 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result96 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result96) + Option::Some(result166) } _ => panic() } - let lifted100 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted170 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted99 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted169 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -4271,57 +6951,57 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } 3 => { - let result98 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result98) + @types.Role::Other(result168) } _ => panic() } - Option::Some(lifted99) + Option::Some(lifted169) } _ => panic() } - array101.push(@types.UnionBranch::{tag : result78, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted87, metadata : @types.MetadataEnvelope::{doc : lifted89, aliases : array91, examples : array94, deprecated : lifted97, role : lifted100}}) + array171.push(@types.UnionBranch::{tag : result148, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted157, metadata : @types.MetadataEnvelope::{doc : lifted159, aliases : array161, examples : array164, deprecated : lifted167, role : lifted170}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array101}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array171}) } 32 => { - let lifted104 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted174 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result103 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result173 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result103) + Option::Some(result173) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted104}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted174}) } 33 => { - let lifted106 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted176 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result105) + Option::Some(result175) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted106}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted176}) } 34 => { - let lifted107 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted177 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -4330,11 +7010,11 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - @types.SchemaTypeBody::FutureType(lifted107) + @types.SchemaTypeBody::FutureType(lifted177) } 35 => { - let lifted108 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted178 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -4343,58 +7023,58 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - @types.SchemaTypeBody::StreamType(lifted108) + @types.SchemaTypeBody::StreamType(lifted178) } _ => panic() } - let lifted111 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted181 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result110) + Option::Some(result180) } _ => panic() } - let array113 : Array[String] = []; - for index114 = 0; index114 < (mbt_ffi_load32((iter_base) + 104)); index114 = index114 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index114 * 8) + let array183 : Array[String] = []; + for index184 = 0; index184 < (mbt_ffi_load32((iter_base) + 104)); index184 = index184 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index184 * 8) - let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result182 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array113.push(result112) + array183.push(result182) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array116 : Array[String] = []; - for index117 = 0; index117 < (mbt_ffi_load32((iter_base) + 112)); index117 = index117 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index117 * 8) + let array186 : Array[String] = []; + for index187 = 0; index187 < (mbt_ffi_load32((iter_base) + 112)); index187 = index187 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index187 * 8) - let result115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array116.push(result115) + array186.push(result185) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted119 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted189 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result118 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result188 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result118) + Option::Some(result188) } _ => panic() } - let lifted122 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted192 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted121 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted191 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -4409,48 +7089,48 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } 3 => { - let result120 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result120) + @types.Role::Other(result190) } _ => panic() } - Option::Some(lifted121) + Option::Some(lifted191) } _ => panic() } - array123.push(@types.SchemaTypeNode::{body : lifted109, metadata : @types.MetadataEnvelope::{doc : lifted111, aliases : array113, examples : array116, deprecated : lifted119, role : lifted122}}) + array193.push(@types.SchemaTypeNode::{body : lifted179, metadata : @types.MetadataEnvelope::{doc : lifted181, aliases : array183, examples : array186, deprecated : lifted189, role : lifted192}}) } mbt_ffi_free(mbt_ffi_load32((return_area) + 24)) - let array128 : Array[@types.SchemaTypeDef] = []; - for index129 = 0; index129 < (mbt_ffi_load32((return_area) + 36)); index129 = index129 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index129 * 24) + let array198 : Array[@types.SchemaTypeDef] = []; + for index199 = 0; index199 < (mbt_ffi_load32((return_area) + 36)); index199 = index199 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index199 * 24) - let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted127 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted197 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result126) + Option::Some(result196) } _ => panic() } - array128.push(@types.SchemaTypeDef::{id : result125, name : lifted127, body : mbt_ffi_load32((iter_base) + 20)}) + array198.push(@types.SchemaTypeDef::{id : result195, name : lifted197, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) - let array160 : Array[@types.SchemaValueNode] = []; - for index161 = 0; index161 < (mbt_ffi_load32((return_area) + 48)); index161 = index161 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 44)) + (index161 * 32) + let array230 : Array[@types.SchemaValueNode] = []; + for index231 = 0; index231 < (mbt_ffi_load32((return_area) + 48)); index231 = index231 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 44)) + (index231 * 32) - let lifted159 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted229 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -4501,25 +7181,25 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } 12 => { - let result130 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result130) + @types.SchemaValueNode::StringValue(result200) } 13 => { - let array131 : Array[Int] = []; - for index132 = 0; index132 < (mbt_ffi_load32((iter_base) + 12)); index132 = index132 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index132 * 4) + let array201 : Array[Int] = []; + for index202 = 0; index202 < (mbt_ffi_load32((iter_base) + 12)); index202 = index202 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index202 * 4) - array131.push(mbt_ffi_load32((iter_base) + 0)) + array201.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array131) + @types.SchemaValueNode::RecordValue(array201) } 14 => { - let lifted133 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted203 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -4528,7 +7208,7 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted133}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted203}) } 15 => { @@ -4536,67 +7216,67 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } 16 => { - let array134 : Array[Bool] = []; - for index135 = 0; index135 < (mbt_ffi_load32((iter_base) + 12)); index135 = index135 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index135 * 1) + let array204 : Array[Bool] = []; + for index205 = 0; index205 < (mbt_ffi_load32((iter_base) + 12)); index205 = index205 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index205 * 1) - array134.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array204.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array134) + @types.SchemaValueNode::FlagsValue(array204) } 17 => { - let array136 : Array[Int] = []; - for index137 = 0; index137 < (mbt_ffi_load32((iter_base) + 12)); index137 = index137 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index137 * 4) + let array206 : Array[Int] = []; + for index207 = 0; index207 < (mbt_ffi_load32((iter_base) + 12)); index207 = index207 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index207 * 4) - array136.push(mbt_ffi_load32((iter_base) + 0)) + array206.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array136) + @types.SchemaValueNode::TupleValue(array206) } 18 => { - let array138 : Array[Int] = []; - for index139 = 0; index139 < (mbt_ffi_load32((iter_base) + 12)); index139 = index139 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index139 * 4) + let array208 : Array[Int] = []; + for index209 = 0; index209 < (mbt_ffi_load32((iter_base) + 12)); index209 = index209 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index209 * 4) - array138.push(mbt_ffi_load32((iter_base) + 0)) + array208.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array138) + @types.SchemaValueNode::ListValue(array208) } 19 => { - let array140 : Array[Int] = []; - for index141 = 0; index141 < (mbt_ffi_load32((iter_base) + 12)); index141 = index141 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index141 * 4) + let array210 : Array[Int] = []; + for index211 = 0; index211 < (mbt_ffi_load32((iter_base) + 12)); index211 = index211 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index211 * 4) - array140.push(mbt_ffi_load32((iter_base) + 0)) + array210.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array140) + @types.SchemaValueNode::FixedListValue(array210) } 20 => { - let array142 : Array[@types.MapEntry] = []; - for index143 = 0; index143 < (mbt_ffi_load32((iter_base) + 12)); index143 = index143 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index143 * 8) + let array212 : Array[@types.MapEntry] = []; + for index213 = 0; index213 < (mbt_ffi_load32((iter_base) + 12)); index213 = index213 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index213 * 8) - array142.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array212.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array142) + @types.SchemaValueNode::MapValue(array212) } 21 => { - let lifted144 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted214 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -4605,14 +7285,14 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - @types.SchemaValueNode::OptionValue(lifted144) + @types.SchemaValueNode::OptionValue(lifted214) } 22 => { - let lifted147 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted217 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted145 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted215 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -4621,11 +7301,11 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - @types.ResultValuePayload::OkValue(lifted145) + @types.ResultValuePayload::OkValue(lifted215) } 1 => { - let lifted146 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted216 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -4634,58 +7314,58 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - @types.ResultValuePayload::ErrValue(lifted146) + @types.ResultValuePayload::ErrValue(lifted216) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted147) + @types.SchemaValueNode::ResultValue(lifted217) } 23 => { - let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result218 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted150 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted220 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result219 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result149) + Option::Some(result219) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result148, language : lifted150}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result218, language : lifted220}) } 24 => { - let result151 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result221 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted153 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted223 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result222 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result152) + Option::Some(result222) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result151, mime_type : lifted153}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result221, mime_type : lifted223}) } 25 => { - let result154 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result224 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result154) + @types.SchemaValueNode::PathValue(result224) } 26 => { - let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result155) + @types.SchemaValueNode::UrlValue(result225) } 27 => { @@ -4697,21 +7377,21 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } 29 => { - let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result156}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result226}) } 30 => { - let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result157, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result227, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result158 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result158}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result228}) } 32 => { @@ -4720,11 +7400,11 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - array160.push(lifted159) + array230.push(lifted229) } mbt_ffi_free(mbt_ffi_load32((return_area) + 44)) - let lifted164 = match (mbt_ffi_load8_u((return_area) + 56)) { + let lifted234 = match (mbt_ffi_load8_u((return_area) + 56)) { 0 => { @oplog.WrappedFunctionType::ReadLocal @@ -4743,7 +7423,7 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI } 4 => { - let lifted162 : UInt64? = match mbt_ffi_load8_u((return_area) + 64) { + let lifted232 : UInt64? = match mbt_ffi_load8_u((return_area) + 64) { 0 => Option::None 1 => { @@ -4752,11 +7432,11 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - @oplog.WrappedFunctionType::WriteRemoteBatched(lifted162) + @oplog.WrappedFunctionType::WriteRemoteBatched(lifted232) } 5 => { - let lifted163 : UInt64? = match mbt_ffi_load8_u((return_area) + 64) { + let lifted233 : UInt64? = match mbt_ffi_load8_u((return_area) + 64) { 0 => Option::None 1 => { @@ -4765,11 +7445,11 @@ pub fn read_persisted_durable_function_invocation() -> PersistedDurableFunctionI _ => panic() } - @oplog.WrappedFunctionType::WriteRemoteTransaction(lifted163) + @oplog.WrappedFunctionType::WriteRemoteTransaction(lifted233) } _ => panic() } - let ret = PersistedDurableFunctionInvocation::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((return_area) + 0)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((return_area) + 8)).reinterpret_as_uint()}, function_name : result, response : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array123, defs : array128, root : mbt_ffi_load32((return_area) + 40)}, value : @types.SchemaValueTree::{value_nodes : array160, root : mbt_ffi_load32((return_area) + 52)}}, function_type : lifted164, entry_version : OplogEntryVersion::from(mbt_ffi_load8_u((return_area) + 80))} + let ret = PersistedDurableFunctionInvocation::{timestamp : @wallClock.Datetime::{seconds : (mbt_ffi_load64((return_area) + 0)).reinterpret_as_uint64(), nanoseconds : (mbt_ffi_load32((return_area) + 8)).reinterpret_as_uint()}, function_name : result, response : @types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array193, defs : array198, root : mbt_ffi_load32((return_area) + 40)}, value : @types.SchemaValueTree::{value_nodes : array230, root : mbt_ffi_load32((return_area) + 52)}}, function_type : lifted234, entry_version : OplogEntryVersion::from(mbt_ffi_load8_u((return_area) + 80))} mbt_ffi_free(return_area) return ret diff --git a/sdks/moonbit/golem_sdk/interface/golem/tool/common/README.md b/sdks/moonbit/golem_sdk/interface/golem/tool/common/README.md index b926fb42ce..6cff56f378 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/tool/common/README.md +++ b/sdks/moonbit/golem_sdk/interface/golem/tool/common/README.md @@ -55,11 +55,15 @@ alone does not enforce them): no items, is valid). • A `positional` / `option` / `result` / `error` `type-node-index` resolves to a node in `tool.schema`. - • A `repeatable` option's `default`, if present, is a list whose - elements are values of the `repeatable-shape.%type` node. - • A `value-is` ref naming a repeatable option, tail positional, or - otherwise list-shaped target means "any occurrence / element - equals this literal"; the literal is a value of the element type. + • A `repeatable-list` option's `default`, if present, is a `list` + whose elements are values of the `repeatable-list-shape.item-type` + node. A `repeatable-map` option's `default`, if present, is a `map` + value of the `repeatable-map-shape.map-type` node. + • A `value-is` ref naming a `repeatable-list` option, tail positional, + or otherwise list-shaped target means "any occurrence / element + equals this literal"; the literal is a value of the element type. For + a `repeatable-map` option the literal is a value of the map's value + type (any entry's value equals this literal). • The tool's identity is its root command name (`commands.nodes[0].name`); `get-tool(name)` and `guest.invoke(tool-name, …)` match against it. `commands.nodes` diff --git a/sdks/moonbit/golem_sdk/interface/golem/tool/common/top.mbt b/sdks/moonbit/golem_sdk/interface/golem/tool/common/top.mbt index 7281a16adf..cec69abecb 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/tool/common/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/tool/common/top.mbt @@ -9,20 +9,45 @@ pub(all) struct CommandAnnotations { read_only : Bool; destructive : Bool; idempotent : Bool; open_world : Bool } derive(Show, Eq) ///| +/// Resolution policy for a repeated key in a `repeatable-map` option. +pub(all) enum DuplicateKeyPolicy { + REJECT; LAST_WINS +} derive(Show, Eq) + +pub fn DuplicateKeyPolicy::ordinal(self : DuplicateKeyPolicy) -> Int { + match self { + REJECT => 0 + LAST_WINS => 1 + } +} + +pub fn DuplicateKeyPolicy::from(self : Int) -> DuplicateKeyPolicy { + match self { + 0 => REJECT + 1 => LAST_WINS + _ => panic() + } +} +///| pub(all) enum Repetition { Repeated Delimited(Char) Either(Char) } derive(Show, Eq) ///| -pub(all) struct RepeatableShape { - repetition : Repetition; type_ : Int +pub(all) struct RepeatableListShape { + repetition : Repetition; item_type : Int +} derive(Show, Eq) +///| +pub(all) struct RepeatableMapShape { + repetition : Repetition; map_type : Int; duplicate_key_policy : DuplicateKeyPolicy } derive(Show, Eq) ///| pub(all) enum OptionShape { Scalar(Int) OptionalScalar(Int) - Repeatable(RepeatableShape) + RepeatableList(RepeatableListShape) + RepeatableMap(RepeatableMapShape) } derive(Show, Eq) ///| pub(all) struct BoolFlagShape { @@ -113,11 +138,11 @@ pub(all) struct Doc { } derive(Show, Eq) ///| pub(all) struct Positional { - name : String; doc : Doc; value_name : String?; type_ : Int; default : @types.SchemaValueTree?; required : Bool + name : String; doc : Doc; value_name : String?; type_ : Int; default : @types.SchemaValueTree?; required : Bool; accepts_stdio : Bool } derive(Show, Eq) ///| pub(all) struct TailPositional { - name : String; doc : Doc; value_name : String?; item_type : Int; min : UInt; max : UInt?; separator : String?; verbatim : Bool + name : String; doc : Doc; value_name : String?; item_type : Int; min : UInt; max : UInt?; separator : String?; verbatim : Bool; accepts_stdio : Bool } derive(Show, Eq) ///| /// Positionals (variadic only at the tail, structurally) diff --git a/sdks/moonbit/golem_sdk/interface/golem/tool/host/top.mbt b/sdks/moonbit/golem_sdk/interface/golem/tool/host/top.mbt index bf08d32f5f..f9de90e990 100644 --- a/sdks/moonbit/golem_sdk/interface/golem/tool/host/top.mbt +++ b/sdks/moonbit/golem_sdk/interface/golem/tool/host/top.mbt @@ -52,15 +52,15 @@ pub fn get_all_tools() -> Array[RegisteredTool] { let return_area = mbt_ffi_malloc(8) wasmImportGetAllTools(return_area); - let array689 : Array[RegisteredTool] = []; - for index690 = 0; index690 < (mbt_ffi_load32((return_area) + 4)); index690 = index690 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 0)) + (index690 * 56) + let array761 : Array[RegisteredTool] = []; + for index762 = 0; index762 < (mbt_ffi_load32((return_area) + 4)); index762 = index762 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 0)) + (index762 * 56) let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array554 : Array[@common.CommandNode] = []; - for index555 = 0; index555 < (mbt_ffi_load32((iter_base) + 12)); index555 = index555 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index555 * 324) + let array556 : Array[@common.CommandNode] = []; + for index557 = 0; index557 < (mbt_ffi_load32((iter_base) + 12)); index557 = index557 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index557 * 324) let result0 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) @@ -90,9 +90,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let array57 : Array[@common.OptionSpec] = []; - for index58 = 0; index58 < (mbt_ffi_load32((iter_base) + 44)); index58 = index58 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index58 * 108) + let array58 : Array[@common.OptionSpec] = []; + for index59 = 0; index59 < (mbt_ffi_load32((iter_base) + 44)); index59 = index59 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index59 * 112) let result8 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) @@ -142,7 +142,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - let lifted21 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted22 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @common.OptionShape::Scalar(mbt_ffi_load32((iter_base) + 64)) @@ -169,20 +169,40 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @common.OptionShape::Repeatable(@common.RepeatableShape::{repetition : lifted20, type_ : mbt_ffi_load32((iter_base) + 72)}) + @common.OptionShape::RepeatableList(@common.RepeatableListShape::{repetition : lifted20, item_type : mbt_ffi_load32((iter_base) + 72)}) + } + 3 => { + + let lifted21 = match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => { + + @common.Repetition::Repeated + } + 1 => { + + @common.Repetition::Delimited(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) + } + 2 => { + + @common.Repetition::Either(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) + } + _ => panic() + } + + @common.OptionShape::RepeatableMap(@common.RepeatableMapShape::{repetition : lifted21, map_type : mbt_ffi_load32((iter_base) + 72), duplicate_key_policy : @common.DuplicateKeyPolicy::from(mbt_ffi_load8_u((iter_base) + 76))}) } _ => panic() } - let lifted54 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted55 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 80) { 0 => Option::None 1 => { - let array52 : Array[@types.SchemaValueNode] = []; - for index53 = 0; index53 < (mbt_ffi_load32((iter_base) + 84)); index53 = index53 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index53 * 32) + let array53 : Array[@types.SchemaValueNode] = []; + for index54 = 0; index54 < (mbt_ffi_load32((iter_base) + 88)); index54 = index54 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index54 * 32) - let lifted51 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted52 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -233,25 +253,25 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 12 => { - let result22 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result23 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result22) + @types.SchemaValueNode::StringValue(result23) } 13 => { - let array23 : Array[Int] = []; - for index24 = 0; index24 < (mbt_ffi_load32((iter_base) + 12)); index24 = index24 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index24 * 4) + let array24 : Array[Int] = []; + for index25 = 0; index25 < (mbt_ffi_load32((iter_base) + 12)); index25 = index25 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index25 * 4) - array23.push(mbt_ffi_load32((iter_base) + 0)) + array24.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array23) + @types.SchemaValueNode::RecordValue(array24) } 14 => { - let lifted25 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted26 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -260,7 +280,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted25}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted26}) } 15 => { @@ -268,67 +288,67 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 16 => { - let array26 : Array[Bool] = []; - for index27 = 0; index27 < (mbt_ffi_load32((iter_base) + 12)); index27 = index27 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index27 * 1) + let array27 : Array[Bool] = []; + for index28 = 0; index28 < (mbt_ffi_load32((iter_base) + 12)); index28 = index28 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index28 * 1) - array26.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array27.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array26) + @types.SchemaValueNode::FlagsValue(array27) } 17 => { - let array28 : Array[Int] = []; - for index29 = 0; index29 < (mbt_ffi_load32((iter_base) + 12)); index29 = index29 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index29 * 4) + let array29 : Array[Int] = []; + for index30 = 0; index30 < (mbt_ffi_load32((iter_base) + 12)); index30 = index30 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index30 * 4) - array28.push(mbt_ffi_load32((iter_base) + 0)) + array29.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array28) + @types.SchemaValueNode::TupleValue(array29) } 18 => { - let array30 : Array[Int] = []; - for index31 = 0; index31 < (mbt_ffi_load32((iter_base) + 12)); index31 = index31 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index31 * 4) + let array31 : Array[Int] = []; + for index32 = 0; index32 < (mbt_ffi_load32((iter_base) + 12)); index32 = index32 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index32 * 4) - array30.push(mbt_ffi_load32((iter_base) + 0)) + array31.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array30) + @types.SchemaValueNode::ListValue(array31) } 19 => { - let array32 : Array[Int] = []; - for index33 = 0; index33 < (mbt_ffi_load32((iter_base) + 12)); index33 = index33 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index33 * 4) + let array33 : Array[Int] = []; + for index34 = 0; index34 < (mbt_ffi_load32((iter_base) + 12)); index34 = index34 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index34 * 4) - array32.push(mbt_ffi_load32((iter_base) + 0)) + array33.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array32) + @types.SchemaValueNode::FixedListValue(array33) } 20 => { - let array34 : Array[@types.MapEntry] = []; - for index35 = 0; index35 < (mbt_ffi_load32((iter_base) + 12)); index35 = index35 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index35 * 8) + let array35 : Array[@types.MapEntry] = []; + for index36 = 0; index36 < (mbt_ffi_load32((iter_base) + 12)); index36 = index36 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index36 * 8) - array34.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array35.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array34) + @types.SchemaValueNode::MapValue(array35) } 21 => { - let lifted36 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted37 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -337,14 +357,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted36) + @types.SchemaValueNode::OptionValue(lifted37) } 22 => { - let lifted39 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted40 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted37 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted38 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -353,11 +373,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted37) + @types.ResultValuePayload::OkValue(lifted38) } 1 => { - let lifted38 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted39 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -366,58 +386,58 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted38) + @types.ResultValuePayload::ErrValue(lifted39) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted39) + @types.SchemaValueNode::ResultValue(lifted40) } 23 => { - let result40 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result41 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted42 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted43 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result41 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result42 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result41) + Option::Some(result42) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result40, language : lifted42}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result41, language : lifted43}) } 24 => { - let result43 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result44 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted45 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted46 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result44 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result45 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result44) + Option::Some(result45) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result43, mime_type : lifted45}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result44, mime_type : lifted46}) } 25 => { - let result46 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result47 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result46) + @types.SchemaValueNode::PathValue(result47) } 26 => { - let result47 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result48 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result47) + @types.SchemaValueNode::UrlValue(result48) } 27 => { @@ -429,21 +449,21 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 29 => { - let result48 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result49 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result48}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result49}) } 30 => { - let result49 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result50 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result49, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result50, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result50 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result51 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result50}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result51}) } 32 => { @@ -452,37 +472,37 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array52.push(lifted51) + array53.push(lifted52) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) - Option::Some(@types.SchemaValueTree::{value_nodes : array52, root : mbt_ffi_load32((iter_base) + 88)}) + Option::Some(@types.SchemaValueTree::{value_nodes : array53, root : mbt_ffi_load32((iter_base) + 92)}) } _ => panic() } - let lifted56 : String? = match mbt_ffi_load8_u((iter_base) + 96) { + let lifted57 : String? = match mbt_ffi_load8_u((iter_base) + 100) { 0 => Option::None 1 => { - let result55 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 100), mbt_ffi_load32((iter_base) + 104)) + let result56 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 104), mbt_ffi_load32((iter_base) + 108)) - Option::Some(result55) + Option::Some(result56) } _ => panic() } - array57.push(@common.OptionSpec::{long : result8, short : lifted, aliases : array10, doc : @common.Doc::{summary : result12, description : result13, examples : array16}, value_name : lifted19, shape : lifted21, default : lifted54, required : (mbt_ffi_load8_u((iter_base) + 92) != 0), env_var : lifted56}) + array58.push(@common.OptionSpec::{long : result8, short : lifted, aliases : array10, doc : @common.Doc::{summary : result12, description : result13, examples : array16}, value_name : lifted19, shape : lifted22, default : lifted55, required : (mbt_ffi_load8_u((iter_base) + 96) != 0), env_var : lifted57}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let array74 : Array[@common.FlagSpec] = []; - for index75 = 0; index75 < (mbt_ffi_load32((iter_base) + 52)); index75 = index75 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index75 * 72) + let array75 : Array[@common.FlagSpec] = []; + for index76 = 0; index76 < (mbt_ffi_load32((iter_base) + 52)); index76 = index76 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index76 * 72) - let result59 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result60 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted60 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted61 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -491,40 +511,40 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - let array62 : Array[String] = []; - for index63 = 0; index63 < (mbt_ffi_load32((iter_base) + 20)); index63 = index63 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index63 * 8) + let array63 : Array[String] = []; + for index64 = 0; index64 < (mbt_ffi_load32((iter_base) + 20)); index64 = index64 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index64 * 8) - let result61 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result62 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array62.push(result61) + array63.push(result62) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let result64 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result65 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let result65 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result66 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let array68 : Array[@common.Example] = []; - for index69 = 0; index69 < (mbt_ffi_load32((iter_base) + 44)); index69 = index69 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index69 * 16) + let array69 : Array[@common.Example] = []; + for index70 = 0; index70 < (mbt_ffi_load32((iter_base) + 44)); index70 = index70 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index70 * 16) - let result66 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result67 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result67 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result68 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array68.push(@common.Example::{title : result66, body : result67}) + array69.push(@common.Example::{title : result67, body : result68}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let lifted71 = match (mbt_ffi_load8_u((iter_base) + 48)) { + let lifted72 = match (mbt_ffi_load8_u((iter_base) + 48)) { 0 => { @common.FlagShape::BoolFlag(@common.BoolFlagShape::{default : (mbt_ffi_load8_u((iter_base) + 52) != 0), negatable : (mbt_ffi_load8_u((iter_base) + 53) != 0)}) } 1 => { - let lifted70 : UInt? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted71 : UInt? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { @@ -533,80 +553,80 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @common.FlagShape::CountFlag(lifted70) + @common.FlagShape::CountFlag(lifted71) } _ => panic() } - let lifted73 : String? = match mbt_ffi_load8_u((iter_base) + 60) { + let lifted74 : String? = match mbt_ffi_load8_u((iter_base) + 60) { 0 => Option::None 1 => { - let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - Option::Some(result72) + Option::Some(result73) } _ => panic() } - array74.push(@common.FlagSpec::{long : result59, short : lifted60, aliases : array62, doc : @common.Doc::{summary : result64, description : result65, examples : array68}, shape : lifted71, env_var : lifted73}) + array75.push(@common.FlagSpec::{long : result60, short : lifted61, aliases : array63, doc : @common.Doc::{summary : result65, description : result66, examples : array69}, shape : lifted72, env_var : lifted74}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array76 : Array[Int] = []; - for index77 = 0; index77 < (mbt_ffi_load32((iter_base) + 60)); index77 = index77 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index77 * 4) + let array77 : Array[Int] = []; + for index78 = 0; index78 < (mbt_ffi_load32((iter_base) + 60)); index78 = index78 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index78 * 4) - array76.push(mbt_ffi_load32((iter_base) + 0)) + array77.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted553 : @common.CommandBody? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted555 : @common.CommandBody? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let array120 : Array[@common.Positional] = []; - for index121 = 0; index121 < (mbt_ffi_load32((iter_base) + 72)); index121 = index121 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index121 * 68) + let array121 : Array[@common.Positional] = []; + for index122 = 0; index122 < (mbt_ffi_load32((iter_base) + 72)); index122 = index122 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index122 * 68) - let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let array83 : Array[@common.Example] = []; - for index84 = 0; index84 < (mbt_ffi_load32((iter_base) + 28)); index84 = index84 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index84 * 16) + let array84 : Array[@common.Example] = []; + for index85 = 0; index85 < (mbt_ffi_load32((iter_base) + 28)); index85 = index85 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index85 * 16) - let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result82 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result82 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array83.push(@common.Example::{title : result81, body : result82}) + array84.push(@common.Example::{title : result82, body : result83}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let lifted86 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + let lifted87 : String? = match mbt_ffi_load8_u((iter_base) + 32) { 0 => Option::None 1 => { - let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) - Option::Some(result85) + Option::Some(result86) } _ => panic() } - let lifted119 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted120 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { - let array117 : Array[@types.SchemaValueNode] = []; - for index118 = 0; index118 < (mbt_ffi_load32((iter_base) + 56)); index118 = index118 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index118 * 32) + let array118 : Array[@types.SchemaValueNode] = []; + for index119 = 0; index119 < (mbt_ffi_load32((iter_base) + 56)); index119 = index119 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index119 * 32) - let lifted116 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted117 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -657,25 +677,25 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 12 => { - let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result87) + @types.SchemaValueNode::StringValue(result88) } 13 => { - let array88 : Array[Int] = []; - for index89 = 0; index89 < (mbt_ffi_load32((iter_base) + 12)); index89 = index89 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index89 * 4) + let array89 : Array[Int] = []; + for index90 = 0; index90 < (mbt_ffi_load32((iter_base) + 12)); index90 = index90 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index90 * 4) - array88.push(mbt_ffi_load32((iter_base) + 0)) + array89.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array88) + @types.SchemaValueNode::RecordValue(array89) } 14 => { - let lifted90 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted91 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -684,7 +704,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted90}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted91}) } 15 => { @@ -692,67 +712,67 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 16 => { - let array91 : Array[Bool] = []; - for index92 = 0; index92 < (mbt_ffi_load32((iter_base) + 12)); index92 = index92 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index92 * 1) + let array92 : Array[Bool] = []; + for index93 = 0; index93 < (mbt_ffi_load32((iter_base) + 12)); index93 = index93 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index93 * 1) - array91.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array92.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array91) + @types.SchemaValueNode::FlagsValue(array92) } 17 => { - let array93 : Array[Int] = []; - for index94 = 0; index94 < (mbt_ffi_load32((iter_base) + 12)); index94 = index94 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index94 * 4) + let array94 : Array[Int] = []; + for index95 = 0; index95 < (mbt_ffi_load32((iter_base) + 12)); index95 = index95 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index95 * 4) - array93.push(mbt_ffi_load32((iter_base) + 0)) + array94.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array93) + @types.SchemaValueNode::TupleValue(array94) } 18 => { - let array95 : Array[Int] = []; - for index96 = 0; index96 < (mbt_ffi_load32((iter_base) + 12)); index96 = index96 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index96 * 4) + let array96 : Array[Int] = []; + for index97 = 0; index97 < (mbt_ffi_load32((iter_base) + 12)); index97 = index97 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index97 * 4) - array95.push(mbt_ffi_load32((iter_base) + 0)) + array96.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array95) + @types.SchemaValueNode::ListValue(array96) } 19 => { - let array97 : Array[Int] = []; - for index98 = 0; index98 < (mbt_ffi_load32((iter_base) + 12)); index98 = index98 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index98 * 4) + let array98 : Array[Int] = []; + for index99 = 0; index99 < (mbt_ffi_load32((iter_base) + 12)); index99 = index99 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index99 * 4) - array97.push(mbt_ffi_load32((iter_base) + 0)) + array98.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array97) + @types.SchemaValueNode::FixedListValue(array98) } 20 => { - let array99 : Array[@types.MapEntry] = []; - for index100 = 0; index100 < (mbt_ffi_load32((iter_base) + 12)); index100 = index100 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index100 * 8) + let array100 : Array[@types.MapEntry] = []; + for index101 = 0; index101 < (mbt_ffi_load32((iter_base) + 12)); index101 = index101 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index101 * 8) - array99.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array100.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array99) + @types.SchemaValueNode::MapValue(array100) } 21 => { - let lifted101 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted102 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -761,14 +781,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted101) + @types.SchemaValueNode::OptionValue(lifted102) } 22 => { - let lifted104 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted105 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted102 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted103 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -777,11 +797,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted102) + @types.ResultValuePayload::OkValue(lifted103) } 1 => { - let lifted103 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted104 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -790,58 +810,58 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted103) + @types.ResultValuePayload::ErrValue(lifted104) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted104) + @types.SchemaValueNode::ResultValue(lifted105) } 23 => { - let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result106 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted107 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted108 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result106 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result106) + Option::Some(result107) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result105, language : lifted107}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result106, language : lifted108}) } 24 => { - let result108 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result109 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted110 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted111 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result109) + Option::Some(result110) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result108, mime_type : lifted110}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result109, mime_type : lifted111}) } 25 => { - let result111 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result111) + @types.SchemaValueNode::PathValue(result112) } 26 => { - let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result112) + @types.SchemaValueNode::UrlValue(result113) } 27 => { @@ -853,21 +873,21 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 29 => { - let result113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result113}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result114}) } 30 => { - let result114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result114, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result115, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result116 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result115}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result116}) } 32 => { @@ -876,53 +896,53 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array117.push(lifted116) + array118.push(lifted117) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 52)) - Option::Some(@types.SchemaValueTree::{value_nodes : array117, root : mbt_ffi_load32((iter_base) + 60)}) + Option::Some(@types.SchemaValueTree::{value_nodes : array118, root : mbt_ffi_load32((iter_base) + 60)}) } _ => panic() } - array120.push(@common.Positional::{name : result78, doc : @common.Doc::{summary : result79, description : result80, examples : array83}, value_name : lifted86, type_ : mbt_ffi_load32((iter_base) + 44), default : lifted119, required : (mbt_ffi_load8_u((iter_base) + 64) != 0)}) + array121.push(@common.Positional::{name : result79, doc : @common.Doc::{summary : result80, description : result81, examples : array84}, value_name : lifted87, type_ : mbt_ffi_load32((iter_base) + 44), default : lifted120, required : (mbt_ffi_load8_u((iter_base) + 64) != 0), accepts_stdio : (mbt_ffi_load8_u((iter_base) + 65) != 0)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) - let lifted134 : @common.TailPositional? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted135 : @common.TailPositional? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let result122 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) + let result123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) - let result123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) + let result124 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) - let result124 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 96), mbt_ffi_load32((iter_base) + 100)) + let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 96), mbt_ffi_load32((iter_base) + 100)) - let array127 : Array[@common.Example] = []; - for index128 = 0; index128 < (mbt_ffi_load32((iter_base) + 108)); index128 = index128 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 104)) + (index128 * 16) + let array128 : Array[@common.Example] = []; + for index129 = 0; index129 < (mbt_ffi_load32((iter_base) + 108)); index129 = index129 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 104)) + (index129 * 16) - let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array127.push(@common.Example::{title : result125, body : result126}) + array128.push(@common.Example::{title : result126, body : result127}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 104)) - let lifted130 : String? = match mbt_ffi_load8_u((iter_base) + 112) { + let lifted131 : String? = match mbt_ffi_load8_u((iter_base) + 112) { 0 => Option::None 1 => { - let result129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 116), mbt_ffi_load32((iter_base) + 120)) + let result130 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 116), mbt_ffi_load32((iter_base) + 120)) - Option::Some(result129) + Option::Some(result130) } _ => panic() } - let lifted131 : UInt? = match mbt_ffi_load8_u((iter_base) + 132) { + let lifted132 : UInt? = match mbt_ffi_load8_u((iter_base) + 132) { 0 => Option::None 1 => { @@ -931,29 +951,29 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - let lifted133 : String? = match mbt_ffi_load8_u((iter_base) + 140) { + let lifted134 : String? = match mbt_ffi_load8_u((iter_base) + 140) { 0 => Option::None 1 => { - let result132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 144), mbt_ffi_load32((iter_base) + 148)) + let result133 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 144), mbt_ffi_load32((iter_base) + 148)) - Option::Some(result132) + Option::Some(result133) } _ => panic() } - Option::Some(@common.TailPositional::{name : result122, doc : @common.Doc::{summary : result123, description : result124, examples : array127}, value_name : lifted130, item_type : mbt_ffi_load32((iter_base) + 124), min : (mbt_ffi_load32((iter_base) + 128)).reinterpret_as_uint(), max : lifted131, separator : lifted133, verbatim : (mbt_ffi_load8_u((iter_base) + 152) != 0)}) + Option::Some(@common.TailPositional::{name : result123, doc : @common.Doc::{summary : result124, description : result125, examples : array128}, value_name : lifted131, item_type : mbt_ffi_load32((iter_base) + 124), min : (mbt_ffi_load32((iter_base) + 128)).reinterpret_as_uint(), max : lifted132, separator : lifted134, verbatim : (mbt_ffi_load8_u((iter_base) + 152) != 0), accepts_stdio : (mbt_ffi_load8_u((iter_base) + 153) != 0)}) } _ => panic() } - let array185 : Array[@common.OptionSpec] = []; - for index186 = 0; index186 < (mbt_ffi_load32((iter_base) + 160)); index186 = index186 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 156)) + (index186 * 108) + let array187 : Array[@common.OptionSpec] = []; + for index188 = 0; index188 < (mbt_ffi_load32((iter_base) + 160)); index188 = index188 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 156)) + (index188 * 112) - let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result136 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted136 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted137 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -962,44 +982,44 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - let array138 : Array[String] = []; - for index139 = 0; index139 < (mbt_ffi_load32((iter_base) + 20)); index139 = index139 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index139 * 8) + let array139 : Array[String] = []; + for index140 = 0; index140 < (mbt_ffi_load32((iter_base) + 20)); index140 = index140 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index140 * 8) - let result137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result138 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array138.push(result137) + array139.push(result138) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let result140 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let result141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let array144 : Array[@common.Example] = []; - for index145 = 0; index145 < (mbt_ffi_load32((iter_base) + 44)); index145 = index145 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index145 * 16) + let array145 : Array[@common.Example] = []; + for index146 = 0; index146 < (mbt_ffi_load32((iter_base) + 44)); index146 = index146 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index146 * 16) - let result142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array144.push(@common.Example::{title : result142, body : result143}) + array145.push(@common.Example::{title : result143, body : result144}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let lifted147 : String? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted148 : String? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { - let result146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + let result147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - Option::Some(result146) + Option::Some(result147) } _ => panic() } - let lifted149 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted151 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @common.OptionShape::Scalar(mbt_ffi_load32((iter_base) + 64)) @@ -1010,7 +1030,27 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 2 => { - let lifted148 = match (mbt_ffi_load8_u((iter_base) + 64)) { + let lifted149 = match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => { + + @common.Repetition::Repeated + } + 1 => { + + @common.Repetition::Delimited(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) + } + 2 => { + + @common.Repetition::Either(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) + } + _ => panic() + } + + @common.OptionShape::RepeatableList(@common.RepeatableListShape::{repetition : lifted149, item_type : mbt_ffi_load32((iter_base) + 72)}) + } + 3 => { + + let lifted150 = match (mbt_ffi_load8_u((iter_base) + 64)) { 0 => { @common.Repetition::Repeated @@ -1026,20 +1066,20 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @common.OptionShape::Repeatable(@common.RepeatableShape::{repetition : lifted148, type_ : mbt_ffi_load32((iter_base) + 72)}) + @common.OptionShape::RepeatableMap(@common.RepeatableMapShape::{repetition : lifted150, map_type : mbt_ffi_load32((iter_base) + 72), duplicate_key_policy : @common.DuplicateKeyPolicy::from(mbt_ffi_load8_u((iter_base) + 76))}) } _ => panic() } - let lifted182 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted184 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 80) { 0 => Option::None 1 => { - let array180 : Array[@types.SchemaValueNode] = []; - for index181 = 0; index181 < (mbt_ffi_load32((iter_base) + 84)); index181 = index181 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index181 * 32) + let array182 : Array[@types.SchemaValueNode] = []; + for index183 = 0; index183 < (mbt_ffi_load32((iter_base) + 88)); index183 = index183 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index183 * 32) - let lifted179 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted181 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -1090,25 +1130,25 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 12 => { - let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result150) + @types.SchemaValueNode::StringValue(result152) } 13 => { - let array151 : Array[Int] = []; - for index152 = 0; index152 < (mbt_ffi_load32((iter_base) + 12)); index152 = index152 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index152 * 4) + let array153 : Array[Int] = []; + for index154 = 0; index154 < (mbt_ffi_load32((iter_base) + 12)); index154 = index154 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index154 * 4) - array151.push(mbt_ffi_load32((iter_base) + 0)) + array153.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array151) + @types.SchemaValueNode::RecordValue(array153) } 14 => { - let lifted153 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted155 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -1117,7 +1157,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted153}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted155}) } 15 => { @@ -1125,29 +1165,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 16 => { - let array154 : Array[Bool] = []; - for index155 = 0; index155 < (mbt_ffi_load32((iter_base) + 12)); index155 = index155 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index155 * 1) - - array154.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array154) - } - 17 => { - - let array156 : Array[Int] = []; + let array156 : Array[Bool] = []; for index157 = 0; index157 < (mbt_ffi_load32((iter_base) + 12)); index157 = index157 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index157 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index157 * 1) - array156.push(mbt_ffi_load32((iter_base) + 0)) + array156.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array156) + @types.SchemaValueNode::FlagsValue(array156) } - 18 => { + 17 => { let array158 : Array[Int] = []; for index159 = 0; index159 < (mbt_ffi_load32((iter_base) + 12)); index159 = index159 + 1 { @@ -1157,9 +1185,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array158) + @types.SchemaValueNode::TupleValue(array158) } - 19 => { + 18 => { let array160 : Array[Int] = []; for index161 = 0; index161 < (mbt_ffi_load32((iter_base) + 12)); index161 = index161 + 1 { @@ -1169,23 +1197,35 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array160) + @types.SchemaValueNode::ListValue(array160) } - 20 => { + 19 => { - let array162 : Array[@types.MapEntry] = []; + let array162 : Array[Int] = []; for index163 = 0; index163 < (mbt_ffi_load32((iter_base) + 12)); index163 = index163 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index163 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index163 * 4) + + array162.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - array162.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + @types.SchemaValueNode::FixedListValue(array162) + } + 20 => { + + let array164 : Array[@types.MapEntry] = []; + for index165 = 0; index165 < (mbt_ffi_load32((iter_base) + 12)); index165 = index165 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index165 * 8) + + array164.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array162) + @types.SchemaValueNode::MapValue(array164) } 21 => { - let lifted164 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted166 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -1194,14 +1234,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted164) + @types.SchemaValueNode::OptionValue(lifted166) } 22 => { - let lifted167 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted169 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted165 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted167 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -1210,11 +1250,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted165) + @types.ResultValuePayload::OkValue(lifted167) } 1 => { - let lifted166 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted168 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -1223,58 +1263,58 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted166) + @types.ResultValuePayload::ErrValue(lifted168) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted167) + @types.SchemaValueNode::ResultValue(lifted169) } 23 => { - let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted170 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted172 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result171 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result169) + Option::Some(result171) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result168, language : lifted170}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result170, language : lifted172}) } 24 => { - let result171 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result173 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted173 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted175 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result172 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result174 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result172) + Option::Some(result174) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result171, mime_type : lifted173}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result173, mime_type : lifted175}) } 25 => { - let result174 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result176 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result174) + @types.SchemaValueNode::PathValue(result176) } 26 => { - let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result175) + @types.SchemaValueNode::UrlValue(result177) } 27 => { @@ -1286,21 +1326,21 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 29 => { - let result176 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result178 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result176}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result178}) } 30 => { - let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result179 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result177, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result179, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result178 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result178}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result180}) } 32 => { @@ -1309,37 +1349,37 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array180.push(lifted179) + array182.push(lifted181) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) - Option::Some(@types.SchemaValueTree::{value_nodes : array180, root : mbt_ffi_load32((iter_base) + 88)}) + Option::Some(@types.SchemaValueTree::{value_nodes : array182, root : mbt_ffi_load32((iter_base) + 92)}) } _ => panic() } - let lifted184 : String? = match mbt_ffi_load8_u((iter_base) + 96) { + let lifted186 : String? = match mbt_ffi_load8_u((iter_base) + 100) { 0 => Option::None 1 => { - let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 100), mbt_ffi_load32((iter_base) + 104)) + let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 104), mbt_ffi_load32((iter_base) + 108)) - Option::Some(result183) + Option::Some(result185) } _ => panic() } - array185.push(@common.OptionSpec::{long : result135, short : lifted136, aliases : array138, doc : @common.Doc::{summary : result140, description : result141, examples : array144}, value_name : lifted147, shape : lifted149, default : lifted182, required : (mbt_ffi_load8_u((iter_base) + 92) != 0), env_var : lifted184}) + array187.push(@common.OptionSpec::{long : result136, short : lifted137, aliases : array139, doc : @common.Doc::{summary : result141, description : result142, examples : array145}, value_name : lifted148, shape : lifted151, default : lifted184, required : (mbt_ffi_load8_u((iter_base) + 96) != 0), env_var : lifted186}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 156)) - let array202 : Array[@common.FlagSpec] = []; - for index203 = 0; index203 < (mbt_ffi_load32((iter_base) + 168)); index203 = index203 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 164)) + (index203 * 72) + let array204 : Array[@common.FlagSpec] = []; + for index205 = 0; index205 < (mbt_ffi_load32((iter_base) + 168)); index205 = index205 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 164)) + (index205 * 72) - let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted188 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted190 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -1348,40 +1388,40 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - let array190 : Array[String] = []; - for index191 = 0; index191 < (mbt_ffi_load32((iter_base) + 20)); index191 = index191 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index191 * 8) + let array192 : Array[String] = []; + for index193 = 0; index193 < (mbt_ffi_load32((iter_base) + 20)); index193 = index193 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index193 * 8) - let result189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result191 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array190.push(result189) + array192.push(result191) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let array196 : Array[@common.Example] = []; - for index197 = 0; index197 < (mbt_ffi_load32((iter_base) + 44)); index197 = index197 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index197 * 16) + let array198 : Array[@common.Example] = []; + for index199 = 0; index199 < (mbt_ffi_load32((iter_base) + 44)); index199 = index199 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index199 * 16) - let result194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array196.push(@common.Example::{title : result194, body : result195}) + array198.push(@common.Example::{title : result196, body : result197}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let lifted199 = match (mbt_ffi_load8_u((iter_base) + 48)) { + let lifted201 = match (mbt_ffi_load8_u((iter_base) + 48)) { 0 => { @common.FlagShape::BoolFlag(@common.BoolFlagShape::{default : (mbt_ffi_load8_u((iter_base) + 52) != 0), negatable : (mbt_ffi_load8_u((iter_base) + 53) != 0)}) } 1 => { - let lifted198 : UInt? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted200 : UInt? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { @@ -1390,53 +1430,53 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @common.FlagShape::CountFlag(lifted198) + @common.FlagShape::CountFlag(lifted200) } _ => panic() } - let lifted201 : String? = match mbt_ffi_load8_u((iter_base) + 60) { + let lifted203 : String? = match mbt_ffi_load8_u((iter_base) + 60) { 0 => Option::None 1 => { - let result200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - Option::Some(result200) + Option::Some(result202) } _ => panic() } - array202.push(@common.FlagSpec::{long : result187, short : lifted188, aliases : array190, doc : @common.Doc::{summary : result192, description : result193, examples : array196}, shape : lifted199, env_var : lifted201}) + array204.push(@common.FlagSpec::{long : result189, short : lifted190, aliases : array192, doc : @common.Doc::{summary : result194, description : result195, examples : array198}, shape : lifted201, env_var : lifted203}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 164)) - let array503 : Array[@common.Constraint] = []; - for index504 = 0; index504 < (mbt_ffi_load32((iter_base) + 176)); index504 = index504 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 172)) + (index504 * 28) + let array505 : Array[@common.Constraint] = []; + for index506 = 0; index506 < (mbt_ffi_load32((iter_base) + 176)); index506 = index506 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 172)) + (index506 * 28) - let lifted502 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted504 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let array239 : Array[@common.Ref] = []; - for index240 = 0; index240 < (mbt_ffi_load32((iter_base) + 8)); index240 = index240 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index240 * 24) + let array241 : Array[@common.Ref] = []; + for index242 = 0; index242 < (mbt_ffi_load32((iter_base) + 8)); index242 = index242 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index242 * 24) - let lifted238 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted240 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result204 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result206 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result204) + @common.Ref::Present(result206) } 1 => { - let result205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array236 : Array[@types.SchemaValueNode] = []; - for index237 = 0; index237 < (mbt_ffi_load32((iter_base) + 16)); index237 = index237 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index237 * 32) + let array238 : Array[@types.SchemaValueNode] = []; + for index239 = 0; index239 < (mbt_ffi_load32((iter_base) + 16)); index239 = index239 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index239 * 32) - let lifted235 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted237 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -1487,25 +1527,25 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 12 => { - let result206 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result208 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result206) + @types.SchemaValueNode::StringValue(result208) } 13 => { - let array207 : Array[Int] = []; - for index208 = 0; index208 < (mbt_ffi_load32((iter_base) + 12)); index208 = index208 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index208 * 4) + let array209 : Array[Int] = []; + for index210 = 0; index210 < (mbt_ffi_load32((iter_base) + 12)); index210 = index210 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index210 * 4) - array207.push(mbt_ffi_load32((iter_base) + 0)) + array209.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array207) + @types.SchemaValueNode::RecordValue(array209) } 14 => { - let lifted209 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted211 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -1514,7 +1554,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted209}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted211}) } 15 => { @@ -1522,29 +1562,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 16 => { - let array210 : Array[Bool] = []; - for index211 = 0; index211 < (mbt_ffi_load32((iter_base) + 12)); index211 = index211 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index211 * 1) - - array210.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array210) - } - 17 => { - - let array212 : Array[Int] = []; + let array212 : Array[Bool] = []; for index213 = 0; index213 < (mbt_ffi_load32((iter_base) + 12)); index213 = index213 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index213 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index213 * 1) - array212.push(mbt_ffi_load32((iter_base) + 0)) + array212.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array212) + @types.SchemaValueNode::FlagsValue(array212) } - 18 => { + 17 => { let array214 : Array[Int] = []; for index215 = 0; index215 < (mbt_ffi_load32((iter_base) + 12)); index215 = index215 + 1 { @@ -1554,9 +1582,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array214) + @types.SchemaValueNode::TupleValue(array214) } - 19 => { + 18 => { let array216 : Array[Int] = []; for index217 = 0; index217 < (mbt_ffi_load32((iter_base) + 12)); index217 = index217 + 1 { @@ -1566,23 +1594,35 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array216) + @types.SchemaValueNode::ListValue(array216) } - 20 => { + 19 => { - let array218 : Array[@types.MapEntry] = []; + let array218 : Array[Int] = []; for index219 = 0; index219 < (mbt_ffi_load32((iter_base) + 12)); index219 = index219 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index219 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index219 * 4) + + array218.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array218) + } + 20 => { - array218.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + let array220 : Array[@types.MapEntry] = []; + for index221 = 0; index221 < (mbt_ffi_load32((iter_base) + 12)); index221 = index221 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index221 * 8) + + array220.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array218) + @types.SchemaValueNode::MapValue(array220) } 21 => { - let lifted220 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted222 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -1591,14 +1631,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted220) + @types.SchemaValueNode::OptionValue(lifted222) } 22 => { - let lifted223 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted225 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted221 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted223 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -1607,11 +1647,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted221) + @types.ResultValuePayload::OkValue(lifted223) } 1 => { - let lifted222 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted224 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -1620,58 +1660,58 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted222) + @types.ResultValuePayload::ErrValue(lifted224) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted223) + @types.SchemaValueNode::ResultValue(lifted225) } 23 => { - let result224 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted226 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted228 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result225) + Option::Some(result227) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result224, language : lifted226}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result226, language : lifted228}) } 24 => { - let result227 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result229 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted229 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted231 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result228) + Option::Some(result230) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result227, mime_type : lifted229}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result229, mime_type : lifted231}) } 25 => { - let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result232 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result230) + @types.SchemaValueNode::PathValue(result232) } 26 => { - let result231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result231) + @types.SchemaValueNode::UrlValue(result233) } 27 => { @@ -1683,21 +1723,21 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 29 => { - let result232 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result234 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result232}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result234}) } 30 => { - let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result233, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result235, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result234 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result234}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result236}) } 32 => { @@ -1706,43 +1746,43 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array236.push(lifted235) + array238.push(lifted237) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result205, value : @types.SchemaValueTree::{value_nodes : array236, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result207, value : @types.SchemaValueTree::{value_nodes : array238, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array239.push(lifted238) + array241.push(lifted240) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) - @common.Constraint::RequiresAll(array239) + @common.Constraint::RequiresAll(array241) } 1 => { - let array276 : Array[@common.Ref] = []; - for index277 = 0; index277 < (mbt_ffi_load32((iter_base) + 8)); index277 = index277 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index277 * 24) + let array278 : Array[@common.Ref] = []; + for index279 = 0; index279 < (mbt_ffi_load32((iter_base) + 8)); index279 = index279 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index279 * 24) - let lifted275 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted277 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result241) + @common.Ref::Present(result243) } 1 => { - let result242 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result244 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array273 : Array[@types.SchemaValueNode] = []; - for index274 = 0; index274 < (mbt_ffi_load32((iter_base) + 16)); index274 = index274 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index274 * 32) + let array275 : Array[@types.SchemaValueNode] = []; + for index276 = 0; index276 < (mbt_ffi_load32((iter_base) + 16)); index276 = index276 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index276 * 32) - let lifted272 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted274 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -1793,25 +1833,25 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 12 => { - let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result245 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result243) + @types.SchemaValueNode::StringValue(result245) } 13 => { - let array244 : Array[Int] = []; - for index245 = 0; index245 < (mbt_ffi_load32((iter_base) + 12)); index245 = index245 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index245 * 4) + let array246 : Array[Int] = []; + for index247 = 0; index247 < (mbt_ffi_load32((iter_base) + 12)); index247 = index247 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index247 * 4) - array244.push(mbt_ffi_load32((iter_base) + 0)) + array246.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array244) + @types.SchemaValueNode::RecordValue(array246) } 14 => { - let lifted246 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted248 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -1820,7 +1860,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted246}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted248}) } 15 => { @@ -1828,29 +1868,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 16 => { - let array247 : Array[Bool] = []; - for index248 = 0; index248 < (mbt_ffi_load32((iter_base) + 12)); index248 = index248 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index248 * 1) - - array247.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array247) - } - 17 => { - - let array249 : Array[Int] = []; + let array249 : Array[Bool] = []; for index250 = 0; index250 < (mbt_ffi_load32((iter_base) + 12)); index250 = index250 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index250 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index250 * 1) - array249.push(mbt_ffi_load32((iter_base) + 0)) + array249.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array249) + @types.SchemaValueNode::FlagsValue(array249) } - 18 => { + 17 => { let array251 : Array[Int] = []; for index252 = 0; index252 < (mbt_ffi_load32((iter_base) + 12)); index252 = index252 + 1 { @@ -1860,9 +1888,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array251) + @types.SchemaValueNode::TupleValue(array251) } - 19 => { + 18 => { let array253 : Array[Int] = []; for index254 = 0; index254 < (mbt_ffi_load32((iter_base) + 12)); index254 = index254 + 1 { @@ -1872,23 +1900,35 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array253) + @types.SchemaValueNode::ListValue(array253) } - 20 => { + 19 => { - let array255 : Array[@types.MapEntry] = []; + let array255 : Array[Int] = []; for index256 = 0; index256 < (mbt_ffi_load32((iter_base) + 12)); index256 = index256 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index256 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index256 * 4) + + array255.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array255) + } + 20 => { - array255.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + let array257 : Array[@types.MapEntry] = []; + for index258 = 0; index258 < (mbt_ffi_load32((iter_base) + 12)); index258 = index258 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index258 * 8) + + array257.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array255) + @types.SchemaValueNode::MapValue(array257) } 21 => { - let lifted257 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted259 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -1897,14 +1937,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted257) + @types.SchemaValueNode::OptionValue(lifted259) } 22 => { - let lifted260 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted262 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted258 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted260 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -1913,11 +1953,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted258) + @types.ResultValuePayload::OkValue(lifted260) } 1 => { - let lifted259 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted261 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -1926,58 +1966,58 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted259) + @types.ResultValuePayload::ErrValue(lifted261) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted260) + @types.SchemaValueNode::ResultValue(lifted262) } 23 => { - let result261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result263 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted263 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted265 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result264 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result262) + Option::Some(result264) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result261, language : lifted263}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result263, language : lifted265}) } 24 => { - let result264 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result266 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted266 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted268 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result265) + Option::Some(result267) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result264, mime_type : lifted266}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result266, mime_type : lifted268}) } 25 => { - let result267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result269 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result267) + @types.SchemaValueNode::PathValue(result269) } 26 => { - let result268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result270 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result268) + @types.SchemaValueNode::UrlValue(result270) } 27 => { @@ -1989,21 +2029,21 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 29 => { - let result269 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result271 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result269}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result271}) } 30 => { - let result270 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result272 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result270, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result272, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result271 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result273 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result271}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result273}) } 32 => { @@ -2012,43 +2052,43 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array273.push(lifted272) + array275.push(lifted274) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result242, value : @types.SchemaValueTree::{value_nodes : array273, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result244, value : @types.SchemaValueTree::{value_nodes : array275, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array276.push(lifted275) + array278.push(lifted277) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) - @common.Constraint::AllOrNone(array276) + @common.Constraint::AllOrNone(array278) } 2 => { - let array313 : Array[@common.Ref] = []; - for index314 = 0; index314 < (mbt_ffi_load32((iter_base) + 8)); index314 = index314 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index314 * 24) + let array315 : Array[@common.Ref] = []; + for index316 = 0; index316 < (mbt_ffi_load32((iter_base) + 8)); index316 = index316 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index316 * 24) - let lifted312 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted314 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result278 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result278) + @common.Ref::Present(result280) } 1 => { - let result279 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result281 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array310 : Array[@types.SchemaValueNode] = []; - for index311 = 0; index311 < (mbt_ffi_load32((iter_base) + 16)); index311 = index311 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index311 * 32) + let array312 : Array[@types.SchemaValueNode] = []; + for index313 = 0; index313 < (mbt_ffi_load32((iter_base) + 16)); index313 = index313 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index313 * 32) - let lifted309 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted311 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -2099,25 +2139,25 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 12 => { - let result280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result282 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result280) + @types.SchemaValueNode::StringValue(result282) } 13 => { - let array281 : Array[Int] = []; - for index282 = 0; index282 < (mbt_ffi_load32((iter_base) + 12)); index282 = index282 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index282 * 4) + let array283 : Array[Int] = []; + for index284 = 0; index284 < (mbt_ffi_load32((iter_base) + 12)); index284 = index284 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index284 * 4) - array281.push(mbt_ffi_load32((iter_base) + 0)) + array283.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array281) + @types.SchemaValueNode::RecordValue(array283) } 14 => { - let lifted283 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted285 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -2126,7 +2166,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted283}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted285}) } 15 => { @@ -2134,29 +2174,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 16 => { - let array284 : Array[Bool] = []; - for index285 = 0; index285 < (mbt_ffi_load32((iter_base) + 12)); index285 = index285 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index285 * 1) - - array284.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array284) - } - 17 => { - - let array286 : Array[Int] = []; + let array286 : Array[Bool] = []; for index287 = 0; index287 < (mbt_ffi_load32((iter_base) + 12)); index287 = index287 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index287 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index287 * 1) - array286.push(mbt_ffi_load32((iter_base) + 0)) + array286.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array286) + @types.SchemaValueNode::FlagsValue(array286) } - 18 => { + 17 => { let array288 : Array[Int] = []; for index289 = 0; index289 < (mbt_ffi_load32((iter_base) + 12)); index289 = index289 + 1 { @@ -2166,9 +2194,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array288) + @types.SchemaValueNode::TupleValue(array288) } - 19 => { + 18 => { let array290 : Array[Int] = []; for index291 = 0; index291 < (mbt_ffi_load32((iter_base) + 12)); index291 = index291 + 1 { @@ -2178,23 +2206,35 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array290) + @types.SchemaValueNode::ListValue(array290) } - 20 => { + 19 => { - let array292 : Array[@types.MapEntry] = []; + let array292 : Array[Int] = []; for index293 = 0; index293 < (mbt_ffi_load32((iter_base) + 12)); index293 = index293 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index293 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index293 * 4) + + array292.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array292) + } + 20 => { + + let array294 : Array[@types.MapEntry] = []; + for index295 = 0; index295 < (mbt_ffi_load32((iter_base) + 12)); index295 = index295 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index295 * 8) - array292.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array294.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array292) + @types.SchemaValueNode::MapValue(array294) } 21 => { - let lifted294 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted296 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -2203,14 +2243,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted294) + @types.SchemaValueNode::OptionValue(lifted296) } 22 => { - let lifted297 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted299 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted295 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted297 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -2219,11 +2259,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted295) + @types.ResultValuePayload::OkValue(lifted297) } 1 => { - let lifted296 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted298 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -2232,58 +2272,58 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted296) + @types.ResultValuePayload::ErrValue(lifted298) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted297) + @types.SchemaValueNode::ResultValue(lifted299) } 23 => { - let result298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted300 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted302 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result299 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result301 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result299) + Option::Some(result301) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result298, language : lifted300}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result300, language : lifted302}) } 24 => { - let result301 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result303 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted303 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted305 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result302) + Option::Some(result304) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result301, mime_type : lifted303}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result303, mime_type : lifted305}) } 25 => { - let result304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result306 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result304) + @types.SchemaValueNode::PathValue(result306) } 26 => { - let result305 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result305) + @types.SchemaValueNode::UrlValue(result307) } 27 => { @@ -2295,21 +2335,21 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 29 => { - let result306 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result306}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result308}) } 30 => { - let result307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result309 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result307, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result309, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result310 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result308}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result310}) } 32 => { @@ -2318,47 +2358,47 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array310.push(lifted309) + array312.push(lifted311) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result279, value : @types.SchemaValueTree::{value_nodes : array310, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result281, value : @types.SchemaValueTree::{value_nodes : array312, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array313.push(lifted312) + array315.push(lifted314) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) - @common.Constraint::RequiresAny(array313) + @common.Constraint::RequiresAny(array315) } 3 => { - let array352 : Array[@common.RefGroup] = []; - for index353 = 0; index353 < (mbt_ffi_load32((iter_base) + 8)); index353 = index353 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index353 * 8) + let array354 : Array[@common.RefGroup] = []; + for index355 = 0; index355 < (mbt_ffi_load32((iter_base) + 8)); index355 = index355 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index355 * 8) - let array350 : Array[@common.Ref] = []; - for index351 = 0; index351 < (mbt_ffi_load32((iter_base) + 4)); index351 = index351 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index351 * 24) + let array352 : Array[@common.Ref] = []; + for index353 = 0; index353 < (mbt_ffi_load32((iter_base) + 4)); index353 = index353 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index353 * 24) - let lifted349 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted351 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result315 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result315) + @common.Ref::Present(result317) } 1 => { - let result316 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result318 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array347 : Array[@types.SchemaValueNode] = []; - for index348 = 0; index348 < (mbt_ffi_load32((iter_base) + 16)); index348 = index348 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index348 * 32) + let array349 : Array[@types.SchemaValueNode] = []; + for index350 = 0; index350 < (mbt_ffi_load32((iter_base) + 16)); index350 = index350 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index350 * 32) - let lifted346 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted348 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -2409,25 +2449,25 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 12 => { - let result317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result319 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result317) + @types.SchemaValueNode::StringValue(result319) } 13 => { - let array318 : Array[Int] = []; - for index319 = 0; index319 < (mbt_ffi_load32((iter_base) + 12)); index319 = index319 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index319 * 4) + let array320 : Array[Int] = []; + for index321 = 0; index321 < (mbt_ffi_load32((iter_base) + 12)); index321 = index321 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index321 * 4) - array318.push(mbt_ffi_load32((iter_base) + 0)) + array320.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array318) + @types.SchemaValueNode::RecordValue(array320) } 14 => { - let lifted320 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted322 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -2436,7 +2476,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted320}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted322}) } 15 => { @@ -2444,29 +2484,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 16 => { - let array321 : Array[Bool] = []; - for index322 = 0; index322 < (mbt_ffi_load32((iter_base) + 12)); index322 = index322 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index322 * 1) - - array321.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array321) - } - 17 => { - - let array323 : Array[Int] = []; + let array323 : Array[Bool] = []; for index324 = 0; index324 < (mbt_ffi_load32((iter_base) + 12)); index324 = index324 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index324 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index324 * 1) - array323.push(mbt_ffi_load32((iter_base) + 0)) + array323.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array323) + @types.SchemaValueNode::FlagsValue(array323) } - 18 => { + 17 => { let array325 : Array[Int] = []; for index326 = 0; index326 < (mbt_ffi_load32((iter_base) + 12)); index326 = index326 + 1 { @@ -2476,9 +2504,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array325) + @types.SchemaValueNode::TupleValue(array325) } - 19 => { + 18 => { let array327 : Array[Int] = []; for index328 = 0; index328 < (mbt_ffi_load32((iter_base) + 12)); index328 = index328 + 1 { @@ -2488,23 +2516,35 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array327) + @types.SchemaValueNode::ListValue(array327) } - 20 => { + 19 => { - let array329 : Array[@types.MapEntry] = []; + let array329 : Array[Int] = []; for index330 = 0; index330 < (mbt_ffi_load32((iter_base) + 12)); index330 = index330 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index330 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index330 * 4) + + array329.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array329) + } + 20 => { + + let array331 : Array[@types.MapEntry] = []; + for index332 = 0; index332 < (mbt_ffi_load32((iter_base) + 12)); index332 = index332 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index332 * 8) - array329.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array331.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array329) + @types.SchemaValueNode::MapValue(array331) } 21 => { - let lifted331 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted333 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -2513,14 +2553,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted331) + @types.SchemaValueNode::OptionValue(lifted333) } 22 => { - let lifted334 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted336 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted332 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted334 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -2529,11 +2569,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted332) + @types.ResultValuePayload::OkValue(lifted334) } 1 => { - let lifted333 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted335 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -2542,58 +2582,58 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted333) + @types.ResultValuePayload::ErrValue(lifted335) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted334) + @types.SchemaValueNode::ResultValue(lifted336) } 23 => { - let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result337 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted337 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted339 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result336 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result338 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result336) + Option::Some(result338) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result335, language : lifted337}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result337, language : lifted339}) } 24 => { - let result338 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result340 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted340 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted342 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result339 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result341 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result339) + Option::Some(result341) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result338, mime_type : lifted340}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result340, mime_type : lifted342}) } 25 => { - let result341 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result341) + @types.SchemaValueNode::PathValue(result343) } 26 => { - let result342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result342) + @types.SchemaValueNode::UrlValue(result344) } 27 => { @@ -2605,21 +2645,21 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 29 => { - let result343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result343}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result345}) } 30 => { - let result344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result346 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result344, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result346, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result345}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result347}) } 32 => { @@ -2628,47 +2668,47 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array347.push(lifted346) + array349.push(lifted348) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result316, value : @types.SchemaValueTree::{value_nodes : array347, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result318, value : @types.SchemaValueTree::{value_nodes : array349, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array350.push(lifted349) + array352.push(lifted351) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array352.push(@common.RefGroup::{refs : array350}) + array354.push(@common.RefGroup::{refs : array352}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) - @common.Constraint::MutexGroups(array352) + @common.Constraint::MutexGroups(array354) } 4 => { - let array389 : Array[@common.Ref] = []; - for index390 = 0; index390 < (mbt_ffi_load32((iter_base) + 12)); index390 = index390 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index390 * 24) + let array391 : Array[@common.Ref] = []; + for index392 = 0; index392 < (mbt_ffi_load32((iter_base) + 12)); index392 = index392 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index392 * 24) - let lifted388 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted390 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result354 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result354) + @common.Ref::Present(result356) } 1 => { - let result355 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result357 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array386 : Array[@types.SchemaValueNode] = []; - for index387 = 0; index387 < (mbt_ffi_load32((iter_base) + 16)); index387 = index387 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index387 * 32) + let array388 : Array[@types.SchemaValueNode] = []; + for index389 = 0; index389 < (mbt_ffi_load32((iter_base) + 16)); index389 = index389 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index389 * 32) - let lifted385 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted387 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -2719,25 +2759,25 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 12 => { - let result356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result358 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result356) + @types.SchemaValueNode::StringValue(result358) } 13 => { - let array357 : Array[Int] = []; - for index358 = 0; index358 < (mbt_ffi_load32((iter_base) + 12)); index358 = index358 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index358 * 4) + let array359 : Array[Int] = []; + for index360 = 0; index360 < (mbt_ffi_load32((iter_base) + 12)); index360 = index360 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index360 * 4) - array357.push(mbt_ffi_load32((iter_base) + 0)) + array359.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array357) + @types.SchemaValueNode::RecordValue(array359) } 14 => { - let lifted359 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted361 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -2746,7 +2786,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted359}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted361}) } 15 => { @@ -2754,29 +2794,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 16 => { - let array360 : Array[Bool] = []; - for index361 = 0; index361 < (mbt_ffi_load32((iter_base) + 12)); index361 = index361 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index361 * 1) - - array360.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array360) - } - 17 => { - - let array362 : Array[Int] = []; + let array362 : Array[Bool] = []; for index363 = 0; index363 < (mbt_ffi_load32((iter_base) + 12)); index363 = index363 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index363 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index363 * 1) - array362.push(mbt_ffi_load32((iter_base) + 0)) + array362.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array362) + @types.SchemaValueNode::FlagsValue(array362) } - 18 => { + 17 => { let array364 : Array[Int] = []; for index365 = 0; index365 < (mbt_ffi_load32((iter_base) + 12)); index365 = index365 + 1 { @@ -2786,9 +2814,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array364) + @types.SchemaValueNode::TupleValue(array364) } - 19 => { + 18 => { let array366 : Array[Int] = []; for index367 = 0; index367 < (mbt_ffi_load32((iter_base) + 12)); index367 = index367 + 1 { @@ -2798,23 +2826,35 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array366) + @types.SchemaValueNode::ListValue(array366) } - 20 => { + 19 => { - let array368 : Array[@types.MapEntry] = []; + let array368 : Array[Int] = []; for index369 = 0; index369 < (mbt_ffi_load32((iter_base) + 12)); index369 = index369 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index369 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index369 * 4) + + array368.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - array368.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + @types.SchemaValueNode::FixedListValue(array368) + } + 20 => { + + let array370 : Array[@types.MapEntry] = []; + for index371 = 0; index371 < (mbt_ffi_load32((iter_base) + 12)); index371 = index371 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index371 * 8) + + array370.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array368) + @types.SchemaValueNode::MapValue(array370) } 21 => { - let lifted370 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted372 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -2823,14 +2863,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted370) + @types.SchemaValueNode::OptionValue(lifted372) } 22 => { - let lifted373 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted375 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted371 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted373 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -2839,11 +2879,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted371) + @types.ResultValuePayload::OkValue(lifted373) } 1 => { - let lifted372 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted374 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -2852,58 +2892,58 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted372) + @types.ResultValuePayload::ErrValue(lifted374) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted373) + @types.SchemaValueNode::ResultValue(lifted375) } 23 => { - let result374 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted376 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted378 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result377 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result375) + Option::Some(result377) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result374, language : lifted376}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result376, language : lifted378}) } 24 => { - let result377 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result379 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted379 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted381 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result378 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result378) + Option::Some(result380) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result377, mime_type : lifted379}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result379, mime_type : lifted381}) } 25 => { - let result380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result380) + @types.SchemaValueNode::PathValue(result382) } 26 => { - let result381 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result381) + @types.SchemaValueNode::UrlValue(result383) } 27 => { @@ -2915,21 +2955,21 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 29 => { - let result382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result382}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result384}) } 30 => { - let result383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result385 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result383, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result385, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result386 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result384}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result386}) } 32 => { @@ -2938,39 +2978,39 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array386.push(lifted385) + array388.push(lifted387) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result355, value : @types.SchemaValueTree::{value_nodes : array386, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result357, value : @types.SchemaValueTree::{value_nodes : array388, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array389.push(lifted388) + array391.push(lifted390) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array426 : Array[@common.Ref] = []; - for index427 = 0; index427 < (mbt_ffi_load32((iter_base) + 24)); index427 = index427 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index427 * 24) + let array428 : Array[@common.Ref] = []; + for index429 = 0; index429 < (mbt_ffi_load32((iter_base) + 24)); index429 = index429 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index429 * 24) - let lifted425 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted427 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result391 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result391) + @common.Ref::Present(result393) } 1 => { - let result392 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result394 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array423 : Array[@types.SchemaValueNode] = []; - for index424 = 0; index424 < (mbt_ffi_load32((iter_base) + 16)); index424 = index424 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index424 * 32) + let array425 : Array[@types.SchemaValueNode] = []; + for index426 = 0; index426 < (mbt_ffi_load32((iter_base) + 16)); index426 = index426 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index426 * 32) - let lifted422 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted424 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -3021,25 +3061,25 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 12 => { - let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result395 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result393) + @types.SchemaValueNode::StringValue(result395) } 13 => { - let array394 : Array[Int] = []; - for index395 = 0; index395 < (mbt_ffi_load32((iter_base) + 12)); index395 = index395 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index395 * 4) + let array396 : Array[Int] = []; + for index397 = 0; index397 < (mbt_ffi_load32((iter_base) + 12)); index397 = index397 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index397 * 4) - array394.push(mbt_ffi_load32((iter_base) + 0)) + array396.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array394) + @types.SchemaValueNode::RecordValue(array396) } 14 => { - let lifted396 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted398 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -3048,7 +3088,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted396}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted398}) } 15 => { @@ -3056,29 +3096,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 16 => { - let array397 : Array[Bool] = []; - for index398 = 0; index398 < (mbt_ffi_load32((iter_base) + 12)); index398 = index398 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index398 * 1) - - array397.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array397) - } - 17 => { - - let array399 : Array[Int] = []; + let array399 : Array[Bool] = []; for index400 = 0; index400 < (mbt_ffi_load32((iter_base) + 12)); index400 = index400 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index400 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index400 * 1) - array399.push(mbt_ffi_load32((iter_base) + 0)) + array399.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array399) + @types.SchemaValueNode::FlagsValue(array399) } - 18 => { + 17 => { let array401 : Array[Int] = []; for index402 = 0; index402 < (mbt_ffi_load32((iter_base) + 12)); index402 = index402 + 1 { @@ -3088,9 +3116,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array401) + @types.SchemaValueNode::TupleValue(array401) } - 19 => { + 18 => { let array403 : Array[Int] = []; for index404 = 0; index404 < (mbt_ffi_load32((iter_base) + 12)); index404 = index404 + 1 { @@ -3100,23 +3128,35 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array403) + @types.SchemaValueNode::ListValue(array403) } - 20 => { + 19 => { - let array405 : Array[@types.MapEntry] = []; + let array405 : Array[Int] = []; for index406 = 0; index406 < (mbt_ffi_load32((iter_base) + 12)); index406 = index406 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index406 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index406 * 4) + + array405.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array405) + } + 20 => { + + let array407 : Array[@types.MapEntry] = []; + for index408 = 0; index408 < (mbt_ffi_load32((iter_base) + 12)); index408 = index408 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index408 * 8) - array405.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array407.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array405) + @types.SchemaValueNode::MapValue(array407) } 21 => { - let lifted407 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted409 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -3125,14 +3165,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted407) + @types.SchemaValueNode::OptionValue(lifted409) } 22 => { - let lifted410 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted412 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted408 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted410 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -3141,11 +3181,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted408) + @types.ResultValuePayload::OkValue(lifted410) } 1 => { - let lifted409 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted411 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -3154,58 +3194,58 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted409) + @types.ResultValuePayload::ErrValue(lifted411) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted410) + @types.SchemaValueNode::ResultValue(lifted412) } 23 => { - let result411 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result413 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted413 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted415 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result412 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result412) + Option::Some(result414) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result411, language : lifted413}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result413, language : lifted415}) } 24 => { - let result414 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result416 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted416 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted418 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result417 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result415) + Option::Some(result417) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result414, mime_type : lifted416}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result416, mime_type : lifted418}) } 25 => { - let result417 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result419 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result417) + @types.SchemaValueNode::PathValue(result419) } 26 => { - let result418 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result418) + @types.SchemaValueNode::UrlValue(result420) } 27 => { @@ -3217,21 +3257,21 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 29 => { - let result419 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result419}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result421}) } 30 => { - let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result422 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result420, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result422, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result423 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result421}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result423}) } 32 => { @@ -3240,43 +3280,43 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array423.push(lifted422) + array425.push(lifted424) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result392, value : @types.SchemaValueTree::{value_nodes : array423, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result394, value : @types.SchemaValueTree::{value_nodes : array425, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array426.push(lifted425) + array428.push(lifted427) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) - @common.Constraint::Implies(@common.ImpliesC::{lhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 4)), lhs : array389, rhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 16)), rhs : array426}) + @common.Constraint::Implies(@common.ImpliesC::{lhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 4)), lhs : array391, rhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 16)), rhs : array428}) } 5 => { - let array463 : Array[@common.Ref] = []; - for index464 = 0; index464 < (mbt_ffi_load32((iter_base) + 12)); index464 = index464 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index464 * 24) + let array465 : Array[@common.Ref] = []; + for index466 = 0; index466 < (mbt_ffi_load32((iter_base) + 12)); index466 = index466 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index466 * 24) - let lifted462 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted464 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result428 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result428) + @common.Ref::Present(result430) } 1 => { - let result429 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result431 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array460 : Array[@types.SchemaValueNode] = []; - for index461 = 0; index461 < (mbt_ffi_load32((iter_base) + 16)); index461 = index461 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index461 * 32) + let array462 : Array[@types.SchemaValueNode] = []; + for index463 = 0; index463 < (mbt_ffi_load32((iter_base) + 16)); index463 = index463 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index463 * 32) - let lifted459 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted461 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -3327,25 +3367,25 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 12 => { - let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result432 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result430) + @types.SchemaValueNode::StringValue(result432) } 13 => { - let array431 : Array[Int] = []; - for index432 = 0; index432 < (mbt_ffi_load32((iter_base) + 12)); index432 = index432 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index432 * 4) + let array433 : Array[Int] = []; + for index434 = 0; index434 < (mbt_ffi_load32((iter_base) + 12)); index434 = index434 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index434 * 4) - array431.push(mbt_ffi_load32((iter_base) + 0)) + array433.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array431) + @types.SchemaValueNode::RecordValue(array433) } 14 => { - let lifted433 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted435 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -3354,7 +3394,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted433}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted435}) } 15 => { @@ -3362,29 +3402,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 16 => { - let array434 : Array[Bool] = []; - for index435 = 0; index435 < (mbt_ffi_load32((iter_base) + 12)); index435 = index435 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index435 * 1) - - array434.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array434) - } - 17 => { - - let array436 : Array[Int] = []; + let array436 : Array[Bool] = []; for index437 = 0; index437 < (mbt_ffi_load32((iter_base) + 12)); index437 = index437 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index437 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index437 * 1) - array436.push(mbt_ffi_load32((iter_base) + 0)) + array436.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array436) + @types.SchemaValueNode::FlagsValue(array436) } - 18 => { + 17 => { let array438 : Array[Int] = []; for index439 = 0; index439 < (mbt_ffi_load32((iter_base) + 12)); index439 = index439 + 1 { @@ -3394,9 +3422,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array438) + @types.SchemaValueNode::TupleValue(array438) } - 19 => { + 18 => { let array440 : Array[Int] = []; for index441 = 0; index441 < (mbt_ffi_load32((iter_base) + 12)); index441 = index441 + 1 { @@ -3406,23 +3434,35 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array440) + @types.SchemaValueNode::ListValue(array440) } - 20 => { + 19 => { - let array442 : Array[@types.MapEntry] = []; + let array442 : Array[Int] = []; for index443 = 0; index443 < (mbt_ffi_load32((iter_base) + 12)); index443 = index443 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index443 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index443 * 4) + + array442.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array442) + } + 20 => { + + let array444 : Array[@types.MapEntry] = []; + for index445 = 0; index445 < (mbt_ffi_load32((iter_base) + 12)); index445 = index445 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index445 * 8) - array442.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array444.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array442) + @types.SchemaValueNode::MapValue(array444) } 21 => { - let lifted444 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted446 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -3431,14 +3471,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted444) + @types.SchemaValueNode::OptionValue(lifted446) } 22 => { - let lifted447 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted449 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted445 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted447 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -3447,11 +3487,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted445) + @types.ResultValuePayload::OkValue(lifted447) } 1 => { - let lifted446 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted448 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -3460,58 +3500,58 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted446) + @types.ResultValuePayload::ErrValue(lifted448) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted447) + @types.SchemaValueNode::ResultValue(lifted449) } 23 => { - let result448 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result450 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted450 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted452 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result449 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result451 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result449) + Option::Some(result451) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result448, language : lifted450}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result450, language : lifted452}) } 24 => { - let result451 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result453 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted453 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted455 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result454 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result452) + Option::Some(result454) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result451, mime_type : lifted453}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result453, mime_type : lifted455}) } 25 => { - let result454 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result456 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result454) + @types.SchemaValueNode::PathValue(result456) } 26 => { - let result455 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result457 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result455) + @types.SchemaValueNode::UrlValue(result457) } 27 => { @@ -3523,21 +3563,21 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 29 => { - let result456 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result458 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result456}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result458}) } 30 => { - let result457 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result459 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result457, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result459, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result458 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result460 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result458}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result460}) } 32 => { @@ -3546,39 +3586,39 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array460.push(lifted459) + array462.push(lifted461) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result429, value : @types.SchemaValueTree::{value_nodes : array460, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result431, value : @types.SchemaValueTree::{value_nodes : array462, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array463.push(lifted462) + array465.push(lifted464) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array500 : Array[@common.Ref] = []; - for index501 = 0; index501 < (mbt_ffi_load32((iter_base) + 20)); index501 = index501 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index501 * 24) + let array502 : Array[@common.Ref] = []; + for index503 = 0; index503 < (mbt_ffi_load32((iter_base) + 20)); index503 = index503 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index503 * 24) - let lifted499 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted501 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result465 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result467 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result465) + @common.Ref::Present(result467) } 1 => { - let result466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result468 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array497 : Array[@types.SchemaValueNode] = []; - for index498 = 0; index498 < (mbt_ffi_load32((iter_base) + 16)); index498 = index498 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index498 * 32) + let array499 : Array[@types.SchemaValueNode] = []; + for index500 = 0; index500 < (mbt_ffi_load32((iter_base) + 16)); index500 = index500 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index500 * 32) - let lifted496 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted498 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -3629,25 +3669,25 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 12 => { - let result467 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result469 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result467) + @types.SchemaValueNode::StringValue(result469) } 13 => { - let array468 : Array[Int] = []; - for index469 = 0; index469 < (mbt_ffi_load32((iter_base) + 12)); index469 = index469 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index469 * 4) + let array470 : Array[Int] = []; + for index471 = 0; index471 < (mbt_ffi_load32((iter_base) + 12)); index471 = index471 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index471 * 4) - array468.push(mbt_ffi_load32((iter_base) + 0)) + array470.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array468) + @types.SchemaValueNode::RecordValue(array470) } 14 => { - let lifted470 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted472 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -3656,7 +3696,7 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted470}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted472}) } 15 => { @@ -3664,29 +3704,17 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 16 => { - let array471 : Array[Bool] = []; - for index472 = 0; index472 < (mbt_ffi_load32((iter_base) + 12)); index472 = index472 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index472 * 1) - - array471.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array471) - } - 17 => { - - let array473 : Array[Int] = []; + let array473 : Array[Bool] = []; for index474 = 0; index474 < (mbt_ffi_load32((iter_base) + 12)); index474 = index474 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index474 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index474 * 1) - array473.push(mbt_ffi_load32((iter_base) + 0)) + array473.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array473) + @types.SchemaValueNode::FlagsValue(array473) } - 18 => { + 17 => { let array475 : Array[Int] = []; for index476 = 0; index476 < (mbt_ffi_load32((iter_base) + 12)); index476 = index476 + 1 { @@ -3696,9 +3724,9 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array475) + @types.SchemaValueNode::TupleValue(array475) } - 19 => { + 18 => { let array477 : Array[Int] = []; for index478 = 0; index478 < (mbt_ffi_load32((iter_base) + 12)); index478 = index478 + 1 { @@ -3708,23 +3736,35 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array477) + @types.SchemaValueNode::ListValue(array477) } - 20 => { + 19 => { - let array479 : Array[@types.MapEntry] = []; + let array479 : Array[Int] = []; for index480 = 0; index480 < (mbt_ffi_load32((iter_base) + 12)); index480 = index480 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index480 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index480 * 4) + + array479.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array479) + } + 20 => { + + let array481 : Array[@types.MapEntry] = []; + for index482 = 0; index482 < (mbt_ffi_load32((iter_base) + 12)); index482 = index482 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index482 * 8) - array479.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array481.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array479) + @types.SchemaValueNode::MapValue(array481) } 21 => { - let lifted481 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted483 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -3733,14 +3773,14 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted481) + @types.SchemaValueNode::OptionValue(lifted483) } 22 => { - let lifted484 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted486 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted482 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted484 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -3749,11 +3789,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::OkValue(lifted482) + @types.ResultValuePayload::OkValue(lifted484) } 1 => { - let lifted483 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted485 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -3762,58 +3802,58 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted483) + @types.ResultValuePayload::ErrValue(lifted485) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted484) + @types.SchemaValueNode::ResultValue(lifted486) } 23 => { - let result485 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result487 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted487 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted489 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result486 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result488 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result486) + Option::Some(result488) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result485, language : lifted487}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result487, language : lifted489}) } 24 => { - let result488 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result490 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted490 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted492 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result489 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result491 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result489) + Option::Some(result491) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result488, mime_type : lifted490}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result490, mime_type : lifted492}) } 25 => { - let result491 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result493 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result491) + @types.SchemaValueNode::PathValue(result493) } 26 => { - let result492 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result494 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result492) + @types.SchemaValueNode::UrlValue(result494) } 27 => { @@ -3825,21 +3865,21 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 29 => { - let result493 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result495 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result493}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result495}) } 30 => { - let result494 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result496 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result494, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result496, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result495 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result497 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result495}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result497}) } 32 => { @@ -3848,174 +3888,174 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array497.push(lifted496) + array499.push(lifted498) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result466, value : @types.SchemaValueTree::{value_nodes : array497, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result468, value : @types.SchemaValueTree::{value_nodes : array499, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array500.push(lifted499) + array502.push(lifted501) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @common.Constraint::Forbids(@common.ForbidsC::{lhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 4)), lhs : array463, rhs : array500}) + @common.Constraint::Forbids(@common.ForbidsC::{lhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 4)), lhs : array465, rhs : array502}) } _ => panic() } - array503.push(lifted502) + array505.push(lifted504) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 172)) - let lifted514 : @common.StreamSpec? = match mbt_ffi_load8_u((iter_base) + 180) { + let lifted516 : @common.StreamSpec? = match mbt_ffi_load8_u((iter_base) + 180) { 0 => Option::None 1 => { - let result505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 184), mbt_ffi_load32((iter_base) + 188)) + let result507 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 184), mbt_ffi_load32((iter_base) + 188)) - let result506 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 192), mbt_ffi_load32((iter_base) + 196)) + let result508 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 192), mbt_ffi_load32((iter_base) + 196)) - let array509 : Array[@common.Example] = []; - for index510 = 0; index510 < (mbt_ffi_load32((iter_base) + 204)); index510 = index510 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 200)) + (index510 * 16) + let array511 : Array[@common.Example] = []; + for index512 = 0; index512 < (mbt_ffi_load32((iter_base) + 204)); index512 = index512 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 200)) + (index512 * 16) - let result507 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result509 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result508 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result510 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array509.push(@common.Example::{title : result507, body : result508}) + array511.push(@common.Example::{title : result509, body : result510}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 200)) - let array512 : Array[String] = []; - for index513 = 0; index513 < (mbt_ffi_load32((iter_base) + 212)); index513 = index513 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 208)) + (index513 * 8) + let array514 : Array[String] = []; + for index515 = 0; index515 < (mbt_ffi_load32((iter_base) + 212)); index515 = index515 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 208)) + (index515 * 8) - let result511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result513 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array512.push(result511) + array514.push(result513) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 208)) - Option::Some(@common.StreamSpec::{doc : @common.Doc::{summary : result505, description : result506, examples : array509}, mime : array512, required : (mbt_ffi_load8_u((iter_base) + 216) != 0)}) + Option::Some(@common.StreamSpec::{doc : @common.Doc::{summary : result507, description : result508, examples : array511}, mime : array514, required : (mbt_ffi_load8_u((iter_base) + 216) != 0)}) } _ => panic() } - let lifted524 : @common.StreamSpec? = match mbt_ffi_load8_u((iter_base) + 220) { + let lifted526 : @common.StreamSpec? = match mbt_ffi_load8_u((iter_base) + 220) { 0 => Option::None 1 => { - let result515 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 224), mbt_ffi_load32((iter_base) + 228)) + let result517 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 224), mbt_ffi_load32((iter_base) + 228)) - let result516 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 232), mbt_ffi_load32((iter_base) + 236)) + let result518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 232), mbt_ffi_load32((iter_base) + 236)) - let array519 : Array[@common.Example] = []; - for index520 = 0; index520 < (mbt_ffi_load32((iter_base) + 244)); index520 = index520 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 240)) + (index520 * 16) + let array521 : Array[@common.Example] = []; + for index522 = 0; index522 < (mbt_ffi_load32((iter_base) + 244)); index522 = index522 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 240)) + (index522 * 16) - let result517 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result519 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result520 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array519.push(@common.Example::{title : result517, body : result518}) + array521.push(@common.Example::{title : result519, body : result520}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 240)) - let array522 : Array[String] = []; - for index523 = 0; index523 < (mbt_ffi_load32((iter_base) + 252)); index523 = index523 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 248)) + (index523 * 8) + let array524 : Array[String] = []; + for index525 = 0; index525 < (mbt_ffi_load32((iter_base) + 252)); index525 = index525 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 248)) + (index525 * 8) - let result521 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result523 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array522.push(result521) + array524.push(result523) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 248)) - Option::Some(@common.StreamSpec::{doc : @common.Doc::{summary : result515, description : result516, examples : array519}, mime : array522, required : (mbt_ffi_load8_u((iter_base) + 256) != 0)}) + Option::Some(@common.StreamSpec::{doc : @common.Doc::{summary : result517, description : result518, examples : array521}, mime : array524, required : (mbt_ffi_load8_u((iter_base) + 256) != 0)}) } _ => panic() } - let lifted541 : @common.ResultSpec? = match mbt_ffi_load8_u((iter_base) + 260) { + let lifted543 : @common.ResultSpec? = match mbt_ffi_load8_u((iter_base) + 260) { 0 => Option::None 1 => { - let result525 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 268), mbt_ffi_load32((iter_base) + 272)) + let result527 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 268), mbt_ffi_load32((iter_base) + 272)) - let result526 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 276), mbt_ffi_load32((iter_base) + 280)) + let result528 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 276), mbt_ffi_load32((iter_base) + 280)) - let array529 : Array[@common.Example] = []; - for index530 = 0; index530 < (mbt_ffi_load32((iter_base) + 288)); index530 = index530 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 284)) + (index530 * 16) + let array531 : Array[@common.Example] = []; + for index532 = 0; index532 < (mbt_ffi_load32((iter_base) + 288)); index532 = index532 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 284)) + (index532 * 16) - let result527 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result529 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result528 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result530 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array529.push(@common.Example::{title : result527, body : result528}) + array531.push(@common.Example::{title : result529, body : result530}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 284)) - let array538 : Array[@common.Formatter] = []; - for index539 = 0; index539 < (mbt_ffi_load32((iter_base) + 296)); index539 = index539 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 292)) + (index539 * 32) + let array540 : Array[@common.Formatter] = []; + for index541 = 0; index541 < (mbt_ffi_load32((iter_base) + 296)); index541 = index541 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 292)) + (index541 * 32) - let result531 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result532 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result534 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result535 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let array536 : Array[@common.Example] = []; - for index537 = 0; index537 < (mbt_ffi_load32((iter_base) + 28)); index537 = index537 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index537 * 16) + let array538 : Array[@common.Example] = []; + for index539 = 0; index539 < (mbt_ffi_load32((iter_base) + 28)); index539 = index539 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index539 * 16) - let result534 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result536 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result535 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result537 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array536.push(@common.Example::{title : result534, body : result535}) + array538.push(@common.Example::{title : result536, body : result537}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - array538.push(@common.Formatter::{name : result531, doc : @common.Doc::{summary : result532, description : result533, examples : array536}}) + array540.push(@common.Formatter::{name : result533, doc : @common.Doc::{summary : result534, description : result535, examples : array538}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 292)) - let result540 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 300), mbt_ffi_load32((iter_base) + 304)) + let result542 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 300), mbt_ffi_load32((iter_base) + 304)) - Option::Some(@common.ResultSpec::{type_ : mbt_ffi_load32((iter_base) + 264), doc : @common.Doc::{summary : result525, description : result526, examples : array529}, formatters : array538, default_formatter : result540}) + Option::Some(@common.ResultSpec::{type_ : mbt_ffi_load32((iter_base) + 264), doc : @common.Doc::{summary : result527, description : result528, examples : array531}, formatters : array540, default_formatter : result542}) } _ => panic() } - let array550 : Array[@common.ErrorCase] = []; - for index551 = 0; index551 < (mbt_ffi_load32((iter_base) + 312)); index551 = index551 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 308)) + (index551 * 44) + let array552 : Array[@common.ErrorCase] = []; + for index553 = 0; index553 < (mbt_ffi_load32((iter_base) + 312)); index553 = index553 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 308)) + (index553 * 44) - let result542 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result544 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result543 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result545 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result544 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result546 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let array547 : Array[@common.Example] = []; - for index548 = 0; index548 < (mbt_ffi_load32((iter_base) + 28)); index548 = index548 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index548 * 16) + let array549 : Array[@common.Example] = []; + for index550 = 0; index550 < (mbt_ffi_load32((iter_base) + 28)); index550 = index550 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index550 * 16) - let result545 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result547 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result546 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result548 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array547.push(@common.Example::{title : result545, body : result546}) + array549.push(@common.Example::{title : result547, body : result548}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let lifted549 : Int? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted551 : Int? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { @@ -4024,11 +4064,11 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - array550.push(@common.ErrorCase::{name : result542, doc : @common.Doc::{summary : result543, description : result544, examples : array547}, kind : @common.ErrorKind::from(mbt_ffi_load8_u((iter_base) + 32)), exit_code : (mbt_ffi_load8_u((iter_base) + 33)).to_byte(), payload : lifted549}) + array552.push(@common.ErrorCase::{name : result544, doc : @common.Doc::{summary : result545, description : result546, examples : array549}, kind : @common.ErrorKind::from(mbt_ffi_load8_u((iter_base) + 32)), exit_code : (mbt_ffi_load8_u((iter_base) + 33)).to_byte(), payload : lifted551}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 308)) - let lifted552 : @common.CommandAnnotations? = match mbt_ffi_load8_u((iter_base) + 316) { + let lifted554 : @common.CommandAnnotations? = match mbt_ffi_load8_u((iter_base) + 316) { 0 => Option::None 1 => { @@ -4037,20 +4077,20 @@ pub fn get_all_tools() -> Array[RegisteredTool] { _ => panic() } - Option::Some(@common.CommandBody::{positionals : @common.Positionals::{fixed : array120, tail : lifted134}, options : array185, flags : array202, constraints : array503, stdin : lifted514, stdout : lifted524, result : lifted541, errors : array550, annotations : lifted552}) + Option::Some(@common.CommandBody::{positionals : @common.Positionals::{fixed : array121, tail : lifted135}, options : array187, flags : array204, constraints : array505, stdin : lifted516, stdout : lifted526, result : lifted543, errors : array552, annotations : lifted554}) } _ => panic() } - array554.push(@common.CommandNode::{name : result0, aliases : array, doc : @common.Doc::{summary : result2, description : result3, examples : array6}, globals : @common.Globals::{options : array57, flags : array74}, subcommands : array76, body : lifted553}) + array556.push(@common.CommandNode::{name : result0, aliases : array, doc : @common.Doc::{summary : result2, description : result3, examples : array6}, globals : @common.Globals::{options : array58, flags : array75}, subcommands : array77, body : lifted555}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array682 : Array[@types.SchemaTypeNode] = []; - for index683 = 0; index683 < (mbt_ffi_load32((iter_base) + 20)); index683 = index683 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index683 * 144) + let array754 : Array[@types.SchemaTypeNode] = []; + for index755 = 0; index755 < (mbt_ffi_load32((iter_base) + 20)); index755 = index755 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index755 * 144) - let lifted668 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted740 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -4061,642 +4101,807 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { + let lifted564 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted559 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { - - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted558 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted558) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted561 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted560 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array570 : Array[@types.NamedFieldType] = []; - for index571 = 0; index571 < (mbt_ffi_load32((iter_base) + 12)); index571 = index571 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index571 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted560) + } + _ => panic() + } - let lifted558 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted563 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result557 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result557) + Option::Some(result562) + } + _ => panic() } - _ => panic() - } - let array560 : Array[String] = []; - for index561 = 0; index561 < (mbt_ffi_load32((iter_base) + 28)); index561 = index561 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index561 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted559, max : lifted561, unit : lifted563}) + } + _ => panic() + } - let result559 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted564) + } + 3 => { - array560.push(result559) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted571 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array563 : Array[String] = []; - for index564 = 0; index564 < (mbt_ffi_load32((iter_base) + 36)); index564 = index564 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index564 * 8) + let lifted566 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted565 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array563.push(result562) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted566 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result565) + Option::Some(lifted565) + } + _ => panic() } - _ => panic() - } - let lifted569 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted568 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted568 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted567 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - let result567 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result567) - } - _ => panic() + Option::Some(lifted567) } + _ => panic() + } + + let lifted570 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some(lifted568) + let result569 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result569) + } + _ => panic() } - _ => panic() - } - array570.push(@types.NamedFieldType::{name : result556, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted558, aliases : array560, examples : array563, deprecated : lifted566, role : lifted569}}) + Option::Some(@types.NumericRestrictions::{min : lifted566, max : lifted568, unit : lifted570}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array570) + @types.SchemaTypeBody::S16Type(lifted571) } - 15 => { + 4 => { - let array587 : Array[@types.VariantCaseType] = []; - for index588 = 0; index588 < (mbt_ffi_load32((iter_base) + 12)); index588 = index588 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index588 * 72) + let lifted578 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result572 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted573 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted573 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted572 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted575 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result574 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result574) + Option::Some(lifted572) + } + _ => panic() } - _ => panic() - } - let array577 : Array[String] = []; - for index578 = 0; index578 < (mbt_ffi_load32((iter_base) + 32)); index578 = index578 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index578 * 8) + let lifted575 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result576 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted574 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - array577.push(result576) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let array580 : Array[String] = []; - for index581 = 0; index581 < (mbt_ffi_load32((iter_base) + 40)); index581 = index581 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index581 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result579 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array580.push(result579) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + Option::Some(lifted574) + } + _ => panic() + } - let lifted583 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + let lifted577 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result582 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result576 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result582) + Option::Some(result576) + } + _ => panic() } - _ => panic() + + Option::Some(@types.NumericRestrictions::{min : lifted573, max : lifted575, unit : lifted577}) } + _ => panic() + } - let lifted586 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::S32Type(lifted578) + } + 5 => { - let lifted585 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + let lifted585 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.Role::Multimodal - } - 1 => { + let lifted580 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredText - } - 2 => { + let lifted579 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.Role::UnstructuredBinary - } - 3 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result584 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::Other(result584) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() - } - Option::Some(lifted585) + Option::Some(lifted579) + } + _ => panic() } - _ => panic() - } - array587.push(@types.VariantCaseType::{name : result572, payload : lifted573, metadata : @types.MetadataEnvelope::{doc : lifted575, aliases : array577, examples : array580, deprecated : lifted583, role : lifted586}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted582 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::VariantType(array587) - } - 16 => { + let lifted581 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array590 : Array[String] = []; - for index591 = 0; index591 < (mbt_ffi_load32((iter_base) + 12)); index591 = index591 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index591 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result589 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - array590.push(result589) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::EnumType(array590) - } - 17 => { + Option::Some(lifted581) + } + _ => panic() + } + + let lifted584 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let array593 : Array[String] = []; - for index594 = 0; index594 < (mbt_ffi_load32((iter_base) + 12)); index594 = index594 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index594 * 8) + let result583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result592 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(result583) + } + _ => panic() + } - array593.push(result592) + Option::Some(@types.NumericRestrictions::{min : lifted580, max : lifted582, unit : lifted584}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array593) + @types.SchemaTypeBody::S64Type(lifted585) } - 18 => { + 6 => { - let array595 : Array[Int] = []; - for index596 = 0; index596 < (mbt_ffi_load32((iter_base) + 12)); index596 = index596 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index596 * 4) + let lifted592 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array595.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted587 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::TupleType(array595) - } - 19 => { + let lifted586 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) - } - 23 => { + Option::Some(lifted586) + } + _ => panic() + } - let lifted597 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted589 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let lifted588 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted598 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 20)) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted597, err : lifted598}) - } - 24 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted602 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + Option::Some(lifted588) + } + _ => panic() + } - let array600 : Array[String] = []; - for index601 = 0; index601 < (mbt_ffi_load32((iter_base) + 16)); index601 = index601 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index601 * 8) + let lifted591 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result599 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result590 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array600.push(result599) + Option::Some(result590) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array600) + Option::Some(@types.NumericRestrictions::{min : lifted587, max : lifted589, unit : lifted591}) } _ => panic() } - let lifted603 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + @types.SchemaTypeBody::U8Type(lifted592) + } + 7 => { + + let lifted599 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let lifted594 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted604 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let lifted593 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted606 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result605 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result605) - } - _ => panic() - } + Option::Some(lifted593) + } + _ => panic() + } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted602, min_length : lifted603, max_length : lifted604, regex : lifted606}) - } - 25 => { + let lifted596 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted610 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted595 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array608 : Array[String] = []; - for index609 = 0; index609 < (mbt_ffi_load32((iter_base) + 16)); index609 = index609 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index609 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result607 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - array608.push(result607) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(array608) - } - _ => panic() - } + Option::Some(lifted595) + } + _ => panic() + } - let lifted611 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let lifted598 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let result597 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted612 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + Option::Some(result597) + } + _ => panic() + } - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + Option::Some(@types.NumericRestrictions::{min : lifted594, max : lifted596, unit : lifted598}) } _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted610, min_bytes : lifted611, max_bytes : lifted612}) + @types.SchemaTypeBody::U16Type(lifted599) } - 26 => { + 8 => { - let lifted616 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted606 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array614 : Array[String] = []; - for index615 = 0; index615 < (mbt_ffi_load32((iter_base) + 20)); index615 = index615 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index615 * 8) + let lifted601 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result613 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted600 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array614.push(result613) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - Option::Some(array614) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted620 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let array618 : Array[String] = []; - for index619 = 0; index619 < (mbt_ffi_load32((iter_base) + 32)); index619 = index619 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index619 * 8) + Option::Some(lifted600) + } + _ => panic() + } - let result617 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted603 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - array618.push(result617) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let lifted602 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - Option::Some(array618) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted616, allowed_extensions : lifted620}) - } - 27 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted624 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted602) + } + _ => panic() + } - let array622 : Array[String] = []; - for index623 = 0; index623 < (mbt_ffi_load32((iter_base) + 16)); index623 = index623 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index623 * 8) + let lifted605 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result621 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result604 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array622.push(result621) + Option::Some(result604) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array622) + Option::Some(@types.NumericRestrictions::{min : lifted601, max : lifted603, unit : lifted605}) } _ => panic() } - let lifted628 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + @types.SchemaTypeBody::U32Type(lifted606) + } + 9 => { + + let lifted613 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array626 : Array[String] = []; - for index627 = 0; index627 < (mbt_ffi_load32((iter_base) + 28)); index627 = index627 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index627 * 8) - - let result625 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted608 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - array626.push(result625) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted607 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(array626) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted624, allowed_hosts : lifted628}) - } - 28 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::DatetimeType - } - 29 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::DurationType - } - 30 => { + Option::Some(lifted607) + } + _ => panic() + } - let result629 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted610 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array631 : Array[String] = []; - for index632 = 0; index632 < (mbt_ffi_load32((iter_base) + 20)); index632 = index632 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index632 * 8) + let lifted609 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result630 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - array631.push(result630) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted634 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result633 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + Option::Some(lifted609) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result633}) - } - _ => panic() - } + let lifted612 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted636 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let result611 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result635 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + Option::Some(result611) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result635}) + Option::Some(@types.NumericRestrictions::{min : lifted608, max : lifted610, unit : lifted612}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result629, allowed_suffixes : array631, min : lifted634, max : lifted636}) + @types.SchemaTypeBody::U64Type(lifted613) } - 31 => { + 10 => { - let array660 : Array[@types.UnionBranch] = []; - for index661 = 0; index661 < (mbt_ffi_load32((iter_base) + 12)); index661 = index661 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index661 * 92) + let lifted620 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result637 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted615 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted646 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + let lifted614 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result638 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.DiscriminatorRule::Prefix(result638) - } - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result639 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.DiscriminatorRule::Suffix(result639) + Option::Some(lifted614) + } + _ => panic() } - 2 => { - let result640 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted617 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.DiscriminatorRule::Contains(result640) - } - 3 => { + let lifted616 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result641 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.DiscriminatorRule::Regex(result641) - } - 4 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result642 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted644 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + Option::Some(lifted616) + } + _ => panic() + } - let result643 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let lifted619 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some(result643) + let result618 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result618) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted615, max : lifted617, unit : lifted619}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted620) + } + 11 => { + + let lifted627 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted622 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted621 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() + + Option::Some(lifted621) } + _ => panic() + } + + let lifted624 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted623 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result642, literal : lifted644}) + Option::Some(lifted623) + } + _ => panic() } - 5 => { - let result645 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted626 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result625 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.DiscriminatorRule::FieldAbsent(result645) + Option::Some(result625) + } + _ => panic() } - _ => panic() + + Option::Some(@types.NumericRestrictions::{min : lifted622, max : lifted624, unit : lifted626}) } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted627) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array642 : Array[@types.NamedFieldType] = []; + for index643 = 0; index643 < (mbt_ffi_load32((iter_base) + 12)); index643 = index643 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index643 * 68) - let lifted648 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let result628 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted630 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result647 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result629 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result647) + Option::Some(result629) } _ => panic() } - let array650 : Array[String] = []; - for index651 = 0; index651 < (mbt_ffi_load32((iter_base) + 52)); index651 = index651 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index651 * 8) + let array632 : Array[String] = []; + for index633 = 0; index633 < (mbt_ffi_load32((iter_base) + 28)); index633 = index633 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index633 * 8) - let result649 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result631 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array650.push(result649) + array632.push(result631) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array653 : Array[String] = []; - for index654 = 0; index654 < (mbt_ffi_load32((iter_base) + 60)); index654 = index654 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index654 * 8) + let array635 : Array[String] = []; + for index636 = 0; index636 < (mbt_ffi_load32((iter_base) + 36)); index636 = index636 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index636 * 8) - let result652 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array653.push(result652) + array635.push(result634) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted656 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted638 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result655 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result637 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result655) + Option::Some(result637) } _ => panic() } - let lifted659 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted641 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted658 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted640 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -4711,1189 +4916,1311 @@ pub fn get_all_tools() -> Array[RegisteredTool] { } 3 => { - let result657 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result639 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result657) + @types.Role::Other(result639) } _ => panic() } - Option::Some(lifted658) + Option::Some(lifted640) } _ => panic() } - array660.push(@types.UnionBranch::{tag : result637, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted646, metadata : @types.MetadataEnvelope::{doc : lifted648, aliases : array650, examples : array653, deprecated : lifted656, role : lifted659}}) + array642.push(@types.NamedFieldType::{name : result628, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted630, aliases : array632, examples : array635, deprecated : lifted638, role : lifted641}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array660}) + @types.SchemaTypeBody::RecordType(array642) } - 32 => { + 15 => { - let lifted663 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let array659 : Array[@types.VariantCaseType] = []; + for index660 = 0; index660 < (mbt_ffi_load32((iter_base) + 12)); index660 = index660 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index660 * 72) - let result662 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result644 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(result662) - } - _ => panic() - } + let lifted645 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted663}) - } - 33 => { + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - let lifted665 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted647 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result664 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result646 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result664) + Option::Some(result646) + } + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted665}) - } - 34 => { + let array649 : Array[String] = []; + for index650 = 0; index650 < (mbt_ffi_load32((iter_base) + 32)); index650 = index650 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index650 * 8) - let lifted666 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result648 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) + array649.push(result648) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - @types.SchemaTypeBody::FutureType(lifted666) - } - 35 => { + let array652 : Array[String] = []; + for index653 = 0; index653 < (mbt_ffi_load32((iter_base) + 40)); index653 = index653 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index653 * 8) - let lifted667 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result651 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) + array652.push(result651) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - @types.SchemaTypeBody::StreamType(lifted667) - } - _ => panic() - } + let lifted655 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - let lifted670 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { + let result654 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - let result669 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + Option::Some(result654) + } + _ => panic() + } - Option::Some(result669) - } - _ => panic() - } + let lifted658 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let array672 : Array[String] = []; - for index673 = 0; index673 < (mbt_ffi_load32((iter_base) + 104)); index673 = index673 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index673 * 8) + let lifted657 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - let result671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.Role::Multimodal + } + 1 => { - array672.push(result671) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + @types.Role::UnstructuredText + } + 2 => { - let array675 : Array[String] = []; - for index676 = 0; index676 < (mbt_ffi_load32((iter_base) + 112)); index676 = index676 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index676 * 8) + @types.Role::UnstructuredBinary + } + 3 => { - let result674 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result656 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - array675.push(result674) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + @types.Role::Other(result656) + } + _ => panic() + } - let lifted678 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + Option::Some(lifted657) + } + _ => panic() + } - let result677 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + array659.push(@types.VariantCaseType::{name : result644, payload : lifted645, metadata : @types.MetadataEnvelope::{doc : lifted647, aliases : array649, examples : array652, deprecated : lifted655, role : lifted658}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - Option::Some(result677) + @types.SchemaTypeBody::VariantType(array659) } - _ => panic() - } + 16 => { - let lifted681 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + let array662 : Array[String] = []; + for index663 = 0; index663 < (mbt_ffi_load32((iter_base) + 12)); index663 = index663 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index663 * 8) - let lifted680 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + let result661 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.Role::Multimodal - } - 1 => { + array662.push(result661) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.Role::UnstructuredText - } - 2 => { + @types.SchemaTypeBody::EnumType(array662) + } + 17 => { - @types.Role::UnstructuredBinary - } - 3 => { + let array665 : Array[String] = []; + for index666 = 0; index666 < (mbt_ffi_load32((iter_base) + 12)); index666 = index666 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index666 * 8) - let result679 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result664 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.Role::Other(result679) - } - _ => panic() + array665.push(result664) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - Option::Some(lifted680) + @types.SchemaTypeBody::FlagsType(array665) } - _ => panic() - } + 18 => { - array682.push(@types.SchemaTypeNode::{body : lifted668, metadata : @types.MetadataEnvelope::{doc : lifted670, aliases : array672, examples : array675, deprecated : lifted678, role : lifted681}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + let array667 : Array[Int] = []; + for index668 = 0; index668 < (mbt_ffi_load32((iter_base) + 12)); index668 = index668 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index668 * 4) - let array687 : Array[@types.SchemaTypeDef] = []; - for index688 = 0; index688 < (mbt_ffi_load32((iter_base) + 28)); index688 = index688 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index688 * 24) + array667.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let result684 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::TupleType(array667) + } + 19 => { - let lifted686 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { - let result685 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { - Option::Some(result685) + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) } - _ => panic() - } + 22 => { - array687.push(@types.SchemaTypeDef::{id : result684, name : lifted686, body : mbt_ffi_load32((iter_base) + 20)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { - array689.push(RegisteredTool::{definition : @common.Tool::{version : result, commands : @common.CommandTree::{nodes : array554}, schema : @types.SchemaGraph::{type_nodes : array682, defs : array687, root : mbt_ffi_load32((iter_base) + 32)}}, implemented_by : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 48)).reinterpret_as_uint64()}}}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 0)) - let ret = array689 - mbt_ffi_free(return_area) - return ret + let lifted669 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { -} -///| -/// Returns the registered tool with the given name iff the -/// calling agent has access to it (per the same per-env and -/// per-agent binding rules as `get-all-tools`). Returns `none` -/// either if the tool is not registered or if the calling agent -/// has no binding for it; the two cases are not distinguished. -pub fn get_tool(name : String) -> RegisteredTool? { + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - let ptr = mbt_ffi_str2ptr(name) - let return_area = mbt_ffi_malloc(64) - wasmImportGetTool(ptr, name.length(), return_area); + let lifted670 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted689 : RegisteredTool? = match mbt_ffi_load8_u((return_area) + 0) { - 0 => Option::None - 1 => { + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } - let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted669, err : lifted670}) + } + 24 => { - let array554 : Array[@common.CommandNode] = []; - for index555 = 0; index555 < (mbt_ffi_load32((return_area) + 20)); index555 = index555 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index555 * 324) + let lifted674 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result0 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array672 : Array[String] = []; + for index673 = 0; index673 < (mbt_ffi_load32((iter_base) + 16)); index673 = index673 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index673 * 8) - let array : Array[String] = []; - for index = 0; index < (mbt_ffi_load32((iter_base) + 12)); index = index + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index * 8) + let result671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result1 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + array672.push(result671) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - array.push(result1) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + Option::Some(array672) + } + _ => panic() + } - let result2 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted675 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - let result3 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - - let array6 : Array[@common.Example] = []; - for index7 = 0; index7 < (mbt_ffi_load32((iter_base) + 36)); index7 = index7 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index7 * 16) - - let result4 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - let result5 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - - array6.push(@common.Example::{title : result4, body : result5}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - - let array57 : Array[@common.OptionSpec] = []; - for index58 = 0; index58 < (mbt_ffi_load32((iter_base) + 44)); index58 = index58 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index58 * 108) - - let result8 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } - let lifted : Char? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted676 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { - Option::Some(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 12))) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) } _ => panic() } - let array10 : Array[String] = []; - for index11 = 0; index11 < (mbt_ffi_load32((iter_base) + 20)); index11 = index11 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index11 * 8) + let lifted678 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - let result9 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result677 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - array10.push(result9) + Option::Some(result677) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let result12 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted674, min_length : lifted675, max_length : lifted676, regex : lifted678}) + } + 25 => { - let result13 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let lifted682 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array16 : Array[@common.Example] = []; - for index17 = 0; index17 < (mbt_ffi_load32((iter_base) + 44)); index17 = index17 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index17 * 16) + let array680 : Array[String] = []; + for index681 = 0; index681 < (mbt_ffi_load32((iter_base) + 16)); index681 = index681 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index681 * 8) - let result14 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result679 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result15 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + array680.push(result679) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - array16.push(@common.Example::{title : result14, body : result15}) + Option::Some(array680) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let lifted19 : String? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted683 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let result18 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - - Option::Some(result18) + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) } _ => panic() } - let lifted21 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { - - @common.OptionShape::Scalar(mbt_ffi_load32((iter_base) + 64)) - } + let lifted684 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None 1 => { - @common.OptionShape::OptionalScalar(mbt_ffi_load32((iter_base) + 64)) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) } - 2 => { + _ => panic() + } - let lifted20 = match (mbt_ffi_load8_u((iter_base) + 64)) { - 0 => { + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted682, min_bytes : lifted683, max_bytes : lifted684}) + } + 26 => { - @common.Repetition::Repeated - } - 1 => { + let lifted688 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - @common.Repetition::Delimited(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) - } - 2 => { + let array686 : Array[String] = []; + for index687 = 0; index687 < (mbt_ffi_load32((iter_base) + 20)); index687 = index687 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index687 * 8) - @common.Repetition::Either(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) - } - _ => panic() + let result685 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array686.push(result685) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @common.OptionShape::Repeatable(@common.RepeatableShape::{repetition : lifted20, type_ : mbt_ffi_load32((iter_base) + 72)}) + Option::Some(array686) } _ => panic() } - let lifted54 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted692 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array52 : Array[@types.SchemaValueNode] = []; - for index53 = 0; index53 < (mbt_ffi_load32((iter_base) + 84)); index53 = index53 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index53 * 32) + let array690 : Array[String] = []; + for index691 = 0; index691 < (mbt_ffi_load32((iter_base) + 32)); index691 = index691 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index691 * 8) - let lifted51 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let result689 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + array690.push(result689) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + Option::Some(array690) + } + _ => panic() + } - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted688, allowed_extensions : lifted692}) + } + 27 => { - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + let lifted696 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + let array694 : Array[String] = []; + for index695 = 0; index695 < (mbt_ffi_load32((iter_base) + 16)); index695 = index695 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index695 * 8) - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + let result693 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + array694.push(result693) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + Option::Some(array694) + } + _ => panic() + } - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + let lifted700 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + let array698 : Array[String] = []; + for index699 = 0; index699 < (mbt_ffi_load32((iter_base) + 28)); index699 = index699 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index699 * 8) - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + let result697 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + array698.push(result697) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let result22 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(array698) + } + _ => panic() + } - @types.SchemaValueNode::StringValue(result22) - } - 13 => { + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted696, allowed_hosts : lifted700}) + } + 28 => { - let array23 : Array[Int] = []; - for index24 = 0; index24 < (mbt_ffi_load32((iter_base) + 12)); index24 = index24 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index24 * 4) + @types.SchemaTypeBody::DatetimeType + } + 29 => { - array23.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaTypeBody::DurationType + } + 30 => { - @types.SchemaValueNode::RecordValue(array23) - } - 14 => { + let result701 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted25 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let array703 : Array[String] = []; + for index704 = 0; index704 < (mbt_ffi_load32((iter_base) + 20)); index704 = index704 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index704 * 8) - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + let result702 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted25}) - } - 15 => { + array703.push(result702) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + let lifted706 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - let array26 : Array[Bool] = []; - for index27 = 0; index27 < (mbt_ffi_load32((iter_base) + 12)); index27 = index27 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index27 * 1) + let result705 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - array26.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result705}) + } + _ => panic() + } - @types.SchemaValueNode::FlagsValue(array26) - } - 17 => { + let lifted708 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let array28 : Array[Int] = []; - for index29 = 0; index29 < (mbt_ffi_load32((iter_base) + 12)); index29 = index29 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index29 * 4) + let result707 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - array28.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result707}) + } + _ => panic() + } - @types.SchemaValueNode::TupleValue(array28) - } - 18 => { + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result701, allowed_suffixes : array703, min : lifted706, max : lifted708}) + } + 31 => { - let array30 : Array[Int] = []; - for index31 = 0; index31 < (mbt_ffi_load32((iter_base) + 12)); index31 = index31 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index31 * 4) + let array732 : Array[@types.UnionBranch] = []; + for index733 = 0; index733 < (mbt_ffi_load32((iter_base) + 12)); index733 = index733 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index733 * 92) - array30.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let result709 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::ListValue(array30) - } - 19 => { + let lifted718 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { - let array32 : Array[Int] = []; - for index33 = 0; index33 < (mbt_ffi_load32((iter_base) + 12)); index33 = index33 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index33 * 4) + let result710 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - array32.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.DiscriminatorRule::Prefix(result710) + } + 1 => { - @types.SchemaValueNode::FixedListValue(array32) - } - 20 => { + let result711 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let array34 : Array[@types.MapEntry] = []; - for index35 = 0; index35 < (mbt_ffi_load32((iter_base) + 12)); index35 = index35 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index35 * 8) + @types.DiscriminatorRule::Suffix(result711) + } + 2 => { - array34.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let result712 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.SchemaValueNode::MapValue(array34) - } - 21 => { + @types.DiscriminatorRule::Contains(result712) + } + 3 => { - let lifted36 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result713 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.DiscriminatorRule::Regex(result713) + } + 4 => { + + let result714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + let lifted716 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result715 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - @types.SchemaValueNode::OptionValue(lifted36) + Option::Some(result715) } - 22 => { + _ => panic() + } - let lifted39 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result714, literal : lifted716}) + } + 5 => { - let lifted37 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let result717 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + @types.DiscriminatorRule::FieldAbsent(result717) + } + _ => panic() + } - @types.ResultValuePayload::OkValue(lifted37) - } - 1 => { + let lifted720 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - let lifted38 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let result719 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + Option::Some(result719) + } + _ => panic() + } - @types.ResultValuePayload::ErrValue(lifted38) - } - _ => panic() - } + let array722 : Array[String] = []; + for index723 = 0; index723 < (mbt_ffi_load32((iter_base) + 52)); index723 = index723 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index723 * 8) - @types.SchemaValueNode::ResultValue(lifted39) - } - 23 => { + let result721 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result40 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + array722.push(result721) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let lifted42 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + let array725 : Array[String] = []; + for index726 = 0; index726 < (mbt_ffi_load32((iter_base) + 60)); index726 = index726 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index726 * 8) - let result41 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result724 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(result41) - } - _ => panic() - } - - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result40, language : lifted42}) - } - 24 => { - - let result43 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - - let lifted45 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { - - let result44 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + array725.push(result724) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - Option::Some(result44) - } - _ => panic() - } + let lifted728 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result43, mime_type : lifted45}) - } - 25 => { + let result727 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result46 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(result727) + } + _ => panic() + } - @types.SchemaValueNode::PathValue(result46) - } - 26 => { + let lifted731 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { - let result47 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted730 = match (mbt_ffi_load8_u((iter_base) + 80)) { + 0 => { - @types.SchemaValueNode::UrlValue(result47) + @types.Role::Multimodal } - 27 => { + 1 => { - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + @types.Role::UnstructuredText } - 28 => { + 2 => { - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + @types.Role::UnstructuredBinary } - 29 => { + 3 => { - let result48 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result729 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result48}) + @types.Role::Other(result729) } - 30 => { - - let result49 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + _ => panic() + } - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result49, body : mbt_ffi_load32((iter_base) + 16)}) - } - 31 => { + Option::Some(lifted730) + } + _ => panic() + } - let result50 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + array732.push(@types.UnionBranch::{tag : result709, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted718, metadata : @types.MetadataEnvelope::{doc : lifted720, aliases : array722, examples : array725, deprecated : lifted728, role : lifted731}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result50}) - } - 32 => { + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array732}) + } + 32 => { - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) - } - _ => panic() - } + let lifted735 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array52.push(lifted51) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) + let result734 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(@types.SchemaValueTree::{value_nodes : array52, root : mbt_ffi_load32((iter_base) + 88)}) + Option::Some(result734) } _ => panic() } - let lifted56 : String? = match mbt_ffi_load8_u((iter_base) + 96) { + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted735}) + } + 33 => { + + let lifted737 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result55 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 100), mbt_ffi_load32((iter_base) + 104)) + let result736 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result55) + Option::Some(result736) } _ => panic() } - array57.push(@common.OptionSpec::{long : result8, short : lifted, aliases : array10, doc : @common.Doc::{summary : result12, description : result13, examples : array16}, value_name : lifted19, shape : lifted21, default : lifted54, required : (mbt_ffi_load8_u((iter_base) + 92) != 0), env_var : lifted56}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted737}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) + 34 => { - let array74 : Array[@common.FlagSpec] = []; - for index75 = 0; index75 < (mbt_ffi_load32((iter_base) + 52)); index75 = index75 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index75 * 72) + let lifted738 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - let result59 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::FutureType(lifted738) + } + 35 => { - let lifted60 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted739 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 12))) + Option::Some(mbt_ffi_load32((iter_base) + 12)) } _ => panic() } - let array62 : Array[String] = []; - for index63 = 0; index63 < (mbt_ffi_load32((iter_base) + 20)); index63 = index63 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index63 * 8) + @types.SchemaTypeBody::StreamType(lifted739) + } + _ => panic() + } + + let lifted742 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + 0 => Option::None + 1 => { - let result61 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result741 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - array62.push(result61) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + Option::Some(result741) + } + _ => panic() + } - let result64 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let array744 : Array[String] = []; + for index745 = 0; index745 < (mbt_ffi_load32((iter_base) + 104)); index745 = index745 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index745 * 8) - let result65 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result743 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array68 : Array[@common.Example] = []; - for index69 = 0; index69 < (mbt_ffi_load32((iter_base) + 44)); index69 = index69 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index69 * 16) + array744.push(result743) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let result66 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array747 : Array[String] = []; + for index748 = 0; index748 < (mbt_ffi_load32((iter_base) + 112)); index748 = index748 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index748 * 8) - let result67 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result746 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array68.push(@common.Example::{title : result66, body : result67}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) + array747.push(result746) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted71 = match (mbt_ffi_load8_u((iter_base) + 48)) { + let lifted750 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { + + let result749 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + + Option::Some(result749) + } + _ => panic() + } + + let lifted753 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { + + let lifted752 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { - @common.FlagShape::BoolFlag(@common.BoolFlagShape::{default : (mbt_ffi_load8_u((iter_base) + 52) != 0), negatable : (mbt_ffi_load8_u((iter_base) + 53) != 0)}) + @types.Role::Multimodal } 1 => { - let lifted70 : UInt? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { - - Option::Some((mbt_ffi_load32((iter_base) + 56)).reinterpret_as_uint()) - } - _ => panic() - } - - @common.FlagShape::CountFlag(lifted70) + @types.Role::UnstructuredText } - _ => panic() - } + 2 => { - let lifted73 : String? = match mbt_ffi_load8_u((iter_base) + 60) { - 0 => Option::None - 1 => { + @types.Role::UnstructuredBinary + } + 3 => { - let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result751 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - Option::Some(result72) + @types.Role::Other(result751) } _ => panic() } - array74.push(@common.FlagSpec::{long : result59, short : lifted60, aliases : array62, doc : @common.Doc::{summary : result64, description : result65, examples : array68}, shape : lifted71, env_var : lifted73}) + Option::Some(lifted752) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + _ => panic() + } - let array76 : Array[Int] = []; - for index77 = 0; index77 < (mbt_ffi_load32((iter_base) + 60)); index77 = index77 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index77 * 4) + array754.push(@types.SchemaTypeNode::{body : lifted740, metadata : @types.MetadataEnvelope::{doc : lifted742, aliases : array744, examples : array747, deprecated : lifted750, role : lifted753}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - array76.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + let array759 : Array[@types.SchemaTypeDef] = []; + for index760 = 0; index760 < (mbt_ffi_load32((iter_base) + 28)); index760 = index760 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index760 * 24) - let lifted553 : @common.CommandBody? = match mbt_ffi_load8_u((iter_base) + 64) { - 0 => Option::None - 1 => { + let result756 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array120 : Array[@common.Positional] = []; - for index121 = 0; index121 < (mbt_ffi_load32((iter_base) + 72)); index121 = index121 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index121 * 68) + let lifted758 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result757 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(result757) + } + _ => panic() + } - let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + array759.push(@types.SchemaTypeDef::{id : result756, name : lifted758, body : mbt_ffi_load32((iter_base) + 20)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array83 : Array[@common.Example] = []; - for index84 = 0; index84 < (mbt_ffi_load32((iter_base) + 28)); index84 = index84 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index84 * 16) + array761.push(RegisteredTool::{definition : @common.Tool::{version : result, commands : @common.CommandTree::{nodes : array556}, schema : @types.SchemaGraph::{type_nodes : array754, defs : array759, root : mbt_ffi_load32((iter_base) + 32)}}, implemented_by : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((iter_base) + 40)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((iter_base) + 48)).reinterpret_as_uint64()}}}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 0)) + let ret = array761 + mbt_ffi_free(return_area) + return ret - let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) +} +///| +/// Returns the registered tool with the given name iff the +/// calling agent has access to it (per the same per-env and +/// per-agent binding rules as `get-all-tools`). Returns `none` +/// either if the tool is not registered or if the calling agent +/// has no binding for it; the two cases are not distinguished. +pub fn get_tool(name : String) -> RegisteredTool? { - let result82 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let ptr = mbt_ffi_str2ptr(name) + let return_area = mbt_ffi_malloc(64) + wasmImportGetTool(ptr, name.length(), return_area); - array83.push(@common.Example::{title : result81, body : result82}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted761 : RegisteredTool? = match mbt_ffi_load8_u((return_area) + 0) { + 0 => Option::None + 1 => { - let lifted86 : String? = match mbt_ffi_load8_u((iter_base) + 32) { - 0 => Option::None - 1 => { + let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + let array556 : Array[@common.CommandNode] = []; + for index557 = 0; index557 < (mbt_ffi_load32((return_area) + 20)); index557 = index557 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index557 * 324) - Option::Some(result85) - } - _ => panic() - } + let result0 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted119 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 48) { - 0 => Option::None - 1 => { + let array : Array[String] = []; + for index = 0; index < (mbt_ffi_load32((iter_base) + 12)); index = index + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index * 8) - let array117 : Array[@types.SchemaValueNode] = []; - for index118 = 0; index118 < (mbt_ffi_load32((iter_base) + 56)); index118 = index118 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index118 * 32) + let result1 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted116 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + array.push(result1) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + let result2 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + let result3 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + let array6 : Array[@common.Example] = []; + for index7 = 0; index7 < (mbt_ffi_load32((iter_base) + 36)); index7 = index7 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index7 * 16) - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + let result4 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + let result5 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + array6.push(@common.Example::{title : result4, body : result5}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + let array58 : Array[@common.OptionSpec] = []; + for index59 = 0; index59 < (mbt_ffi_load32((iter_base) + 44)); index59 = index59 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index59 * 112) - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + let result8 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + let lifted : Char? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + Option::Some(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 12))) + } + _ => panic() + } - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + let array10 : Array[String] = []; + for index11 = 0; index11 < (mbt_ffi_load32((iter_base) + 20)); index11 = index11 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index11 * 8) - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + let result9 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + array10.push(result9) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @types.SchemaValueNode::StringValue(result87) - } - 13 => { + let result12 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let array88 : Array[Int] = []; - for index89 = 0; index89 < (mbt_ffi_load32((iter_base) + 12)); index89 = index89 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index89 * 4) + let result13 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - array88.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let array16 : Array[@common.Example] = []; + for index17 = 0; index17 < (mbt_ffi_load32((iter_base) + 44)); index17 = index17 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index17 * 16) - @types.SchemaValueNode::RecordValue(array88) - } - 14 => { + let result14 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted90 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let result15 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + array16.push(@common.Example::{title : result14, body : result15}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted90}) - } - 15 => { + let lifted19 : String? = match mbt_ffi_load8_u((iter_base) + 48) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + let result18 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - let array91 : Array[Bool] = []; - for index92 = 0; index92 < (mbt_ffi_load32((iter_base) + 12)); index92 = index92 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index92 * 1) + Option::Some(result18) + } + _ => panic() + } - array91.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted22 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - @types.SchemaValueNode::FlagsValue(array91) - } - 17 => { + @common.OptionShape::Scalar(mbt_ffi_load32((iter_base) + 64)) + } + 1 => { - let array93 : Array[Int] = []; - for index94 = 0; index94 < (mbt_ffi_load32((iter_base) + 12)); index94 = index94 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index94 * 4) + @common.OptionShape::OptionalScalar(mbt_ffi_load32((iter_base) + 64)) + } + 2 => { - array93.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted20 = match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => { - @types.SchemaValueNode::TupleValue(array93) - } - 18 => { + @common.Repetition::Repeated + } + 1 => { - let array95 : Array[Int] = []; - for index96 = 0; index96 < (mbt_ffi_load32((iter_base) + 12)); index96 = index96 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index96 * 4) + @common.Repetition::Delimited(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) + } + 2 => { - array95.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @common.Repetition::Either(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) + } + _ => panic() + } - @types.SchemaValueNode::ListValue(array95) - } - 19 => { + @common.OptionShape::RepeatableList(@common.RepeatableListShape::{repetition : lifted20, item_type : mbt_ffi_load32((iter_base) + 72)}) + } + 3 => { - let array97 : Array[Int] = []; - for index98 = 0; index98 < (mbt_ffi_load32((iter_base) + 12)); index98 = index98 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index98 * 4) + let lifted21 = match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => { - array97.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @common.Repetition::Repeated + } + 1 => { - @types.SchemaValueNode::FixedListValue(array97) - } - 20 => { + @common.Repetition::Delimited(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) + } + 2 => { - let array99 : Array[@types.MapEntry] = []; - for index100 = 0; index100 < (mbt_ffi_load32((iter_base) + 12)); index100 = index100 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index100 * 8) + @common.Repetition::Either(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) + } + _ => panic() + } - array99.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @common.OptionShape::RepeatableMap(@common.RepeatableMapShape::{repetition : lifted21, map_type : mbt_ffi_load32((iter_base) + 72), duplicate_key_policy : @common.DuplicateKeyPolicy::from(mbt_ffi_load8_u((iter_base) + 76))}) + } + _ => panic() + } - @types.SchemaValueNode::MapValue(array99) - } - 21 => { + let lifted55 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 80) { + 0 => Option::None + 1 => { - let lifted101 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let array53 : Array[@types.SchemaValueNode] = []; + for index54 = 0; index54 < (mbt_ffi_load32((iter_base) + 88)); index54 = index54 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index54 * 32) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let lifted52 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - @types.SchemaValueNode::OptionValue(lifted101) - } - 22 => { + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) + } + 1 => { - let lifted104 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { - let lifted102 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { - @types.ResultValuePayload::OkValue(lifted102) - } - 1 => { + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { - let lifted103 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { - @types.ResultValuePayload::ErrValue(lifted103) - } - _ => panic() - } + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { - @types.SchemaValueNode::ResultValue(lifted104) - } - 23 => { + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { - let result105 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { - let lifted107 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { - let result106 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { - Option::Some(result106) - } - _ => panic() - } + let result23 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result105, language : lifted107}) - } - 24 => { + @types.SchemaValueNode::StringValue(result23) + } + 13 => { - let result108 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let array24 : Array[Int] = []; + for index25 = 0; index25 < (mbt_ffi_load32((iter_base) + 12)); index25 = index25 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index25 * 4) - let lifted110 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + array24.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let result109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.SchemaValueNode::RecordValue(array24) + } + 14 => { - Option::Some(result109) - } - _ => panic() - } + let lifted26 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result108, mime_type : lifted110}) + Option::Some(mbt_ffi_load32((iter_base) + 16)) } - 25 => { + _ => panic() + } - let result111 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted26}) + } + 15 => { - @types.SchemaValueNode::PathValue(result111) - } - 26 => { + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { - let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let array27 : Array[Bool] = []; + for index28 = 0; index28 < (mbt_ffi_load32((iter_base) + 12)); index28 = index28 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index28 * 1) - @types.SchemaValueNode::UrlValue(result112) - } - 27 => { + array27.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) - } - 28 => { + @types.SchemaValueNode::FlagsValue(array27) + } + 17 => { - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) - } - 29 => { + let array29 : Array[Int] = []; + for index30 = 0; index30 < (mbt_ffi_load32((iter_base) + 12)); index30 = index30 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index30 * 4) - let result113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + array29.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result113}) - } - 30 => { + @types.SchemaValueNode::TupleValue(array29) + } + 18 => { - let result114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let array31 : Array[Int] = []; + for index32 = 0; index32 < (mbt_ffi_load32((iter_base) + 12)); index32 = index32 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index32 * 4) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result114, body : mbt_ffi_load32((iter_base) + 16)}) - } - 31 => { + array31.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let result115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.SchemaValueNode::ListValue(array31) + } + 19 => { - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result115}) - } - 32 => { + let array33 : Array[Int] = []; + for index34 = 0; index34 < (mbt_ffi_load32((iter_base) + 12)); index34 = index34 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index34 * 4) - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) - } - _ => panic() + array33.push(mbt_ffi_load32((iter_base) + 0)) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - array117.push(lifted116) + @types.SchemaValueNode::FixedListValue(array33) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 52)) + 20 => { - Option::Some(@types.SchemaValueTree::{value_nodes : array117, root : mbt_ffi_load32((iter_base) + 60)}) - } - _ => panic() - } + let array35 : Array[@types.MapEntry] = []; + for index36 = 0; index36 < (mbt_ffi_load32((iter_base) + 12)); index36 = index36 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index36 * 8) - array120.push(@common.Positional::{name : result78, doc : @common.Doc::{summary : result79, description : result80, examples : array83}, value_name : lifted86, type_ : mbt_ffi_load32((iter_base) + 44), default : lifted119, required : (mbt_ffi_load8_u((iter_base) + 64) != 0)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + array35.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let lifted134 : @common.TailPositional? = match mbt_ffi_load8_u((iter_base) + 76) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::MapValue(array35) + } + 21 => { + + let lifted37 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result122 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - let result123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) + @types.SchemaValueNode::OptionValue(lifted37) + } + 22 => { - let result124 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 96), mbt_ffi_load32((iter_base) + 100)) + let lifted40 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { - let array127 : Array[@common.Example] = []; - for index128 = 0; index128 < (mbt_ffi_load32((iter_base) + 108)); index128 = index128 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 104)) + (index128 * 16) + let lifted38 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - let result126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.ResultValuePayload::OkValue(lifted38) + } + 1 => { - array127.push(@common.Example::{title : result125, body : result126}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 104)) + let lifted39 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - let lifted130 : String? = match mbt_ffi_load8_u((iter_base) + 112) { - 0 => Option::None - 1 => { + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - let result129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 116), mbt_ffi_load32((iter_base) + 120)) + @types.ResultValuePayload::ErrValue(lifted39) + } + _ => panic() + } - Option::Some(result129) + @types.SchemaValueNode::ResultValue(lifted40) } - _ => panic() - } + 23 => { - let lifted131 : UInt? = match mbt_ffi_load8_u((iter_base) + 132) { - 0 => Option::None - 1 => { + let result41 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - Option::Some((mbt_ffi_load32((iter_base) + 136)).reinterpret_as_uint()) + let lifted43 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result42 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result42) + } + _ => panic() + } + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result41, language : lifted43}) } - _ => panic() - } + 24 => { - let lifted133 : String? = match mbt_ffi_load8_u((iter_base) + 140) { - 0 => Option::None - 1 => { + let result44 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted46 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result45 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result45) + } + _ => panic() + } + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result44, mime_type : lifted46}) + } + 25 => { + + let result47 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::PathValue(result47) + } + 26 => { + + let result48 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UrlValue(result48) + } + 27 => { + + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + } + 28 => { + + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + } + 29 => { + + let result49 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result49}) + } + 30 => { + + let result50 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result50, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { - let result132 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 144), mbt_ffi_load32((iter_base) + 148)) + let result51 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result51}) + } + 32 => { - Option::Some(result132) + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) } _ => panic() } - Option::Some(@common.TailPositional::{name : result122, doc : @common.Doc::{summary : result123, description : result124, examples : array127}, value_name : lifted130, item_type : mbt_ffi_load32((iter_base) + 124), min : (mbt_ffi_load32((iter_base) + 128)).reinterpret_as_uint(), max : lifted131, separator : lifted133, verbatim : (mbt_ffi_load8_u((iter_base) + 152) != 0)}) + array53.push(lifted52) } - _ => panic() + mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) + + Option::Some(@types.SchemaValueTree::{value_nodes : array53, root : mbt_ffi_load32((iter_base) + 92)}) + } + _ => panic() + } + + let lifted57 : String? = match mbt_ffi_load8_u((iter_base) + 100) { + 0 => Option::None + 1 => { + + let result56 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 104), mbt_ffi_load32((iter_base) + 108)) + + Option::Some(result56) } + _ => panic() + } - let array185 : Array[@common.OptionSpec] = []; - for index186 = 0; index186 < (mbt_ffi_load32((iter_base) + 160)); index186 = index186 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 156)) + (index186 * 108) + array58.push(@common.OptionSpec::{long : result8, short : lifted, aliases : array10, doc : @common.Doc::{summary : result12, description : result13, examples : array16}, value_name : lifted19, shape : lifted22, default : lifted55, required : (mbt_ffi_load8_u((iter_base) + 96) != 0), env_var : lifted57}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array75 : Array[@common.FlagSpec] = []; + for index76 = 0; index76 < (mbt_ffi_load32((iter_base) + 52)); index76 = index76 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index76 * 72) - let lifted136 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result60 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 12))) - } - _ => panic() - } + let lifted61 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array138 : Array[String] = []; - for index139 = 0; index139 < (mbt_ffi_load32((iter_base) + 20)); index139 = index139 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index139 * 8) + Option::Some(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 12))) + } + _ => panic() + } - let result137 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array63 : Array[String] = []; + for index64 = 0; index64 < (mbt_ffi_load32((iter_base) + 20)); index64 = index64 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index64 * 8) - array138.push(result137) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + let result62 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array63.push(result62) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let result140 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result65 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let result141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result66 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let array144 : Array[@common.Example] = []; - for index145 = 0; index145 < (mbt_ffi_load32((iter_base) + 44)); index145 = index145 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index145 * 16) + let array69 : Array[@common.Example] = []; + for index70 = 0; index70 < (mbt_ffi_load32((iter_base) + 44)); index70 = index70 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index70 * 16) - let result142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result67 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result68 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array144.push(@common.Example::{title : result142, body : result143}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) + array69.push(@common.Example::{title : result67, body : result68}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) + + let lifted72 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @common.FlagShape::BoolFlag(@common.BoolFlagShape::{default : (mbt_ffi_load8_u((iter_base) + 52) != 0), negatable : (mbt_ffi_load8_u((iter_base) + 53) != 0)}) + } + 1 => { - let lifted147 : String? = match mbt_ffi_load8_u((iter_base) + 48) { + let lifted71 : UInt? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let result146 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) - - Option::Some(result146) + Option::Some((mbt_ffi_load32((iter_base) + 56)).reinterpret_as_uint()) } _ => panic() } - let lifted149 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + @common.FlagShape::CountFlag(lifted71) + } + _ => panic() + } - @common.OptionShape::Scalar(mbt_ffi_load32((iter_base) + 64)) - } - 1 => { + let lifted74 : String? = match mbt_ffi_load8_u((iter_base) + 60) { + 0 => Option::None + 1 => { - @common.OptionShape::OptionalScalar(mbt_ffi_load32((iter_base) + 64)) - } - 2 => { + let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - let lifted148 = match (mbt_ffi_load8_u((iter_base) + 64)) { - 0 => { + Option::Some(result73) + } + _ => panic() + } - @common.Repetition::Repeated - } - 1 => { + array75.push(@common.FlagSpec::{long : result60, short : lifted61, aliases : array63, doc : @common.Doc::{summary : result65, description : result66, examples : array69}, shape : lifted72, env_var : lifted74}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - @common.Repetition::Delimited(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) - } - 2 => { + let array77 : Array[Int] = []; + for index78 = 0; index78 < (mbt_ffi_load32((iter_base) + 60)); index78 = index78 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index78 * 4) - @common.Repetition::Either(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) - } - _ => panic() - } + array77.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + + let lifted555 : @common.CommandBody? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let array121 : Array[@common.Positional] = []; + for index122 = 0; index122 < (mbt_ffi_load32((iter_base) + 72)); index122 = index122 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 68)) + (index122 * 68) + + let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + let array84 : Array[@common.Example] = []; + for index85 = 0; index85 < (mbt_ffi_load32((iter_base) + 28)); index85 = index85 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index85 * 16) + + let result82 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + array84.push(@common.Example::{title : result82, body : result83}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - @common.OptionShape::Repeatable(@common.RepeatableShape::{repetition : lifted148, type_ : mbt_ffi_load32((iter_base) + 72)}) + let lifted87 : String? = match mbt_ffi_load8_u((iter_base) + 32) { + 0 => Option::None + 1 => { + + let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 36), mbt_ffi_load32((iter_base) + 40)) + + Option::Some(result86) } _ => panic() } - let lifted182 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted120 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 48) { 0 => Option::None 1 => { - let array180 : Array[@types.SchemaValueNode] = []; - for index181 = 0; index181 < (mbt_ffi_load32((iter_base) + 84)); index181 = index181 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 80)) + (index181 * 32) + let array118 : Array[@types.SchemaValueNode] = []; + for index119 = 0; index119 < (mbt_ffi_load32((iter_base) + 56)); index119 = index119 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 52)) + (index119 * 32) - let lifted179 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted117 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -5944,25 +6271,25 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 12 => { - let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result88 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result150) + @types.SchemaValueNode::StringValue(result88) } 13 => { - let array151 : Array[Int] = []; - for index152 = 0; index152 < (mbt_ffi_load32((iter_base) + 12)); index152 = index152 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index152 * 4) + let array89 : Array[Int] = []; + for index90 = 0; index90 < (mbt_ffi_load32((iter_base) + 12)); index90 = index90 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index90 * 4) - array151.push(mbt_ffi_load32((iter_base) + 0)) + array89.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array151) + @types.SchemaValueNode::RecordValue(array89) } 14 => { - let lifted153 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted91 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -5971,7 +6298,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted153}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted91}) } 15 => { @@ -5979,67 +6306,67 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 16 => { - let array154 : Array[Bool] = []; - for index155 = 0; index155 < (mbt_ffi_load32((iter_base) + 12)); index155 = index155 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index155 * 1) + let array92 : Array[Bool] = []; + for index93 = 0; index93 < (mbt_ffi_load32((iter_base) + 12)); index93 = index93 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index93 * 1) - array154.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array92.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array154) + @types.SchemaValueNode::FlagsValue(array92) } 17 => { - let array156 : Array[Int] = []; - for index157 = 0; index157 < (mbt_ffi_load32((iter_base) + 12)); index157 = index157 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index157 * 4) + let array94 : Array[Int] = []; + for index95 = 0; index95 < (mbt_ffi_load32((iter_base) + 12)); index95 = index95 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index95 * 4) - array156.push(mbt_ffi_load32((iter_base) + 0)) + array94.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array156) + @types.SchemaValueNode::TupleValue(array94) } 18 => { - let array158 : Array[Int] = []; - for index159 = 0; index159 < (mbt_ffi_load32((iter_base) + 12)); index159 = index159 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index159 * 4) + let array96 : Array[Int] = []; + for index97 = 0; index97 < (mbt_ffi_load32((iter_base) + 12)); index97 = index97 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index97 * 4) - array158.push(mbt_ffi_load32((iter_base) + 0)) + array96.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array158) + @types.SchemaValueNode::ListValue(array96) } 19 => { - let array160 : Array[Int] = []; - for index161 = 0; index161 < (mbt_ffi_load32((iter_base) + 12)); index161 = index161 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index161 * 4) + let array98 : Array[Int] = []; + for index99 = 0; index99 < (mbt_ffi_load32((iter_base) + 12)); index99 = index99 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index99 * 4) - array160.push(mbt_ffi_load32((iter_base) + 0)) + array98.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array160) + @types.SchemaValueNode::FixedListValue(array98) } 20 => { - let array162 : Array[@types.MapEntry] = []; - for index163 = 0; index163 < (mbt_ffi_load32((iter_base) + 12)); index163 = index163 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index163 * 8) + let array100 : Array[@types.MapEntry] = []; + for index101 = 0; index101 < (mbt_ffi_load32((iter_base) + 12)); index101 = index101 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index101 * 8) - array162.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array100.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array162) + @types.SchemaValueNode::MapValue(array100) } 21 => { - let lifted164 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted102 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6048,14 +6375,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted164) + @types.SchemaValueNode::OptionValue(lifted102) } 22 => { - let lifted167 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted105 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted165 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted103 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6064,11 +6391,11 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted165) + @types.ResultValuePayload::OkValue(lifted103) } 1 => { - let lifted166 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted104 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6077,58 +6404,58 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted166) + @types.ResultValuePayload::ErrValue(lifted104) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted167) + @types.SchemaValueNode::ResultValue(lifted105) } 23 => { - let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result106 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted170 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted108 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result169 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result107 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result169) + Option::Some(result107) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result168, language : lifted170}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result106, language : lifted108}) } 24 => { - let result171 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result109 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted173 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted111 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result172 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result110 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result172) + Option::Some(result110) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result171, mime_type : lifted173}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result109, mime_type : lifted111}) } 25 => { - let result174 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result112 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result174) + @types.SchemaValueNode::PathValue(result112) } 26 => { - let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result113 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result175) + @types.SchemaValueNode::UrlValue(result113) } 27 => { @@ -6140,21 +6467,21 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 29 => { - let result176 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result176}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result114}) } 30 => { - let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result177, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result115, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result178 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result116 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result178}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result116}) } 32 => { @@ -6163,37 +6490,84 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array180.push(lifted179) + array118.push(lifted117) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 80)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 52)) - Option::Some(@types.SchemaValueTree::{value_nodes : array180, root : mbt_ffi_load32((iter_base) + 88)}) + Option::Some(@types.SchemaValueTree::{value_nodes : array118, root : mbt_ffi_load32((iter_base) + 60)}) } _ => panic() } - let lifted184 : String? = match mbt_ffi_load8_u((iter_base) + 96) { - 0 => Option::None - 1 => { + array121.push(@common.Positional::{name : result79, doc : @common.Doc::{summary : result80, description : result81, examples : array84}, value_name : lifted87, type_ : mbt_ffi_load32((iter_base) + 44), default : lifted120, required : (mbt_ffi_load8_u((iter_base) + 64) != 0), accepts_stdio : (mbt_ffi_load8_u((iter_base) + 65) != 0)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 68)) + + let lifted135 : @common.TailPositional? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { + + let result123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 80), mbt_ffi_load32((iter_base) + 84)) + + let result124 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 88), mbt_ffi_load32((iter_base) + 92)) - let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 100), mbt_ffi_load32((iter_base) + 104)) + let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 96), mbt_ffi_load32((iter_base) + 100)) - Option::Some(result183) + let array128 : Array[@common.Example] = []; + for index129 = 0; index129 < (mbt_ffi_load32((iter_base) + 108)); index129 = index129 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 104)) + (index129 * 16) + + let result126 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + array128.push(@common.Example::{title : result126, body : result127}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 104)) + + let lifted131 : String? = match mbt_ffi_load8_u((iter_base) + 112) { + 0 => Option::None + 1 => { + + let result130 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 116), mbt_ffi_load32((iter_base) + 120)) + + Option::Some(result130) + } + _ => panic() + } + + let lifted132 : UInt? = match mbt_ffi_load8_u((iter_base) + 132) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 136)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted134 : String? = match mbt_ffi_load8_u((iter_base) + 140) { + 0 => Option::None + 1 => { + + let result133 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 144), mbt_ffi_load32((iter_base) + 148)) + + Option::Some(result133) + } + _ => panic() } - _ => panic() - } - array185.push(@common.OptionSpec::{long : result135, short : lifted136, aliases : array138, doc : @common.Doc::{summary : result140, description : result141, examples : array144}, value_name : lifted147, shape : lifted149, default : lifted182, required : (mbt_ffi_load8_u((iter_base) + 92) != 0), env_var : lifted184}) + Option::Some(@common.TailPositional::{name : result123, doc : @common.Doc::{summary : result124, description : result125, examples : array128}, value_name : lifted131, item_type : mbt_ffi_load32((iter_base) + 124), min : (mbt_ffi_load32((iter_base) + 128)).reinterpret_as_uint(), max : lifted132, separator : lifted134, verbatim : (mbt_ffi_load8_u((iter_base) + 152) != 0), accepts_stdio : (mbt_ffi_load8_u((iter_base) + 153) != 0)}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 156)) - let array202 : Array[@common.FlagSpec] = []; - for index203 = 0; index203 < (mbt_ffi_load32((iter_base) + 168)); index203 = index203 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 164)) + (index203 * 72) + let array187 : Array[@common.OptionSpec] = []; + for index188 = 0; index188 < (mbt_ffi_load32((iter_base) + 160)); index188 = index188 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 156)) + (index188 * 112) - let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result136 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted188 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted137 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6202,401 +6576,501 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - let array190 : Array[String] = []; - for index191 = 0; index191 < (mbt_ffi_load32((iter_base) + 20)); index191 = index191 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index191 * 8) + let array139 : Array[String] = []; + for index140 = 0; index140 < (mbt_ffi_load32((iter_base) + 20)); index140 = index140 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index140 * 8) - let result189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result138 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array190.push(result189) + array139.push(result138) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + let result141 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) - let result193 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + let result142 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) - let array196 : Array[@common.Example] = []; - for index197 = 0; index197 < (mbt_ffi_load32((iter_base) + 44)); index197 = index197 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index197 * 16) + let array145 : Array[@common.Example] = []; + for index146 = 0; index146 < (mbt_ffi_load32((iter_base) + 44)); index146 = index146 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index146 * 16) - let result194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result144 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array196.push(@common.Example::{title : result194, body : result195}) + array145.push(@common.Example::{title : result143, body : result144}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) - let lifted199 = match (mbt_ffi_load8_u((iter_base) + 48)) { + let lifted148 : String? = match mbt_ffi_load8_u((iter_base) + 48) { + 0 => Option::None + 1 => { + + let result147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 52), mbt_ffi_load32((iter_base) + 56)) + + Option::Some(result147) + } + _ => panic() + } + + let lifted151 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { - @common.FlagShape::BoolFlag(@common.BoolFlagShape::{default : (mbt_ffi_load8_u((iter_base) + 52) != 0), negatable : (mbt_ffi_load8_u((iter_base) + 53) != 0)}) + @common.OptionShape::Scalar(mbt_ffi_load32((iter_base) + 64)) } 1 => { - let lifted198 : UInt? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None + @common.OptionShape::OptionalScalar(mbt_ffi_load32((iter_base) + 64)) + } + 2 => { + + let lifted149 = match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => { + + @common.Repetition::Repeated + } 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 56)).reinterpret_as_uint()) + @common.Repetition::Delimited(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) + } + 2 => { + + @common.Repetition::Either(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) } _ => panic() } - @common.FlagShape::CountFlag(lifted198) + @common.OptionShape::RepeatableList(@common.RepeatableListShape::{repetition : lifted149, item_type : mbt_ffi_load32((iter_base) + 72)}) } - _ => panic() - } + 3 => { - let lifted201 : String? = match mbt_ffi_load8_u((iter_base) + 60) { - 0 => Option::None - 1 => { + let lifted150 = match (mbt_ffi_load8_u((iter_base) + 64)) { + 0 => { + + @common.Repetition::Repeated + } + 1 => { + + @common.Repetition::Delimited(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) + } + 2 => { - let result200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + @common.Repetition::Either(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 68))) + } + _ => panic() + } - Option::Some(result200) + @common.OptionShape::RepeatableMap(@common.RepeatableMapShape::{repetition : lifted150, map_type : mbt_ffi_load32((iter_base) + 72), duplicate_key_policy : @common.DuplicateKeyPolicy::from(mbt_ffi_load8_u((iter_base) + 76))}) } _ => panic() } - array202.push(@common.FlagSpec::{long : result187, short : lifted188, aliases : array190, doc : @common.Doc::{summary : result192, description : result193, examples : array196}, shape : lifted199, env_var : lifted201}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 164)) - - let array503 : Array[@common.Constraint] = []; - for index504 = 0; index504 < (mbt_ffi_load32((iter_base) + 176)); index504 = index504 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 172)) + (index504 * 28) - - let lifted502 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let lifted184 : @types.SchemaValueTree? = match mbt_ffi_load8_u((iter_base) + 80) { + 0 => Option::None + 1 => { - let array239 : Array[@common.Ref] = []; - for index240 = 0; index240 < (mbt_ffi_load32((iter_base) + 8)); index240 = index240 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index240 * 24) + let array182 : Array[@types.SchemaValueNode] = []; + for index183 = 0; index183 < (mbt_ffi_load32((iter_base) + 88)); index183 = index183 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 84)) + (index183 * 32) - let lifted238 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted181 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result204 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - - @common.Ref::Present(result204) + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) } 1 => { - let result205 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { - let array236 : Array[@types.SchemaValueNode] = []; - for index237 = 0; index237 < (mbt_ffi_load32((iter_base) + 16)); index237 = index237 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index237 * 32) + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { - let lifted235 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + @types.SchemaValueNode::StringValue(result152) + } + 13 => { - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + let array153 : Array[Int] = []; + for index154 = 0; index154 < (mbt_ffi_load32((iter_base) + 12)); index154 = index154 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index154 * 4) - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + array153.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let result206 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.SchemaValueNode::RecordValue(array153) + } + 14 => { - @types.SchemaValueNode::StringValue(result206) - } - 13 => { + let lifted155 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - let array207 : Array[Int] = []; - for index208 = 0; index208 < (mbt_ffi_load32((iter_base) + 12)); index208 = index208 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index208 * 4) + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - array207.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted155}) + } + 15 => { - @types.SchemaValueNode::RecordValue(array207) - } - 14 => { + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { - let lifted209 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let array156 : Array[Bool] = []; + for index157 = 0; index157 < (mbt_ffi_load32((iter_base) + 12)); index157 = index157 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index157 * 1) - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + array156.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted209}) - } - 15 => { + @types.SchemaValueNode::FlagsValue(array156) + } + 17 => { - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + let array158 : Array[Int] = []; + for index159 = 0; index159 < (mbt_ffi_load32((iter_base) + 12)); index159 = index159 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index159 * 4) - let array210 : Array[Bool] = []; - for index211 = 0; index211 < (mbt_ffi_load32((iter_base) + 12)); index211 = index211 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index211 * 1) + array158.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - array210.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaValueNode::TupleValue(array158) + } + 18 => { - @types.SchemaValueNode::FlagsValue(array210) - } - 17 => { + let array160 : Array[Int] = []; + for index161 = 0; index161 < (mbt_ffi_load32((iter_base) + 12)); index161 = index161 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index161 * 4) - let array212 : Array[Int] = []; - for index213 = 0; index213 < (mbt_ffi_load32((iter_base) + 12)); index213 = index213 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index213 * 4) + array160.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - array212.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaValueNode::ListValue(array160) + } + 19 => { - @types.SchemaValueNode::TupleValue(array212) - } - 18 => { + let array162 : Array[Int] = []; + for index163 = 0; index163 < (mbt_ffi_load32((iter_base) + 12)); index163 = index163 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index163 * 4) - let array214 : Array[Int] = []; - for index215 = 0; index215 < (mbt_ffi_load32((iter_base) + 12)); index215 = index215 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index215 * 4) + array162.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - array214.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaValueNode::FixedListValue(array162) + } + 20 => { - @types.SchemaValueNode::ListValue(array214) - } - 19 => { + let array164 : Array[@types.MapEntry] = []; + for index165 = 0; index165 < (mbt_ffi_load32((iter_base) + 12)); index165 = index165 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index165 * 8) - let array216 : Array[Int] = []; - for index217 = 0; index217 < (mbt_ffi_load32((iter_base) + 12)); index217 = index217 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index217 * 4) + array164.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - array216.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaValueNode::MapValue(array164) + } + 21 => { - @types.SchemaValueNode::FixedListValue(array216) - } - 20 => { + let lifted166 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array218 : Array[@types.MapEntry] = []; - for index219 = 0; index219 < (mbt_ffi_load32((iter_base) + 12)); index219 = index219 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index219 * 8) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - array218.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaValueNode::OptionValue(lifted166) + } + 22 => { - @types.SchemaValueNode::MapValue(array218) - } - 21 => { + let lifted169 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { - let lifted220 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted167 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() + Option::Some(mbt_ffi_load32((iter_base) + 16)) } - - @types.SchemaValueNode::OptionValue(lifted220) + _ => panic() } - 22 => { - - let lifted223 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { - - let lifted221 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { - - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } - @types.ResultValuePayload::OkValue(lifted221) - } - 1 => { - - let lifted222 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @types.ResultValuePayload::OkValue(lifted167) + } + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + let lifted168 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - @types.ResultValuePayload::ErrValue(lifted222) - } - _ => panic() + Option::Some(mbt_ffi_load32((iter_base) + 16)) } - - @types.SchemaValueNode::ResultValue(lifted223) + _ => panic() } - 23 => { - let result224 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.ResultValuePayload::ErrValue(lifted168) + } + _ => panic() + } - let lifted226 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::ResultValue(lifted169) + } + 23 => { - let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result170 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - Option::Some(result225) - } - _ => panic() - } + let lifted172 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result224, language : lifted226}) - } - 24 => { + let result171 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - let result227 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(result171) + } + _ => panic() + } - let lifted229 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result170, language : lifted172}) + } + 24 => { - let result228 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result173 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - Option::Some(result228) - } - _ => panic() - } + let lifted175 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result227, mime_type : lifted229}) - } - 25 => { + let result174 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(result174) + } + _ => panic() + } - @types.SchemaValueNode::PathValue(result230) - } - 26 => { + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result173, mime_type : lifted175}) + } + 25 => { - let result231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result176 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result231) - } - 27 => { + @types.SchemaValueNode::PathValue(result176) + } + 26 => { - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) - } - 28 => { + let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) - } - 29 => { + @types.SchemaValueNode::UrlValue(result177) + } + 27 => { - let result232 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + } + 28 => { - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result232}) - } - 30 => { + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + } + 29 => { - let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result178 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result233, body : mbt_ffi_load32((iter_base) + 16)}) - } - 31 => { + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result178}) + } + 30 => { - let result234 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result179 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result234}) - } - 32 => { + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result179, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) - } - _ => panic() - } + let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array236.push(lifted235) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result180}) + } + 32 => { - @common.Ref::ValueIs(@common.ValueIsRef::{name : result205, value : @types.SchemaValueTree::{value_nodes : array236, root : mbt_ffi_load32((iter_base) + 20)}}) + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) } _ => panic() } - array239.push(lifted238) + array182.push(lifted181) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 84)) + + Option::Some(@types.SchemaValueTree::{value_nodes : array182, root : mbt_ffi_load32((iter_base) + 92)}) + } + _ => panic() + } + + let lifted186 : String? = match mbt_ffi_load8_u((iter_base) + 100) { + 0 => Option::None + 1 => { + + let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 104), mbt_ffi_load32((iter_base) + 108)) + + Option::Some(result185) + } + _ => panic() + } + + array187.push(@common.OptionSpec::{long : result136, short : lifted137, aliases : array139, doc : @common.Doc::{summary : result141, description : result142, examples : array145}, value_name : lifted148, shape : lifted151, default : lifted184, required : (mbt_ffi_load8_u((iter_base) + 96) != 0), env_var : lifted186}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 156)) + + let array204 : Array[@common.FlagSpec] = []; + for index205 = 0; index205 < (mbt_ffi_load32((iter_base) + 168)); index205 = index205 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 164)) + (index205 * 72) + + let result189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted190 : Char? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 12))) + } + _ => panic() + } + + let array192 : Array[String] = []; + for index193 = 0; index193 < (mbt_ffi_load32((iter_base) + 20)); index193 = index193 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index193 * 8) + + let result191 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array192.push(result191) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + let result194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 24), mbt_ffi_load32((iter_base) + 28)) + + let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 32), mbt_ffi_load32((iter_base) + 36)) + + let array198 : Array[@common.Example] = []; + for index199 = 0; index199 < (mbt_ffi_load32((iter_base) + 44)); index199 = index199 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 40)) + (index199 * 16) + + let result196 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let result197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + array198.push(@common.Example::{title : result196, body : result197}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 40)) + + let lifted201 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @common.FlagShape::BoolFlag(@common.BoolFlagShape::{default : (mbt_ffi_load8_u((iter_base) + 52) != 0), negatable : (mbt_ffi_load8_u((iter_base) + 53) != 0)}) + } + 1 => { + + let lifted200 : UInt? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 56)).reinterpret_as_uint()) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) - @common.Constraint::RequiresAll(array239) + @common.FlagShape::CountFlag(lifted200) } + _ => panic() + } + + let lifted203 : String? = match mbt_ffi_load8_u((iter_base) + 60) { + 0 => Option::None 1 => { - let array276 : Array[@common.Ref] = []; - for index277 = 0; index277 < (mbt_ffi_load32((iter_base) + 8)); index277 = index277 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index277 * 24) + let result202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + + Option::Some(result202) + } + _ => panic() + } + + array204.push(@common.FlagSpec::{long : result189, short : lifted190, aliases : array192, doc : @common.Doc::{summary : result194, description : result195, examples : array198}, shape : lifted201, env_var : lifted203}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 164)) + + let array505 : Array[@common.Constraint] = []; + for index506 = 0; index506 < (mbt_ffi_load32((iter_base) + 176)); index506 = index506 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 172)) + (index506 * 28) + + let lifted504 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + let array241 : Array[@common.Ref] = []; + for index242 = 0; index242 < (mbt_ffi_load32((iter_base) + 8)); index242 = index242 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index242 * 24) - let lifted275 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted240 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result241 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result206 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result241) + @common.Ref::Present(result206) } 1 => { - let result242 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array273 : Array[@types.SchemaValueNode] = []; - for index274 = 0; index274 < (mbt_ffi_load32((iter_base) + 16)); index274 = index274 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index274 * 32) + let array238 : Array[@types.SchemaValueNode] = []; + for index239 = 0; index239 < (mbt_ffi_load32((iter_base) + 16)); index239 = index239 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index239 * 32) - let lifted272 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted237 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -6647,25 +7121,25 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 12 => { - let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result208 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result243) + @types.SchemaValueNode::StringValue(result208) } 13 => { - let array244 : Array[Int] = []; - for index245 = 0; index245 < (mbt_ffi_load32((iter_base) + 12)); index245 = index245 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index245 * 4) + let array209 : Array[Int] = []; + for index210 = 0; index210 < (mbt_ffi_load32((iter_base) + 12)); index210 = index210 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index210 * 4) - array244.push(mbt_ffi_load32((iter_base) + 0)) + array209.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array244) + @types.SchemaValueNode::RecordValue(array209) } 14 => { - let lifted246 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted211 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6674,7 +7148,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted246}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted211}) } 15 => { @@ -6682,67 +7156,67 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 16 => { - let array247 : Array[Bool] = []; - for index248 = 0; index248 < (mbt_ffi_load32((iter_base) + 12)); index248 = index248 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index248 * 1) + let array212 : Array[Bool] = []; + for index213 = 0; index213 < (mbt_ffi_load32((iter_base) + 12)); index213 = index213 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index213 * 1) - array247.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array212.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array247) + @types.SchemaValueNode::FlagsValue(array212) } 17 => { - let array249 : Array[Int] = []; - for index250 = 0; index250 < (mbt_ffi_load32((iter_base) + 12)); index250 = index250 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index250 * 4) + let array214 : Array[Int] = []; + for index215 = 0; index215 < (mbt_ffi_load32((iter_base) + 12)); index215 = index215 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index215 * 4) - array249.push(mbt_ffi_load32((iter_base) + 0)) + array214.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array249) + @types.SchemaValueNode::TupleValue(array214) } 18 => { - let array251 : Array[Int] = []; - for index252 = 0; index252 < (mbt_ffi_load32((iter_base) + 12)); index252 = index252 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index252 * 4) + let array216 : Array[Int] = []; + for index217 = 0; index217 < (mbt_ffi_load32((iter_base) + 12)); index217 = index217 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index217 * 4) - array251.push(mbt_ffi_load32((iter_base) + 0)) + array216.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array251) + @types.SchemaValueNode::ListValue(array216) } 19 => { - let array253 : Array[Int] = []; - for index254 = 0; index254 < (mbt_ffi_load32((iter_base) + 12)); index254 = index254 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index254 * 4) + let array218 : Array[Int] = []; + for index219 = 0; index219 < (mbt_ffi_load32((iter_base) + 12)); index219 = index219 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index219 * 4) - array253.push(mbt_ffi_load32((iter_base) + 0)) + array218.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array253) + @types.SchemaValueNode::FixedListValue(array218) } 20 => { - let array255 : Array[@types.MapEntry] = []; - for index256 = 0; index256 < (mbt_ffi_load32((iter_base) + 12)); index256 = index256 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index256 * 8) + let array220 : Array[@types.MapEntry] = []; + for index221 = 0; index221 < (mbt_ffi_load32((iter_base) + 12)); index221 = index221 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index221 * 8) - array255.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array220.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array255) + @types.SchemaValueNode::MapValue(array220) } 21 => { - let lifted257 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted222 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -6751,14 +7225,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted257) + @types.SchemaValueNode::OptionValue(lifted222) } 22 => { - let lifted260 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted225 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted258 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted223 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6767,11 +7241,11 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted258) + @types.ResultValuePayload::OkValue(lifted223) } 1 => { - let lifted259 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted224 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6780,58 +7254,58 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted259) + @types.ResultValuePayload::ErrValue(lifted224) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted260) + @types.SchemaValueNode::ResultValue(lifted225) } 23 => { - let result261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted263 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted228 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result262) + Option::Some(result227) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result261, language : lifted263}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result226, language : lifted228}) } 24 => { - let result264 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result229 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted266 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted231 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result230 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result265) + Option::Some(result230) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result264, mime_type : lifted266}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result229, mime_type : lifted231}) } 25 => { - let result267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result232 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result267) + @types.SchemaValueNode::PathValue(result232) } 26 => { - let result268 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result268) + @types.SchemaValueNode::UrlValue(result233) } 27 => { @@ -6843,21 +7317,21 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 29 => { - let result269 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result234 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result269}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result234}) } 30 => { - let result270 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result270, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result235, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result271 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result271}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result236}) } 32 => { @@ -6866,43 +7340,43 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array273.push(lifted272) + array238.push(lifted237) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result242, value : @types.SchemaValueTree::{value_nodes : array273, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result207, value : @types.SchemaValueTree::{value_nodes : array238, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array276.push(lifted275) + array241.push(lifted240) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) - @common.Constraint::AllOrNone(array276) + @common.Constraint::RequiresAll(array241) } - 2 => { + 1 => { - let array313 : Array[@common.Ref] = []; - for index314 = 0; index314 < (mbt_ffi_load32((iter_base) + 8)); index314 = index314 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index314 * 24) + let array278 : Array[@common.Ref] = []; + for index279 = 0; index279 < (mbt_ffi_load32((iter_base) + 8)); index279 = index279 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index279 * 24) - let lifted312 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted277 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result278 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result278) + @common.Ref::Present(result243) } 1 => { - let result279 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result244 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array310 : Array[@types.SchemaValueNode] = []; - for index311 = 0; index311 < (mbt_ffi_load32((iter_base) + 16)); index311 = index311 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index311 * 32) + let array275 : Array[@types.SchemaValueNode] = []; + for index276 = 0; index276 < (mbt_ffi_load32((iter_base) + 16)); index276 = index276 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index276 * 32) - let lifted309 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted274 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -6953,25 +7427,25 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 12 => { - let result280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result245 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result280) + @types.SchemaValueNode::StringValue(result245) } 13 => { - let array281 : Array[Int] = []; - for index282 = 0; index282 < (mbt_ffi_load32((iter_base) + 12)); index282 = index282 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index282 * 4) + let array246 : Array[Int] = []; + for index247 = 0; index247 < (mbt_ffi_load32((iter_base) + 12)); index247 = index247 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index247 * 4) - array281.push(mbt_ffi_load32((iter_base) + 0)) + array246.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array281) + @types.SchemaValueNode::RecordValue(array246) } 14 => { - let lifted283 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted248 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -6980,7 +7454,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted283}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted248}) } 15 => { @@ -6988,67 +7462,67 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 16 => { - let array284 : Array[Bool] = []; - for index285 = 0; index285 < (mbt_ffi_load32((iter_base) + 12)); index285 = index285 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index285 * 1) + let array249 : Array[Bool] = []; + for index250 = 0; index250 < (mbt_ffi_load32((iter_base) + 12)); index250 = index250 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index250 * 1) - array284.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array249.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array284) + @types.SchemaValueNode::FlagsValue(array249) } 17 => { - let array286 : Array[Int] = []; - for index287 = 0; index287 < (mbt_ffi_load32((iter_base) + 12)); index287 = index287 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index287 * 4) + let array251 : Array[Int] = []; + for index252 = 0; index252 < (mbt_ffi_load32((iter_base) + 12)); index252 = index252 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index252 * 4) - array286.push(mbt_ffi_load32((iter_base) + 0)) + array251.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array286) + @types.SchemaValueNode::TupleValue(array251) } 18 => { - let array288 : Array[Int] = []; - for index289 = 0; index289 < (mbt_ffi_load32((iter_base) + 12)); index289 = index289 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index289 * 4) + let array253 : Array[Int] = []; + for index254 = 0; index254 < (mbt_ffi_load32((iter_base) + 12)); index254 = index254 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index254 * 4) - array288.push(mbt_ffi_load32((iter_base) + 0)) + array253.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array288) + @types.SchemaValueNode::ListValue(array253) } 19 => { - let array290 : Array[Int] = []; - for index291 = 0; index291 < (mbt_ffi_load32((iter_base) + 12)); index291 = index291 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index291 * 4) + let array255 : Array[Int] = []; + for index256 = 0; index256 < (mbt_ffi_load32((iter_base) + 12)); index256 = index256 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index256 * 4) - array290.push(mbt_ffi_load32((iter_base) + 0)) + array255.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array290) + @types.SchemaValueNode::FixedListValue(array255) } 20 => { - let array292 : Array[@types.MapEntry] = []; - for index293 = 0; index293 < (mbt_ffi_load32((iter_base) + 12)); index293 = index293 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index293 * 8) + let array257 : Array[@types.MapEntry] = []; + for index258 = 0; index258 < (mbt_ffi_load32((iter_base) + 12)); index258 = index258 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index258 * 8) - array292.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array257.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array292) + @types.SchemaValueNode::MapValue(array257) } 21 => { - let lifted294 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted259 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -7057,14 +7531,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted294) + @types.SchemaValueNode::OptionValue(lifted259) } 22 => { - let lifted297 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted262 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted295 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted260 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -7073,11 +7547,11 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted295) + @types.ResultValuePayload::OkValue(lifted260) } 1 => { - let lifted296 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted261 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -7086,58 +7560,58 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted296) + @types.ResultValuePayload::ErrValue(lifted261) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted297) + @types.SchemaValueNode::ResultValue(lifted262) } 23 => { - let result298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result263 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted300 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted265 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result299 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result264 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result299) + Option::Some(result264) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result298, language : lifted300}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result263, language : lifted265}) } 24 => { - let result301 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result266 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted303 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted268 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result302) + Option::Some(result267) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result301, mime_type : lifted303}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result266, mime_type : lifted268}) } 25 => { - let result304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result269 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result304) + @types.SchemaValueNode::PathValue(result269) } 26 => { - let result305 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result270 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result305) + @types.SchemaValueNode::UrlValue(result270) } 27 => { @@ -7149,21 +7623,21 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 29 => { - let result306 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result271 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result306}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result271}) } 30 => { - let result307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result272 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result307, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result272, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result273 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result308}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result273}) } 32 => { @@ -7172,155 +7646,449 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array310.push(lifted309) + array275.push(lifted274) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result279, value : @types.SchemaValueTree::{value_nodes : array310, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result244, value : @types.SchemaValueTree::{value_nodes : array275, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array313.push(lifted312) + array278.push(lifted277) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) - @common.Constraint::RequiresAny(array313) + @common.Constraint::AllOrNone(array278) } - 3 => { + 2 => { - let array352 : Array[@common.RefGroup] = []; - for index353 = 0; index353 < (mbt_ffi_load32((iter_base) + 8)); index353 = index353 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index353 * 8) + let array315 : Array[@common.Ref] = []; + for index316 = 0; index316 < (mbt_ffi_load32((iter_base) + 8)); index316 = index316 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index316 * 24) - let array350 : Array[@common.Ref] = []; - for index351 = 0; index351 < (mbt_ffi_load32((iter_base) + 4)); index351 = index351 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index351 * 24) + let lifted314 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - let lifted349 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let result280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let result315 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + @common.Ref::Present(result280) + } + 1 => { - @common.Ref::Present(result315) - } - 1 => { + let result281 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let result316 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let array312 : Array[@types.SchemaValueNode] = []; + for index313 = 0; index313 < (mbt_ffi_load32((iter_base) + 16)); index313 = index313 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index313 * 32) - let array347 : Array[@types.SchemaValueNode] = []; - for index348 = 0; index348 < (mbt_ffi_load32((iter_base) + 16)); index348 = index348 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index348 * 32) + let lifted311 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - let lifted346 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) + } + 1 => { - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + let result282 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::StringValue(result282) + } + 13 => { - let result317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let array283 : Array[Int] = []; + for index284 = 0; index284 < (mbt_ffi_load32((iter_base) + 12)); index284 = index284 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index284 * 4) - @types.SchemaValueNode::StringValue(result317) + array283.push(mbt_ffi_load32((iter_base) + 0)) } - 13 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array318 : Array[Int] = []; - for index319 = 0; index319 < (mbt_ffi_load32((iter_base) + 12)); index319 = index319 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index319 * 4) + @types.SchemaValueNode::RecordValue(array283) + } + 14 => { - array318.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted285 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::RecordValue(array318) + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() } - 14 => { - let lifted320 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted285}) + } + 15 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted320}) + let array286 : Array[Bool] = []; + for index287 = 0; index287 < (mbt_ffi_load32((iter_base) + 12)); index287 = index287 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index287 * 1) + + array286.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } - 15 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + @types.SchemaValueNode::FlagsValue(array286) + } + 17 => { + + let array288 : Array[Int] = []; + for index289 = 0; index289 < (mbt_ffi_load32((iter_base) + 12)); index289 = index289 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index289 * 4) + + array288.push(mbt_ffi_load32((iter_base) + 0)) } - 16 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::TupleValue(array288) + } + 18 => { + + let array290 : Array[Int] = []; + for index291 = 0; index291 < (mbt_ffi_load32((iter_base) + 12)); index291 = index291 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index291 * 4) + + array290.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::ListValue(array290) + } + 19 => { + + let array292 : Array[Int] = []; + for index293 = 0; index293 < (mbt_ffi_load32((iter_base) + 12)); index293 = index293 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index293 * 4) + + array292.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array292) + } + 20 => { + + let array294 : Array[@types.MapEntry] = []; + for index295 = 0; index295 < (mbt_ffi_load32((iter_base) + 12)); index295 = index295 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index295 * 8) + + array294.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::MapValue(array294) + } + 21 => { + + let lifted296 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaValueNode::OptionValue(lifted296) + } + 22 => { + + let lifted299 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { + + let lifted297 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::OkValue(lifted297) + } + 1 => { + + let lifted298 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::ErrValue(lifted298) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted299) + } + 23 => { + + let result300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted302 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result301 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result301) + } + _ => panic() + } + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result300, language : lifted302}) + } + 24 => { + + let result303 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted305 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result304) + } + _ => panic() + } + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result303, mime_type : lifted305}) + } + 25 => { + + let result306 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::PathValue(result306) + } + 26 => { + + let result307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UrlValue(result307) + } + 27 => { + + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + } + 28 => { + + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + } + 29 => { + + let result308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result308}) + } + 30 => { - let array321 : Array[Bool] = []; - for index322 = 0; index322 < (mbt_ffi_load32((iter_base) + 12)); index322 = index322 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index322 * 1) + let result309 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array321.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result309, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { + + let result310 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result310}) + } + 32 => { + + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) + } + _ => panic() + } + + array312.push(lifted311) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + @common.Ref::ValueIs(@common.ValueIsRef::{name : result281, value : @types.SchemaValueTree::{value_nodes : array312, root : mbt_ffi_load32((iter_base) + 20)}}) + } + _ => panic() + } + + array315.push(lifted314) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) + + @common.Constraint::RequiresAny(array315) + } + 3 => { + + let array354 : Array[@common.RefGroup] = []; + for index355 = 0; index355 < (mbt_ffi_load32((iter_base) + 8)); index355 = index355 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 4)) + (index355 * 8) + + let array352 : Array[@common.Ref] = []; + for index353 = 0; index353 < (mbt_ffi_load32((iter_base) + 4)); index353 = index353 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 0)) + (index353 * 24) + + let lifted351 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + let result317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + + @common.Ref::Present(result317) + } + 1 => { + + let result318 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + + let array349 : Array[@types.SchemaValueNode] = []; + for index350 = 0; index350 < (mbt_ffi_load32((iter_base) + 16)); index350 = index350 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index350 * 32) + + let lifted348 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) + } + 1 => { + + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { + + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { + + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { + + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { + + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { + + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { + + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { + + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { + + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { + + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { + + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { + + let result319 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::StringValue(result319) + } + 13 => { + + let array320 : Array[Int] = []; + for index321 = 0; index321 < (mbt_ffi_load32((iter_base) + 12)); index321 = index321 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index321 * 4) + + array320.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array321) + @types.SchemaValueNode::RecordValue(array320) } - 17 => { + 14 => { + + let lifted322 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted322}) + } + 15 => { + + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { - let array323 : Array[Int] = []; + let array323 : Array[Bool] = []; for index324 = 0; index324 < (mbt_ffi_load32((iter_base) + 12)); index324 = index324 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index324 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index324 * 1) - array323.push(mbt_ffi_load32((iter_base) + 0)) + array323.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array323) + @types.SchemaValueNode::FlagsValue(array323) } - 18 => { + 17 => { let array325 : Array[Int] = []; for index326 = 0; index326 < (mbt_ffi_load32((iter_base) + 12)); index326 = index326 + 1 { @@ -7330,9 +8098,9 @@ pub fn get_tool(name : String) -> RegisteredTool? { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array325) + @types.SchemaValueNode::TupleValue(array325) } - 19 => { + 18 => { let array327 : Array[Int] = []; for index328 = 0; index328 < (mbt_ffi_load32((iter_base) + 12)); index328 = index328 + 1 { @@ -7342,23 +8110,35 @@ pub fn get_tool(name : String) -> RegisteredTool? { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array327) + @types.SchemaValueNode::ListValue(array327) } - 20 => { + 19 => { - let array329 : Array[@types.MapEntry] = []; + let array329 : Array[Int] = []; for index330 = 0; index330 < (mbt_ffi_load32((iter_base) + 12)); index330 = index330 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index330 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index330 * 4) + + array329.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array329) + } + 20 => { + + let array331 : Array[@types.MapEntry] = []; + for index332 = 0; index332 < (mbt_ffi_load32((iter_base) + 12)); index332 = index332 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index332 * 8) - array329.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array331.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array329) + @types.SchemaValueNode::MapValue(array331) } 21 => { - let lifted331 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted333 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -7367,14 +8147,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted331) + @types.SchemaValueNode::OptionValue(lifted333) } 22 => { - let lifted334 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted336 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted332 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted334 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -7383,11 +8163,11 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted332) + @types.ResultValuePayload::OkValue(lifted334) } 1 => { - let lifted333 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted335 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -7396,58 +8176,58 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted333) + @types.ResultValuePayload::ErrValue(lifted335) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted334) + @types.SchemaValueNode::ResultValue(lifted336) } 23 => { - let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result337 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted337 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted339 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result336 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result338 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result336) + Option::Some(result338) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result335, language : lifted337}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result337, language : lifted339}) } 24 => { - let result338 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result340 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted340 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted342 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result339 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result341 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result339) + Option::Some(result341) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result338, mime_type : lifted340}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result340, mime_type : lifted342}) } 25 => { - let result341 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result341) + @types.SchemaValueNode::PathValue(result343) } 26 => { - let result342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result342) + @types.SchemaValueNode::UrlValue(result344) } 27 => { @@ -7459,21 +8239,21 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 29 => { - let result343 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result343}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result345}) } 30 => { - let result344 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result346 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result344, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result346, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result345}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result347}) } 32 => { @@ -7482,47 +8262,47 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array347.push(lifted346) + array349.push(lifted348) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result316, value : @types.SchemaValueTree::{value_nodes : array347, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result318, value : @types.SchemaValueTree::{value_nodes : array349, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array350.push(lifted349) + array352.push(lifted351) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 0)) - array352.push(@common.RefGroup::{refs : array350}) + array354.push(@common.RefGroup::{refs : array352}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 4)) - @common.Constraint::MutexGroups(array352) + @common.Constraint::MutexGroups(array354) } 4 => { - let array389 : Array[@common.Ref] = []; - for index390 = 0; index390 < (mbt_ffi_load32((iter_base) + 12)); index390 = index390 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index390 * 24) + let array391 : Array[@common.Ref] = []; + for index392 = 0; index392 < (mbt_ffi_load32((iter_base) + 12)); index392 = index392 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index392 * 24) - let lifted388 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted390 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result354 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result354) + @common.Ref::Present(result356) } 1 => { - let result355 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result357 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array386 : Array[@types.SchemaValueNode] = []; - for index387 = 0; index387 < (mbt_ffi_load32((iter_base) + 16)); index387 = index387 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index387 * 32) + let array388 : Array[@types.SchemaValueNode] = []; + for index389 = 0; index389 < (mbt_ffi_load32((iter_base) + 16)); index389 = index389 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index389 * 32) - let lifted385 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted387 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -7573,25 +8353,25 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 12 => { - let result356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result358 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result356) + @types.SchemaValueNode::StringValue(result358) } 13 => { - let array357 : Array[Int] = []; - for index358 = 0; index358 < (mbt_ffi_load32((iter_base) + 12)); index358 = index358 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index358 * 4) + let array359 : Array[Int] = []; + for index360 = 0; index360 < (mbt_ffi_load32((iter_base) + 12)); index360 = index360 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index360 * 4) - array357.push(mbt_ffi_load32((iter_base) + 0)) + array359.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array357) + @types.SchemaValueNode::RecordValue(array359) } 14 => { - let lifted359 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted361 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -7600,7 +8380,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted359}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted361}) } 15 => { @@ -7608,67 +8388,67 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 16 => { - let array360 : Array[Bool] = []; - for index361 = 0; index361 < (mbt_ffi_load32((iter_base) + 12)); index361 = index361 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index361 * 1) + let array362 : Array[Bool] = []; + for index363 = 0; index363 < (mbt_ffi_load32((iter_base) + 12)); index363 = index363 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index363 * 1) - array360.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array362.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array360) + @types.SchemaValueNode::FlagsValue(array362) } 17 => { - let array362 : Array[Int] = []; - for index363 = 0; index363 < (mbt_ffi_load32((iter_base) + 12)); index363 = index363 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index363 * 4) + let array364 : Array[Int] = []; + for index365 = 0; index365 < (mbt_ffi_load32((iter_base) + 12)); index365 = index365 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index365 * 4) - array362.push(mbt_ffi_load32((iter_base) + 0)) + array364.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array362) + @types.SchemaValueNode::TupleValue(array364) } 18 => { - let array364 : Array[Int] = []; - for index365 = 0; index365 < (mbt_ffi_load32((iter_base) + 12)); index365 = index365 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index365 * 4) + let array366 : Array[Int] = []; + for index367 = 0; index367 < (mbt_ffi_load32((iter_base) + 12)); index367 = index367 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index367 * 4) - array364.push(mbt_ffi_load32((iter_base) + 0)) + array366.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array364) + @types.SchemaValueNode::ListValue(array366) } 19 => { - let array366 : Array[Int] = []; - for index367 = 0; index367 < (mbt_ffi_load32((iter_base) + 12)); index367 = index367 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index367 * 4) + let array368 : Array[Int] = []; + for index369 = 0; index369 < (mbt_ffi_load32((iter_base) + 12)); index369 = index369 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index369 * 4) - array366.push(mbt_ffi_load32((iter_base) + 0)) + array368.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array366) + @types.SchemaValueNode::FixedListValue(array368) } 20 => { - let array368 : Array[@types.MapEntry] = []; - for index369 = 0; index369 < (mbt_ffi_load32((iter_base) + 12)); index369 = index369 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index369 * 8) + let array370 : Array[@types.MapEntry] = []; + for index371 = 0; index371 < (mbt_ffi_load32((iter_base) + 12)); index371 = index371 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index371 * 8) - array368.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array370.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array368) + @types.SchemaValueNode::MapValue(array370) } 21 => { - let lifted370 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted372 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -7677,14 +8457,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted370) + @types.SchemaValueNode::OptionValue(lifted372) } 22 => { - let lifted373 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted375 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted371 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted373 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -7693,11 +8473,11 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted371) + @types.ResultValuePayload::OkValue(lifted373) } 1 => { - let lifted372 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted374 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -7706,58 +8486,58 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted372) + @types.ResultValuePayload::ErrValue(lifted374) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted373) + @types.SchemaValueNode::ResultValue(lifted375) } 23 => { - let result374 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted376 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted378 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result377 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result375) + Option::Some(result377) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result374, language : lifted376}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result376, language : lifted378}) } 24 => { - let result377 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result379 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted379 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted381 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result378 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result378) + Option::Some(result380) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result377, mime_type : lifted379}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result379, mime_type : lifted381}) } 25 => { - let result380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result380) + @types.SchemaValueNode::PathValue(result382) } 26 => { - let result381 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result381) + @types.SchemaValueNode::UrlValue(result383) } 27 => { @@ -7769,21 +8549,21 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 29 => { - let result382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result382}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result384}) } 30 => { - let result383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result385 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result383, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result385, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result386 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result384}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result386}) } 32 => { @@ -7792,39 +8572,39 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array386.push(lifted385) + array388.push(lifted387) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result355, value : @types.SchemaValueTree::{value_nodes : array386, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result357, value : @types.SchemaValueTree::{value_nodes : array388, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array389.push(lifted388) + array391.push(lifted390) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array426 : Array[@common.Ref] = []; - for index427 = 0; index427 < (mbt_ffi_load32((iter_base) + 24)); index427 = index427 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index427 * 24) + let array428 : Array[@common.Ref] = []; + for index429 = 0; index429 < (mbt_ffi_load32((iter_base) + 24)); index429 = index429 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 20)) + (index429 * 24) - let lifted425 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted427 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result391 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result391) + @common.Ref::Present(result393) } 1 => { - let result392 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result394 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array423 : Array[@types.SchemaValueNode] = []; - for index424 = 0; index424 < (mbt_ffi_load32((iter_base) + 16)); index424 = index424 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index424 * 32) + let array425 : Array[@types.SchemaValueNode] = []; + for index426 = 0; index426 < (mbt_ffi_load32((iter_base) + 16)); index426 = index426 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index426 * 32) - let lifted422 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted424 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -7875,25 +8655,25 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 12 => { - let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result395 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result393) + @types.SchemaValueNode::StringValue(result395) } 13 => { - let array394 : Array[Int] = []; - for index395 = 0; index395 < (mbt_ffi_load32((iter_base) + 12)); index395 = index395 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index395 * 4) + let array396 : Array[Int] = []; + for index397 = 0; index397 < (mbt_ffi_load32((iter_base) + 12)); index397 = index397 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index397 * 4) - array394.push(mbt_ffi_load32((iter_base) + 0)) + array396.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array394) + @types.SchemaValueNode::RecordValue(array396) } 14 => { - let lifted396 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted398 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -7902,7 +8682,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted396}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted398}) } 15 => { @@ -7910,29 +8690,17 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 16 => { - let array397 : Array[Bool] = []; - for index398 = 0; index398 < (mbt_ffi_load32((iter_base) + 12)); index398 = index398 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index398 * 1) - - array397.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array397) - } - 17 => { - - let array399 : Array[Int] = []; + let array399 : Array[Bool] = []; for index400 = 0; index400 < (mbt_ffi_load32((iter_base) + 12)); index400 = index400 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index400 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index400 * 1) - array399.push(mbt_ffi_load32((iter_base) + 0)) + array399.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array399) + @types.SchemaValueNode::FlagsValue(array399) } - 18 => { + 17 => { let array401 : Array[Int] = []; for index402 = 0; index402 < (mbt_ffi_load32((iter_base) + 12)); index402 = index402 + 1 { @@ -7942,9 +8710,9 @@ pub fn get_tool(name : String) -> RegisteredTool? { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array401) + @types.SchemaValueNode::TupleValue(array401) } - 19 => { + 18 => { let array403 : Array[Int] = []; for index404 = 0; index404 < (mbt_ffi_load32((iter_base) + 12)); index404 = index404 + 1 { @@ -7954,23 +8722,35 @@ pub fn get_tool(name : String) -> RegisteredTool? { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array403) + @types.SchemaValueNode::ListValue(array403) } - 20 => { + 19 => { - let array405 : Array[@types.MapEntry] = []; + let array405 : Array[Int] = []; for index406 = 0; index406 < (mbt_ffi_load32((iter_base) + 12)); index406 = index406 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index406 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index406 * 4) + + array405.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - array405.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + @types.SchemaValueNode::FixedListValue(array405) + } + 20 => { + + let array407 : Array[@types.MapEntry] = []; + for index408 = 0; index408 < (mbt_ffi_load32((iter_base) + 12)); index408 = index408 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index408 * 8) + + array407.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array405) + @types.SchemaValueNode::MapValue(array407) } 21 => { - let lifted407 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted409 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -7979,14 +8759,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted407) + @types.SchemaValueNode::OptionValue(lifted409) } 22 => { - let lifted410 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted412 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted408 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted410 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -7995,11 +8775,11 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted408) + @types.ResultValuePayload::OkValue(lifted410) } 1 => { - let lifted409 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted411 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -8008,58 +8788,58 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted409) + @types.ResultValuePayload::ErrValue(lifted411) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted410) + @types.SchemaValueNode::ResultValue(lifted412) } 23 => { - let result411 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result413 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted413 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted415 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result412 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result412) + Option::Some(result414) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result411, language : lifted413}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result413, language : lifted415}) } 24 => { - let result414 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result416 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted416 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted418 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result417 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result415) + Option::Some(result417) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result414, mime_type : lifted416}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result416, mime_type : lifted418}) } 25 => { - let result417 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result419 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result417) + @types.SchemaValueNode::PathValue(result419) } 26 => { - let result418 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result418) + @types.SchemaValueNode::UrlValue(result420) } 27 => { @@ -8071,21 +8851,21 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 29 => { - let result419 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result419}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result421}) } 30 => { - let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result422 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result420, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result422, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result421 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result423 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result421}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result423}) } 32 => { @@ -8094,43 +8874,43 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array423.push(lifted422) + array425.push(lifted424) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result392, value : @types.SchemaValueTree::{value_nodes : array423, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result394, value : @types.SchemaValueTree::{value_nodes : array425, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array426.push(lifted425) + array428.push(lifted427) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 20)) - @common.Constraint::Implies(@common.ImpliesC::{lhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 4)), lhs : array389, rhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 16)), rhs : array426}) + @common.Constraint::Implies(@common.ImpliesC::{lhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 4)), lhs : array391, rhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 16)), rhs : array428}) } 5 => { - let array463 : Array[@common.Ref] = []; - for index464 = 0; index464 < (mbt_ffi_load32((iter_base) + 12)); index464 = index464 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index464 * 24) + let array465 : Array[@common.Ref] = []; + for index466 = 0; index466 < (mbt_ffi_load32((iter_base) + 12)); index466 = index466 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index466 * 24) - let lifted462 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted464 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result428 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result428) + @common.Ref::Present(result430) } 1 => { - let result429 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result431 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array460 : Array[@types.SchemaValueNode] = []; - for index461 = 0; index461 < (mbt_ffi_load32((iter_base) + 16)); index461 = index461 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index461 * 32) + let array462 : Array[@types.SchemaValueNode] = []; + for index463 = 0; index463 < (mbt_ffi_load32((iter_base) + 16)); index463 = index463 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index463 * 32) - let lifted459 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted461 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -8181,25 +8961,25 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 12 => { - let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result432 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result430) + @types.SchemaValueNode::StringValue(result432) } 13 => { - let array431 : Array[Int] = []; - for index432 = 0; index432 < (mbt_ffi_load32((iter_base) + 12)); index432 = index432 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index432 * 4) + let array433 : Array[Int] = []; + for index434 = 0; index434 < (mbt_ffi_load32((iter_base) + 12)); index434 = index434 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index434 * 4) - array431.push(mbt_ffi_load32((iter_base) + 0)) + array433.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array431) + @types.SchemaValueNode::RecordValue(array433) } 14 => { - let lifted433 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted435 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -8208,7 +8988,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted433}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted435}) } 15 => { @@ -8216,29 +8996,17 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 16 => { - let array434 : Array[Bool] = []; - for index435 = 0; index435 < (mbt_ffi_load32((iter_base) + 12)); index435 = index435 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index435 * 1) - - array434.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array434) - } - 17 => { - - let array436 : Array[Int] = []; + let array436 : Array[Bool] = []; for index437 = 0; index437 < (mbt_ffi_load32((iter_base) + 12)); index437 = index437 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index437 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index437 * 1) - array436.push(mbt_ffi_load32((iter_base) + 0)) + array436.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array436) + @types.SchemaValueNode::FlagsValue(array436) } - 18 => { + 17 => { let array438 : Array[Int] = []; for index439 = 0; index439 < (mbt_ffi_load32((iter_base) + 12)); index439 = index439 + 1 { @@ -8248,9 +9016,9 @@ pub fn get_tool(name : String) -> RegisteredTool? { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array438) + @types.SchemaValueNode::TupleValue(array438) } - 19 => { + 18 => { let array440 : Array[Int] = []; for index441 = 0; index441 < (mbt_ffi_load32((iter_base) + 12)); index441 = index441 + 1 { @@ -8260,23 +9028,35 @@ pub fn get_tool(name : String) -> RegisteredTool? { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array440) + @types.SchemaValueNode::ListValue(array440) } - 20 => { + 19 => { - let array442 : Array[@types.MapEntry] = []; + let array442 : Array[Int] = []; for index443 = 0; index443 < (mbt_ffi_load32((iter_base) + 12)); index443 = index443 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index443 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index443 * 4) + + array442.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array442) + } + 20 => { + + let array444 : Array[@types.MapEntry] = []; + for index445 = 0; index445 < (mbt_ffi_load32((iter_base) + 12)); index445 = index445 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index445 * 8) - array442.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array444.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array442) + @types.SchemaValueNode::MapValue(array444) } 21 => { - let lifted444 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted446 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -8285,14 +9065,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted444) + @types.SchemaValueNode::OptionValue(lifted446) } 22 => { - let lifted447 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted449 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted445 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted447 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -8301,11 +9081,11 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted445) + @types.ResultValuePayload::OkValue(lifted447) } 1 => { - let lifted446 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted448 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -8314,58 +9094,58 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted446) + @types.ResultValuePayload::ErrValue(lifted448) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted447) + @types.SchemaValueNode::ResultValue(lifted449) } 23 => { - let result448 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result450 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted450 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted452 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result449 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result451 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result449) + Option::Some(result451) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result448, language : lifted450}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result450, language : lifted452}) } 24 => { - let result451 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result453 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted453 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted455 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result454 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result452) + Option::Some(result454) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result451, mime_type : lifted453}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result453, mime_type : lifted455}) } 25 => { - let result454 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result456 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result454) + @types.SchemaValueNode::PathValue(result456) } 26 => { - let result455 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result457 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result455) + @types.SchemaValueNode::UrlValue(result457) } 27 => { @@ -8377,21 +9157,21 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 29 => { - let result456 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result458 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result456}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result458}) } 30 => { - let result457 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result459 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result457, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result459, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result458 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result460 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result458}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result460}) } 32 => { @@ -8400,39 +9180,39 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array460.push(lifted459) + array462.push(lifted461) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result429, value : @types.SchemaValueTree::{value_nodes : array460, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result431, value : @types.SchemaValueTree::{value_nodes : array462, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array463.push(lifted462) + array465.push(lifted464) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let array500 : Array[@common.Ref] = []; - for index501 = 0; index501 < (mbt_ffi_load32((iter_base) + 20)); index501 = index501 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index501 * 24) + let array502 : Array[@common.Ref] = []; + for index503 = 0; index503 < (mbt_ffi_load32((iter_base) + 20)); index503 = index503 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index503 * 24) - let lifted499 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted501 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { - let result465 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result467 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - @common.Ref::Present(result465) + @common.Ref::Present(result467) } 1 => { - let result466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) + let result468 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 4), mbt_ffi_load32((iter_base) + 8)) - let array497 : Array[@types.SchemaValueNode] = []; - for index498 = 0; index498 < (mbt_ffi_load32((iter_base) + 16)); index498 = index498 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index498 * 32) + let array499 : Array[@types.SchemaValueNode] = []; + for index500 = 0; index500 < (mbt_ffi_load32((iter_base) + 16)); index500 = index500 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index500 * 32) - let lifted496 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted498 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -8483,25 +9263,25 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 12 => { - let result467 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result469 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result467) + @types.SchemaValueNode::StringValue(result469) } 13 => { - let array468 : Array[Int] = []; - for index469 = 0; index469 < (mbt_ffi_load32((iter_base) + 12)); index469 = index469 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index469 * 4) + let array470 : Array[Int] = []; + for index471 = 0; index471 < (mbt_ffi_load32((iter_base) + 12)); index471 = index471 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index471 * 4) - array468.push(mbt_ffi_load32((iter_base) + 0)) + array470.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array468) + @types.SchemaValueNode::RecordValue(array470) } 14 => { - let lifted470 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted472 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -8510,7 +9290,7 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted470}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted472}) } 15 => { @@ -8518,29 +9298,17 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 16 => { - let array471 : Array[Bool] = []; - for index472 = 0; index472 < (mbt_ffi_load32((iter_base) + 12)); index472 = index472 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index472 * 1) - - array471.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::FlagsValue(array471) - } - 17 => { - - let array473 : Array[Int] = []; + let array473 : Array[Bool] = []; for index474 = 0; index474 < (mbt_ffi_load32((iter_base) + 12)); index474 = index474 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index474 * 4) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index474 * 1) - array473.push(mbt_ffi_load32((iter_base) + 0)) + array473.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array473) + @types.SchemaValueNode::FlagsValue(array473) } - 18 => { + 17 => { let array475 : Array[Int] = []; for index476 = 0; index476 < (mbt_ffi_load32((iter_base) + 12)); index476 = index476 + 1 { @@ -8550,9 +9318,9 @@ pub fn get_tool(name : String) -> RegisteredTool? { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array475) + @types.SchemaValueNode::TupleValue(array475) } - 19 => { + 18 => { let array477 : Array[Int] = []; for index478 = 0; index478 < (mbt_ffi_load32((iter_base) + 12)); index478 = index478 + 1 { @@ -8562,23 +9330,35 @@ pub fn get_tool(name : String) -> RegisteredTool? { } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array477) + @types.SchemaValueNode::ListValue(array477) } - 20 => { + 19 => { - let array479 : Array[@types.MapEntry] = []; + let array479 : Array[Int] = []; for index480 = 0; index480 < (mbt_ffi_load32((iter_base) + 12)); index480 = index480 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index480 * 8) + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index480 * 4) + + array479.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array479) + } + 20 => { + + let array481 : Array[@types.MapEntry] = []; + for index482 = 0; index482 < (mbt_ffi_load32((iter_base) + 12)); index482 = index482 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index482 * 8) - array479.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array481.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array479) + @types.SchemaValueNode::MapValue(array481) } 21 => { - let lifted481 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted483 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -8587,14 +9367,14 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaValueNode::OptionValue(lifted481) + @types.SchemaValueNode::OptionValue(lifted483) } 22 => { - let lifted484 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted486 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted482 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted484 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -8603,11 +9383,11 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::OkValue(lifted482) + @types.ResultValuePayload::OkValue(lifted484) } 1 => { - let lifted483 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted485 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -8616,58 +9396,58 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.ResultValuePayload::ErrValue(lifted483) + @types.ResultValuePayload::ErrValue(lifted485) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted484) + @types.SchemaValueNode::ResultValue(lifted486) } 23 => { - let result485 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result487 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted487 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted489 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result486 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result488 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result486) + Option::Some(result488) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result485, language : lifted487}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result487, language : lifted489}) } 24 => { - let result488 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result490 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted490 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted492 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result489 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result491 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result489) + Option::Some(result491) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result488, mime_type : lifted490}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result490, mime_type : lifted492}) } 25 => { - let result491 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result493 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result491) + @types.SchemaValueNode::PathValue(result493) } 26 => { - let result492 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result494 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result492) + @types.SchemaValueNode::UrlValue(result494) } 27 => { @@ -8679,21 +9459,21 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 29 => { - let result493 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result495 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result493}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result495}) } 30 => { - let result494 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result496 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result494, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result496, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result495 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result497 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result495}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result497}) } 32 => { @@ -8702,174 +9482,174 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array497.push(lifted496) + array499.push(lifted498) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @common.Ref::ValueIs(@common.ValueIsRef::{name : result466, value : @types.SchemaValueTree::{value_nodes : array497, root : mbt_ffi_load32((iter_base) + 20)}}) + @common.Ref::ValueIs(@common.ValueIsRef::{name : result468, value : @types.SchemaValueTree::{value_nodes : array499, root : mbt_ffi_load32((iter_base) + 20)}}) } _ => panic() } - array500.push(lifted499) + array502.push(lifted501) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @common.Constraint::Forbids(@common.ForbidsC::{lhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 4)), lhs : array463, rhs : array500}) + @common.Constraint::Forbids(@common.ForbidsC::{lhs_quant : @common.Quantifier::from(mbt_ffi_load8_u((iter_base) + 4)), lhs : array465, rhs : array502}) } _ => panic() } - array503.push(lifted502) + array505.push(lifted504) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 172)) - let lifted514 : @common.StreamSpec? = match mbt_ffi_load8_u((iter_base) + 180) { + let lifted516 : @common.StreamSpec? = match mbt_ffi_load8_u((iter_base) + 180) { 0 => Option::None 1 => { - let result505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 184), mbt_ffi_load32((iter_base) + 188)) + let result507 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 184), mbt_ffi_load32((iter_base) + 188)) - let result506 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 192), mbt_ffi_load32((iter_base) + 196)) + let result508 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 192), mbt_ffi_load32((iter_base) + 196)) - let array509 : Array[@common.Example] = []; - for index510 = 0; index510 < (mbt_ffi_load32((iter_base) + 204)); index510 = index510 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 200)) + (index510 * 16) + let array511 : Array[@common.Example] = []; + for index512 = 0; index512 < (mbt_ffi_load32((iter_base) + 204)); index512 = index512 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 200)) + (index512 * 16) - let result507 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result509 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result508 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result510 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array509.push(@common.Example::{title : result507, body : result508}) + array511.push(@common.Example::{title : result509, body : result510}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 200)) - let array512 : Array[String] = []; - for index513 = 0; index513 < (mbt_ffi_load32((iter_base) + 212)); index513 = index513 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 208)) + (index513 * 8) + let array514 : Array[String] = []; + for index515 = 0; index515 < (mbt_ffi_load32((iter_base) + 212)); index515 = index515 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 208)) + (index515 * 8) - let result511 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result513 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array512.push(result511) + array514.push(result513) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 208)) - Option::Some(@common.StreamSpec::{doc : @common.Doc::{summary : result505, description : result506, examples : array509}, mime : array512, required : (mbt_ffi_load8_u((iter_base) + 216) != 0)}) + Option::Some(@common.StreamSpec::{doc : @common.Doc::{summary : result507, description : result508, examples : array511}, mime : array514, required : (mbt_ffi_load8_u((iter_base) + 216) != 0)}) } _ => panic() } - let lifted524 : @common.StreamSpec? = match mbt_ffi_load8_u((iter_base) + 220) { + let lifted526 : @common.StreamSpec? = match mbt_ffi_load8_u((iter_base) + 220) { 0 => Option::None 1 => { - let result515 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 224), mbt_ffi_load32((iter_base) + 228)) + let result517 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 224), mbt_ffi_load32((iter_base) + 228)) - let result516 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 232), mbt_ffi_load32((iter_base) + 236)) + let result518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 232), mbt_ffi_load32((iter_base) + 236)) - let array519 : Array[@common.Example] = []; - for index520 = 0; index520 < (mbt_ffi_load32((iter_base) + 244)); index520 = index520 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 240)) + (index520 * 16) + let array521 : Array[@common.Example] = []; + for index522 = 0; index522 < (mbt_ffi_load32((iter_base) + 244)); index522 = index522 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 240)) + (index522 * 16) - let result517 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result519 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result520 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array519.push(@common.Example::{title : result517, body : result518}) + array521.push(@common.Example::{title : result519, body : result520}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 240)) - let array522 : Array[String] = []; - for index523 = 0; index523 < (mbt_ffi_load32((iter_base) + 252)); index523 = index523 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 248)) + (index523 * 8) + let array524 : Array[String] = []; + for index525 = 0; index525 < (mbt_ffi_load32((iter_base) + 252)); index525 = index525 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 248)) + (index525 * 8) - let result521 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result523 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array522.push(result521) + array524.push(result523) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 248)) - Option::Some(@common.StreamSpec::{doc : @common.Doc::{summary : result515, description : result516, examples : array519}, mime : array522, required : (mbt_ffi_load8_u((iter_base) + 256) != 0)}) + Option::Some(@common.StreamSpec::{doc : @common.Doc::{summary : result517, description : result518, examples : array521}, mime : array524, required : (mbt_ffi_load8_u((iter_base) + 256) != 0)}) } _ => panic() } - let lifted541 : @common.ResultSpec? = match mbt_ffi_load8_u((iter_base) + 260) { + let lifted543 : @common.ResultSpec? = match mbt_ffi_load8_u((iter_base) + 260) { 0 => Option::None 1 => { - let result525 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 268), mbt_ffi_load32((iter_base) + 272)) + let result527 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 268), mbt_ffi_load32((iter_base) + 272)) - let result526 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 276), mbt_ffi_load32((iter_base) + 280)) + let result528 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 276), mbt_ffi_load32((iter_base) + 280)) - let array529 : Array[@common.Example] = []; - for index530 = 0; index530 < (mbt_ffi_load32((iter_base) + 288)); index530 = index530 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 284)) + (index530 * 16) + let array531 : Array[@common.Example] = []; + for index532 = 0; index532 < (mbt_ffi_load32((iter_base) + 288)); index532 = index532 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 284)) + (index532 * 16) - let result527 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result529 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result528 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result530 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array529.push(@common.Example::{title : result527, body : result528}) + array531.push(@common.Example::{title : result529, body : result530}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 284)) - let array538 : Array[@common.Formatter] = []; - for index539 = 0; index539 < (mbt_ffi_load32((iter_base) + 296)); index539 = index539 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 292)) + (index539 * 32) + let array540 : Array[@common.Formatter] = []; + for index541 = 0; index541 < (mbt_ffi_load32((iter_base) + 296)); index541 = index541 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 292)) + (index541 * 32) - let result531 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result532 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result534 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result535 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let array536 : Array[@common.Example] = []; - for index537 = 0; index537 < (mbt_ffi_load32((iter_base) + 28)); index537 = index537 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index537 * 16) + let array538 : Array[@common.Example] = []; + for index539 = 0; index539 < (mbt_ffi_load32((iter_base) + 28)); index539 = index539 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index539 * 16) - let result534 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result536 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result535 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result537 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array536.push(@common.Example::{title : result534, body : result535}) + array538.push(@common.Example::{title : result536, body : result537}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - array538.push(@common.Formatter::{name : result531, doc : @common.Doc::{summary : result532, description : result533, examples : array536}}) + array540.push(@common.Formatter::{name : result533, doc : @common.Doc::{summary : result534, description : result535, examples : array538}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 292)) - let result540 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 300), mbt_ffi_load32((iter_base) + 304)) + let result542 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 300), mbt_ffi_load32((iter_base) + 304)) - Option::Some(@common.ResultSpec::{type_ : mbt_ffi_load32((iter_base) + 264), doc : @common.Doc::{summary : result525, description : result526, examples : array529}, formatters : array538, default_formatter : result540}) + Option::Some(@common.ResultSpec::{type_ : mbt_ffi_load32((iter_base) + 264), doc : @common.Doc::{summary : result527, description : result528, examples : array531}, formatters : array540, default_formatter : result542}) } _ => panic() } - let array550 : Array[@common.ErrorCase] = []; - for index551 = 0; index551 < (mbt_ffi_load32((iter_base) + 312)); index551 = index551 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 308)) + (index551 * 44) + let array552 : Array[@common.ErrorCase] = []; + for index553 = 0; index553 < (mbt_ffi_load32((iter_base) + 312)); index553 = index553 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 308)) + (index553 * 44) - let result542 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result544 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result543 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result545 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result544 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result546 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let array547 : Array[@common.Example] = []; - for index548 = 0; index548 < (mbt_ffi_load32((iter_base) + 28)); index548 = index548 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index548 * 16) + let array549 : Array[@common.Example] = []; + for index550 = 0; index550 < (mbt_ffi_load32((iter_base) + 28)); index550 = index550 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index550 * 16) - let result545 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result547 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result546 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result548 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array547.push(@common.Example::{title : result545, body : result546}) + array549.push(@common.Example::{title : result547, body : result548}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let lifted549 : Int? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted551 : Int? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { @@ -8878,11 +9658,11 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - array550.push(@common.ErrorCase::{name : result542, doc : @common.Doc::{summary : result543, description : result544, examples : array547}, kind : @common.ErrorKind::from(mbt_ffi_load8_u((iter_base) + 32)), exit_code : (mbt_ffi_load8_u((iter_base) + 33)).to_byte(), payload : lifted549}) + array552.push(@common.ErrorCase::{name : result544, doc : @common.Doc::{summary : result545, description : result546, examples : array549}, kind : @common.ErrorKind::from(mbt_ffi_load8_u((iter_base) + 32)), exit_code : (mbt_ffi_load8_u((iter_base) + 33)).to_byte(), payload : lifted551}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 308)) - let lifted552 : @common.CommandAnnotations? = match mbt_ffi_load8_u((iter_base) + 316) { + let lifted554 : @common.CommandAnnotations? = match mbt_ffi_load8_u((iter_base) + 316) { 0 => Option::None 1 => { @@ -8891,20 +9671,20 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - Option::Some(@common.CommandBody::{positionals : @common.Positionals::{fixed : array120, tail : lifted134}, options : array185, flags : array202, constraints : array503, stdin : lifted514, stdout : lifted524, result : lifted541, errors : array550, annotations : lifted552}) + Option::Some(@common.CommandBody::{positionals : @common.Positionals::{fixed : array121, tail : lifted135}, options : array187, flags : array204, constraints : array505, stdin : lifted516, stdout : lifted526, result : lifted543, errors : array552, annotations : lifted554}) } _ => panic() } - array554.push(@common.CommandNode::{name : result0, aliases : array, doc : @common.Doc::{summary : result2, description : result3, examples : array6}, globals : @common.Globals::{options : array57, flags : array74}, subcommands : array76, body : lifted553}) + array556.push(@common.CommandNode::{name : result0, aliases : array, doc : @common.Doc::{summary : result2, description : result3, examples : array6}, globals : @common.Globals::{options : array58, flags : array75}, subcommands : array77, body : lifted555}) } mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) - let array682 : Array[@types.SchemaTypeNode] = []; - for index683 = 0; index683 < (mbt_ffi_load32((return_area) + 28)); index683 = index683 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 24)) + (index683 * 144) + let array754 : Array[@types.SchemaTypeNode] = []; + for index755 = 0; index755 < (mbt_ffi_load32((return_area) + 28)); index755 = index755 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 24)) + (index755 * 144) - let lifted668 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted740 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) @@ -8915,642 +9695,903 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { + let lifted564 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted559 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted558 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted558) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted561 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + let lifted560 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::StringType - } - 14 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let array570 : Array[@types.NamedFieldType] = []; - for index571 = 0; index571 < (mbt_ffi_load32((iter_base) + 12)); index571 = index571 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index571 * 68) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let result556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted560) + } + _ => panic() + } - let lifted558 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted563 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result557 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result557) + Option::Some(result562) + } + _ => panic() } - _ => panic() - } - let array560 : Array[String] = []; - for index561 = 0; index561 < (mbt_ffi_load32((iter_base) + 28)); index561 = index561 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index561 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted559, max : lifted561, unit : lifted563}) + } + _ => panic() + } - let result559 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::S8Type(lifted564) + } + 3 => { - array560.push(result559) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let lifted571 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array563 : Array[String] = []; - for index564 = 0; index564 < (mbt_ffi_load32((iter_base) + 36)); index564 = index564 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index564 * 8) + let lifted566 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted565 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array563.push(result562) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted566 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result565) + Option::Some(lifted565) + } + _ => panic() } - _ => panic() - } - let lifted569 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + let lifted568 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted568 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + let lifted567 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.Role::Multimodal - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::UnstructuredText - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::UnstructuredBinary + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - 3 => { - let result567 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result567) - } - _ => panic() + Option::Some(lifted567) } + _ => panic() + } + + let lifted570 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some(lifted568) + let result569 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result569) + } + _ => panic() } - _ => panic() - } - array570.push(@types.NamedFieldType::{name : result556, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted558, aliases : array560, examples : array563, deprecated : lifted566, role : lifted569}}) + Option::Some(@types.NumericRestrictions::{min : lifted566, max : lifted568, unit : lifted570}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array570) + @types.SchemaTypeBody::S16Type(lifted571) } - 15 => { + 4 => { - let array587 : Array[@types.VariantCaseType] = []; - for index588 = 0; index588 < (mbt_ffi_load32((iter_base) + 12)); index588 = index588 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index588 * 72) + let lifted578 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result572 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted573 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted573 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted572 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted575 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result574 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result574) + Option::Some(lifted572) + } + _ => panic() } - _ => panic() - } - let array577 : Array[String] = []; - for index578 = 0; index578 < (mbt_ffi_load32((iter_base) + 32)); index578 = index578 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index578 * 8) - - let result576 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted575 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - array577.push(result576) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let lifted574 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array580 : Array[String] = []; - for index581 = 0; index581 < (mbt_ffi_load32((iter_base) + 40)); index581 = index581 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index581 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result579 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - array580.push(result579) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted583 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + Option::Some(lifted574) + } + _ => panic() + } - let result582 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let lifted577 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some(result582) + let result576 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result576) + } + _ => panic() } - _ => panic() + + Option::Some(@types.NumericRestrictions::{min : lifted573, max : lifted575, unit : lifted577}) } + _ => panic() + } - let lifted586 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::S32Type(lifted578) + } + 5 => { - let lifted585 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + let lifted585 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.Role::Multimodal - } - 1 => { + let lifted580 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredText - } - 2 => { + let lifted579 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.Role::UnstructuredBinary - } - 3 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result584 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.Role::Other(result584) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() - } - Option::Some(lifted585) + Option::Some(lifted579) + } + _ => panic() } - _ => panic() - } - array587.push(@types.VariantCaseType::{name : result572, payload : lifted573, metadata : @types.MetadataEnvelope::{doc : lifted575, aliases : array577, examples : array580, deprecated : lifted583, role : lifted586}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted582 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::VariantType(array587) - } - 16 => { + let lifted581 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let array590 : Array[String] = []; - for index591 = 0; index591 < (mbt_ffi_load32((iter_base) + 12)); index591 = index591 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index591 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result589 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array590.push(result589) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + Option::Some(lifted581) + } + _ => panic() + } - @types.SchemaTypeBody::EnumType(array590) - } - 17 => { + let lifted584 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let array593 : Array[String] = []; - for index594 = 0; index594 < (mbt_ffi_load32((iter_base) + 12)); index594 = index594 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index594 * 8) + let result583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result592 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(result583) + } + _ => panic() + } - array593.push(result592) + Option::Some(@types.NumericRestrictions::{min : lifted580, max : lifted582, unit : lifted584}) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array593) + @types.SchemaTypeBody::S64Type(lifted585) } - 18 => { + 6 => { - let array595 : Array[Int] = []; - for index596 = 0; index596 < (mbt_ffi_load32((iter_base) + 12)); index596 = index596 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index596 * 4) + let lifted592 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array595.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted587 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::TupleType(array595) - } - 19 => { + let lifted586 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) - } - 23 => { + Option::Some(lifted586) + } + _ => panic() + } - let lifted597 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted589 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let lifted588 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted598 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 20)) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted597, err : lifted598}) - } - 24 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted602 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + Option::Some(lifted588) + } + _ => panic() + } - let array600 : Array[String] = []; - for index601 = 0; index601 < (mbt_ffi_load32((iter_base) + 16)); index601 = index601 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index601 * 8) + let lifted591 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result599 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result590 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array600.push(result599) + Option::Some(result590) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array600) + Option::Some(@types.NumericRestrictions::{min : lifted587, max : lifted589, unit : lifted591}) } _ => panic() } - let lifted603 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + @types.SchemaTypeBody::U8Type(lifted592) + } + 7 => { + + let lifted599 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let lifted594 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted604 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let lifted593 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted606 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result605 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result605) - } - _ => panic() - } + Option::Some(lifted593) + } + _ => panic() + } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted602, min_length : lifted603, max_length : lifted604, regex : lifted606}) - } - 25 => { + let lifted596 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted610 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted595 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array608 : Array[String] = []; - for index609 = 0; index609 < (mbt_ffi_load32((iter_base) + 16)); index609 = index609 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index609 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result607 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - array608.push(result607) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(array608) - } - _ => panic() - } + Option::Some(lifted595) + } + _ => panic() + } - let lifted611 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let lifted598 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let result597 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted612 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + Option::Some(result597) + } + _ => panic() + } - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + Option::Some(@types.NumericRestrictions::{min : lifted594, max : lifted596, unit : lifted598}) } _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted610, min_bytes : lifted611, max_bytes : lifted612}) + @types.SchemaTypeBody::U16Type(lifted599) } - 26 => { + 8 => { - let lifted616 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted606 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array614 : Array[String] = []; - for index615 = 0; index615 < (mbt_ffi_load32((iter_base) + 20)); index615 = index615 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index615 * 8) + let lifted601 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted600 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result613 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - array614.push(result613) + Option::Some(lifted600) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array614) - } - _ => panic() - } + let lifted603 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted620 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + let lifted602 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted602) + } + _ => panic() + } - let array618 : Array[String] = []; - for index619 = 0; index619 < (mbt_ffi_load32((iter_base) + 32)); index619 = index619 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index619 * 8) + let lifted605 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result617 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result604 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array618.push(result617) + Option::Some(result604) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array618) + Option::Some(@types.NumericRestrictions::{min : lifted601, max : lifted603, unit : lifted605}) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted616, allowed_extensions : lifted620}) + @types.SchemaTypeBody::U32Type(lifted606) } - 27 => { + 9 => { - let lifted624 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted613 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array622 : Array[String] = []; - for index623 = 0; index623 < (mbt_ffi_load32((iter_base) + 16)); index623 = index623 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index623 * 8) + let lifted608 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result621 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted607 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array622.push(result621) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted607) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array622) - } - _ => panic() - } + let lifted610 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted628 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let lifted609 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let array626 : Array[String] = []; - for index627 = 0; index627 < (mbt_ffi_load32((iter_base) + 28)); index627 = index627 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index627 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result625 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array626.push(result625) + Option::Some(lifted609) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array626) + let lifted612 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result611 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result611) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted608, max : lifted610, unit : lifted612}) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted624, allowed_hosts : lifted628}) + @types.SchemaTypeBody::U64Type(lifted613) } - 28 => { + 10 => { - @types.SchemaTypeBody::DatetimeType - } - 29 => { + let lifted620 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::DurationType - } - 30 => { + let lifted615 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result629 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted614 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let array631 : Array[String] = []; - for index632 = 0; index632 < (mbt_ffi_load32((iter_base) + 20)); index632 = index632 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index632 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result630 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - array631.push(result630) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted634 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + Option::Some(lifted614) + } + _ => panic() + } + + let lifted617 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted616 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted616) + } + _ => panic() + } + + let lifted619 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result618 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result633 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + Option::Some(result618) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result633}) + Option::Some(@types.NumericRestrictions::{min : lifted615, max : lifted617, unit : lifted619}) } _ => panic() } - let lifted636 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + @types.SchemaTypeBody::F32Type(lifted620) + } + 11 => { + + let lifted627 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result635 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let lifted622 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted621 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted621) + } + _ => panic() + } + + let lifted624 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted623 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted623) + } + _ => panic() + } + + let lifted626 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result625 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result625) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result635}) + Option::Some(@types.NumericRestrictions::{min : lifted622, max : lifted624, unit : lifted626}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result629, allowed_suffixes : array631, min : lifted634, max : lifted636}) + @types.SchemaTypeBody::F64Type(lifted627) } - 31 => { + 12 => { - let array660 : Array[@types.UnionBranch] = []; - for index661 = 0; index661 < (mbt_ffi_load32((iter_base) + 12)); index661 = index661 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index661 * 92) + @types.SchemaTypeBody::CharType + } + 13 => { - let result637 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::StringType + } + 14 => { - let lifted646 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + let array642 : Array[@types.NamedFieldType] = []; + for index643 = 0; index643 < (mbt_ffi_load32((iter_base) + 12)); index643 = index643 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index643 * 68) - let result638 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result628 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.DiscriminatorRule::Prefix(result638) - } + let lifted630 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None 1 => { - let result639 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result629 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result639) + Option::Some(result629) } - 2 => { + _ => panic() + } - let result640 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let array632 : Array[String] = []; + for index633 = 0; index633 < (mbt_ffi_load32((iter_base) + 28)); index633 = index633 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index633 * 8) - @types.DiscriminatorRule::Contains(result640) - } - 3 => { + let result631 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array632.push(result631) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let result641 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let array635 : Array[String] = []; + for index636 = 0; index636 < (mbt_ffi_load32((iter_base) + 36)); index636 = index636 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index636 * 8) - @types.DiscriminatorRule::Regex(result641) + let result634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array635.push(result634) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted638 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result637 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result637) } - 4 => { + _ => panic() + } + + let lifted641 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { - let result642 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted640 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { - let lifted644 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None + @types.Role::Multimodal + } 1 => { - let result643 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result639 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - Option::Some(result643) + @types.Role::Other(result639) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result642, literal : lifted644}) + Option::Some(lifted640) } - 5 => { + _ => panic() + } + + array642.push(@types.NamedFieldType::{name : result628, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted630, aliases : array632, examples : array635, deprecated : lifted638, role : lifted641}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let result645 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.SchemaTypeBody::RecordType(array642) + } + 15 => { + + let array659 : Array[@types.VariantCaseType] = []; + for index660 = 0; index660 < (mbt_ffi_load32((iter_base) + 12)); index660 = index660 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index660 * 72) + + let result644 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.DiscriminatorRule::FieldAbsent(result645) + let lifted645 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) } _ => panic() } - let lifted648 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted647 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result647 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result646 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result647) + Option::Some(result646) } _ => panic() } - let array650 : Array[String] = []; - for index651 = 0; index651 < (mbt_ffi_load32((iter_base) + 52)); index651 = index651 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index651 * 8) + let array649 : Array[String] = []; + for index650 = 0; index650 < (mbt_ffi_load32((iter_base) + 32)); index650 = index650 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index650 * 8) - let result649 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result648 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array650.push(result649) + array649.push(result648) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array653 : Array[String] = []; - for index654 = 0; index654 < (mbt_ffi_load32((iter_base) + 60)); index654 = index654 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index654 * 8) + let array652 : Array[String] = []; + for index653 = 0; index653 < (mbt_ffi_load32((iter_base) + 40)); index653 = index653 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index653 * 8) - let result652 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result651 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array653.push(result652) + array652.push(result651) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted656 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted655 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result655 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result654 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result655) + Option::Some(result654) } _ => panic() } - let lifted659 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted658 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted658 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted657 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -9565,57 +10606,83 @@ pub fn get_tool(name : String) -> RegisteredTool? { } 3 => { - let result657 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result656 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result657) + @types.Role::Other(result656) } _ => panic() } - Option::Some(lifted658) + Option::Some(lifted657) } _ => panic() } - array660.push(@types.UnionBranch::{tag : result637, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted646, metadata : @types.MetadataEnvelope::{doc : lifted648, aliases : array650, examples : array653, deprecated : lifted656, role : lifted659}}) + array659.push(@types.VariantCaseType::{name : result644, payload : lifted645, metadata : @types.MetadataEnvelope::{doc : lifted647, aliases : array649, examples : array652, deprecated : lifted655, role : lifted658}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array660}) + @types.SchemaTypeBody::VariantType(array659) } - 32 => { + 16 => { - let lifted663 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let array662 : Array[String] = []; + for index663 = 0; index663 < (mbt_ffi_load32((iter_base) + 12)); index663 = index663 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index663 * 8) - let result662 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result661 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(result662) - } - _ => panic() + array662.push(result661) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted663}) + @types.SchemaTypeBody::EnumType(array662) } - 33 => { + 17 => { - let lifted665 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let array665 : Array[String] = []; + for index666 = 0; index666 < (mbt_ffi_load32((iter_base) + 12)); index666 = index666 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index666 * 8) - let result664 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result664 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(result664) - } - _ => panic() + array665.push(result664) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted665}) + @types.SchemaTypeBody::FlagsType(array665) } - 34 => { + 18 => { + + let array667 : Array[Int] = []; + for index668 = 0; index668 < (mbt_ffi_load32((iter_base) + 12)); index668 = index668 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index668 * 4) + + array667.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let lifted666 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + @types.SchemaTypeBody::TupleType(array667) + } + 19 => { + + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { + + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { + + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { + + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { + + let lifted669 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -9624,693 +10691,687 @@ pub fn get_tool(name : String) -> RegisteredTool? { _ => panic() } - @types.SchemaTypeBody::FutureType(lifted666) - } - 35 => { - - let lifted667 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted670 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) + Option::Some(mbt_ffi_load32((iter_base) + 20)) } _ => panic() } - @types.SchemaTypeBody::StreamType(lifted667) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted669, err : lifted670}) } - _ => panic() - } + 24 => { - let lifted670 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { + let lifted674 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result669 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let array672 : Array[String] = []; + for index673 = 0; index673 < (mbt_ffi_load32((iter_base) + 16)); index673 = index673 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index673 * 8) - Option::Some(result669) - } - _ => panic() - } + let result671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array672 : Array[String] = []; - for index673 = 0; index673 < (mbt_ffi_load32((iter_base) + 104)); index673 = index673 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index673 * 8) + array672.push(result671) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - let result671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(array672) + } + _ => panic() + } - array672.push(result671) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + let lifted675 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } - let array675 : Array[String] = []; - for index676 = 0; index676 < (mbt_ffi_load32((iter_base) + 112)); index676 = index676 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index676 * 8) + let lifted676 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - let result674 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } - array675.push(result674) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + let lifted678 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - let lifted678 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + let result677 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - let result677 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + Option::Some(result677) + } + _ => panic() + } - Option::Some(result677) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted674, min_length : lifted675, max_length : lifted676, regex : lifted678}) } - _ => panic() - } + 25 => { - let lifted681 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + let lifted682 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let lifted680 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + let array680 : Array[String] = []; + for index681 = 0; index681 < (mbt_ffi_load32((iter_base) + 16)); index681 = index681 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index681 * 8) - @types.Role::Multimodal - } - 1 => { + let result679 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.Role::UnstructuredText + array680.push(result679) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array680) } - 2 => { + _ => panic() + } - @types.Role::UnstructuredBinary + let lifted683 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) } - 3 => { + _ => panic() + } - let result679 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let lifted684 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - @types.Role::Other(result679) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) } _ => panic() } - Option::Some(lifted680) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted682, min_bytes : lifted683, max_bytes : lifted684}) } - _ => panic() - } - - array682.push(@types.SchemaTypeNode::{body : lifted668, metadata : @types.MetadataEnvelope::{doc : lifted670, aliases : array672, examples : array675, deprecated : lifted678, role : lifted681}}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 24)) + 26 => { - let array687 : Array[@types.SchemaTypeDef] = []; - for index688 = 0; index688 < (mbt_ffi_load32((return_area) + 36)); index688 = index688 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index688 * 24) + let lifted688 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - let result684 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array686 : Array[String] = []; + for index687 = 0; index687 < (mbt_ffi_load32((iter_base) + 20)); index687 = index687 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index687 * 8) - let lifted686 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result685 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result685 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + array686.push(result685) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(result685) - } - _ => panic() - } + Option::Some(array686) + } + _ => panic() + } - array687.push(@types.SchemaTypeDef::{id : result684, name : lifted686, body : mbt_ffi_load32((iter_base) + 20)}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) + let lifted692 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - Option::Some(RegisteredTool::{definition : @common.Tool::{version : result, commands : @common.CommandTree::{nodes : array554}, schema : @types.SchemaGraph::{type_nodes : array682, defs : array687, root : mbt_ffi_load32((return_area) + 40)}}, implemented_by : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((return_area) + 48)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((return_area) + 56)).reinterpret_as_uint64()}}}) - } - _ => panic() - } - let ret = lifted689 - mbt_ffi_free(ptr) - mbt_ffi_free(return_area) - return ret + let array690 : Array[String] = []; + for index691 = 0; index691 < (mbt_ffi_load32((iter_base) + 32)); index691 = index691 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index691 * 8) -} -///| -pub fn ToolRpc::tool_rpc(tool_name : String) -> ToolRpc { + let result689 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let ptr = mbt_ffi_str2ptr(tool_name) - let result : Int = wasmImportConstructorToolRpc(ptr, tool_name.length()); - let ret = ToolRpc::ToolRpc(result) - mbt_ffi_free(ptr) - return ret + array690.push(result689) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) -} -///| -pub fn ToolRpc::invoke_and_await(self : ToolRpc, command_path : Array[String], input : @types.TypedSchemaValue, stdin : @streams.InputStream?) -> Result[@common.InvocationResult, RpcError] { - let cleanup_list : Array[Int] = [] + Option::Some(array690) + } + _ => panic() + } - let ToolRpc(handle) = self + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted688, allowed_extensions : lifted692}) + } + 27 => { - let address = mbt_ffi_malloc((command_path).length() * 8); - for index = 0; index < (command_path).length(); index = index + 1 { - let iter_elem : String = (command_path)[(index)] - let iter_base = address + (index * 8); + let lifted696 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr) - cleanup_list.push(ptr) + let array694 : Array[String] = []; + for index695 = 0; index695 < (mbt_ffi_load32((iter_base) + 16)); index695 = index695 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index695 * 8) - } + let result693 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let address210 = mbt_ffi_malloc((((input).graph).type_nodes).length() * 144); - for index211 = 0; index211 < (((input).graph).type_nodes).length(); index211 = index211 + 1 { - let iter_elem : @types.SchemaTypeNode = (((input).graph).type_nodes)[(index211)] - let iter_base = address210 + (index211 * 144); + array694.push(result693) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - match (iter_elem).body { - RefType(payload) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store32((iter_base) + 8, payload) + Option::Some(array694) + } + _ => panic() + } - () - } - BoolType => { - mbt_ffi_store8((iter_base) + 0, (1)) + let lifted700 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - () - } - S8Type => { - mbt_ffi_store8((iter_base) + 0, (2)) + let array698 : Array[String] = []; + for index699 = 0; index699 < (mbt_ffi_load32((iter_base) + 28)); index699 = index699 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index699 * 8) - () - } - S16Type => { - mbt_ffi_store8((iter_base) + 0, (3)) + let result697 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - S32Type => { - mbt_ffi_store8((iter_base) + 0, (4)) + array698.push(result697) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - () - } - S64Type => { - mbt_ffi_store8((iter_base) + 0, (5)) + Option::Some(array698) + } + _ => panic() + } - () - } - U8Type => { - mbt_ffi_store8((iter_base) + 0, (6)) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted696, allowed_hosts : lifted700}) + } + 28 => { - () - } - U16Type => { - mbt_ffi_store8((iter_base) + 0, (7)) + @types.SchemaTypeBody::DatetimeType + } + 29 => { - () - } - U32Type => { - mbt_ffi_store8((iter_base) + 0, (8)) + @types.SchemaTypeBody::DurationType + } + 30 => { - () - } - U64Type => { - mbt_ffi_store8((iter_base) + 0, (9)) + let result701 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - () - } - F32Type => { - mbt_ffi_store8((iter_base) + 0, (10)) + let array703 : Array[String] = []; + for index704 = 0; index704 < (mbt_ffi_load32((iter_base) + 20)); index704 = index704 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index704 * 8) - () - } - F64Type => { - mbt_ffi_store8((iter_base) + 0, (11)) + let result702 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - CharType => { - mbt_ffi_store8((iter_base) + 0, (12)) + array703.push(result702) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - () - } - StringType => { - mbt_ffi_store8((iter_base) + 0, (13)) + let lifted706 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - () - } - RecordType(payload13) => { - mbt_ffi_store8((iter_base) + 0, (14)) + let result705 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - let address34 = mbt_ffi_malloc((payload13).length() * 68); - for index35 = 0; index35 < (payload13).length(); index35 = index35 + 1 { - let iter_elem : @types.NamedFieldType = (payload13)[(index35)] - let iter_base = address34 + (index35 * 68); + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result705}) + } + _ => panic() + } - let ptr14 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr14) - mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + let lifted708 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let result707 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - () + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result707}) + } + _ => panic() } - Some(payload16) => { - mbt_ffi_store8((iter_base) + 12, (1)) - - let ptr17 = mbt_ffi_str2ptr(payload16) - mbt_ffi_store32((iter_base) + 20, payload16.length()) - mbt_ffi_store32((iter_base) + 16, ptr17) - cleanup_list.push(ptr17) - () - } + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result701, allowed_suffixes : array703, min : lifted706, max : lifted708}) } + 31 => { - let address19 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index20 = 0; index20 < (((iter_elem).metadata).aliases).length(); index20 = index20 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index20)] - let iter_base = address19 + (index20 * 8); + let array732 : Array[@types.UnionBranch] = []; + for index733 = 0; index733 < (mbt_ffi_load32((iter_base) + 12)); index733 = index733 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index733 * 92) - let ptr18 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr18) - cleanup_list.push(ptr18) + let result709 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - } - mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 24, address19) + let lifted718 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { - let address22 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index23 = 0; index23 < (((iter_elem).metadata).examples).length(); index23 = index23 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index23)] - let iter_base = address22 + (index23 * 8); + let result710 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let ptr21 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr21) - cleanup_list.push(ptr21) + @types.DiscriminatorRule::Prefix(result710) + } + 1 => { - } - mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 32, address22) + let result711 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 40, (0)) + @types.DiscriminatorRule::Suffix(result711) + } + 2 => { - () - } - Some(payload25) => { - mbt_ffi_store8((iter_base) + 40, (1)) + let result712 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let ptr26 = mbt_ffi_str2ptr(payload25) - mbt_ffi_store32((iter_base) + 48, payload25.length()) - mbt_ffi_store32((iter_base) + 44, ptr26) - cleanup_list.push(ptr26) + @types.DiscriminatorRule::Contains(result712) + } + 3 => { - () - } - } + let result713 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 52, (0)) + @types.DiscriminatorRule::Regex(result713) + } + 4 => { - () - } - Some(payload28) => { - mbt_ffi_store8((iter_base) + 52, (1)) + let result714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - match payload28 { - Multimodal => { - mbt_ffi_store8((iter_base) + 56, (0)) + let lifted716 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - () + let result715 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + + Option::Some(result715) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result714, literal : lifted716}) } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 56, (1)) + 5 => { - () + let result717 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::FieldAbsent(result717) } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 56, (2)) + _ => panic() + } - () + let lifted720 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result719 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result719) } - Other(payload32) => { - mbt_ffi_store8((iter_base) + 56, (3)) + _ => panic() + } - let ptr33 = mbt_ffi_str2ptr(payload32) - mbt_ffi_store32((iter_base) + 64, payload32.length()) - mbt_ffi_store32((iter_base) + 60, ptr33) - cleanup_list.push(ptr33) + let array722 : Array[String] = []; + for index723 = 0; index723 < (mbt_ffi_load32((iter_base) + 52)); index723 = index723 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index723 * 8) - () + let result721 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array722.push(result721) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + + let array725 : Array[String] = []; + for index726 = 0; index726 < (mbt_ffi_load32((iter_base) + 60)); index726 = index726 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index726 * 8) + + let result724 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array725.push(result724) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + + let lifted728 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result727 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result727) } + _ => panic() } - () - } - } - cleanup_list.push(ptr14) - cleanup_list.push(address19) - cleanup_list.push(address22) + let lifted731 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload13).length()) - mbt_ffi_store32((iter_base) + 8, address34) - cleanup_list.push(address34) + let lifted730 = match (mbt_ffi_load8_u((iter_base) + 80)) { + 0 => { - () - } - VariantType(payload36) => { - mbt_ffi_store8((iter_base) + 0, (15)) + @types.Role::Multimodal + } + 1 => { - let address59 = mbt_ffi_malloc((payload36).length() * 72); - for index60 = 0; index60 < (payload36).length(); index60 = index60 + 1 { - let iter_elem : @types.VariantCaseType = (payload36)[(index60)] - let iter_base = address59 + (index60 * 72); + @types.Role::UnstructuredText + } + 2 => { - let ptr37 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr37) + @types.Role::UnstructuredBinary + } + 3 => { - match ((iter_elem).payload) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let result729 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - () + @types.Role::Other(result729) + } + _ => panic() + } + + Option::Some(lifted730) + } + _ => panic() + } + + array732.push(@types.UnionBranch::{tag : result709, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted718, metadata : @types.MetadataEnvelope::{doc : lifted720, aliases : array722, examples : array725, deprecated : lifted728, role : lifted731}}) } - Some(payload39) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload39) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array732}) + } + 32 => { + + let lifted735 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result734 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result734) + } + _ => panic() } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted735}) } + 33 => { - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + let lifted737 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () + let result736 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result736) + } + _ => panic() } - Some(payload41) => { - mbt_ffi_store8((iter_base) + 16, (1)) - let ptr42 = mbt_ffi_str2ptr(payload41) - mbt_ffi_store32((iter_base) + 24, payload41.length()) - mbt_ffi_store32((iter_base) + 20, ptr42) - cleanup_list.push(ptr42) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted737}) + } + 34 => { - () + let lifted738 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() } + + @types.SchemaTypeBody::FutureType(lifted738) } + 35 => { - let address44 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index45 = 0; index45 < (((iter_elem).metadata).aliases).length(); index45 = index45 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index45)] - let iter_base = address44 + (index45 * 8); + let lifted739 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr43 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr43) - cleanup_list.push(ptr43) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + @types.SchemaTypeBody::StreamType(lifted739) } - mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 28, address44) + _ => panic() + } - let address47 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index48 = 0; index48 < (((iter_elem).metadata).examples).length(); index48 = index48 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index48)] - let iter_base = address47 + (index48 * 8); + let lifted742 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + 0 => Option::None + 1 => { - let ptr46 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr46) - cleanup_list.push(ptr46) + let result741 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + Option::Some(result741) } - mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 36, address47) + _ => panic() + } - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 44, (0)) + let array744 : Array[String] = []; + for index745 = 0; index745 < (mbt_ffi_load32((iter_base) + 104)); index745 = index745 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index745 * 8) - () - } - Some(payload50) => { - mbt_ffi_store8((iter_base) + 44, (1)) + let result743 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let ptr51 = mbt_ffi_str2ptr(payload50) - mbt_ffi_store32((iter_base) + 52, payload50.length()) - mbt_ffi_store32((iter_base) + 48, ptr51) - cleanup_list.push(ptr51) + array744.push(result743) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - () - } - } + let array747 : Array[String] = []; + for index748 = 0; index748 < (mbt_ffi_load32((iter_base) + 112)); index748 = index748 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index748 * 8) - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 56, (0)) + let result746 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - Some(payload53) => { - mbt_ffi_store8((iter_base) + 56, (1)) + array747.push(result746) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - match payload53 { - Multimodal => { - mbt_ffi_store8((iter_base) + 60, (0)) + let lifted750 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 60, (1)) + let result749 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 60, (2)) + Option::Some(result749) + } + _ => panic() + } - () - } - Other(payload57) => { - mbt_ffi_store8((iter_base) + 60, (3)) + let lifted753 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { - let ptr58 = mbt_ffi_str2ptr(payload57) - mbt_ffi_store32((iter_base) + 68, payload57.length()) - mbt_ffi_store32((iter_base) + 64, ptr58) - cleanup_list.push(ptr58) + let lifted752 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { - () - } + @types.Role::Multimodal } + 1 => { - () + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result751 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + + @types.Role::Other(result751) + } + _ => panic() } - } - cleanup_list.push(ptr37) - cleanup_list.push(address44) - cleanup_list.push(address47) + Option::Some(lifted752) + } + _ => panic() } - mbt_ffi_store32((iter_base) + 12, (payload36).length()) - mbt_ffi_store32((iter_base) + 8, address59) - cleanup_list.push(address59) - () + array754.push(@types.SchemaTypeNode::{body : lifted740, metadata : @types.MetadataEnvelope::{doc : lifted742, aliases : array744, examples : array747, deprecated : lifted750, role : lifted753}}) } - EnumType(payload61) => { - mbt_ffi_store8((iter_base) + 0, (16)) + mbt_ffi_free(mbt_ffi_load32((return_area) + 24)) - let address63 = mbt_ffi_malloc((payload61).length() * 8); - for index64 = 0; index64 < (payload61).length(); index64 = index64 + 1 { - let iter_elem : String = (payload61)[(index64)] - let iter_base = address63 + (index64 * 8); + let array759 : Array[@types.SchemaTypeDef] = []; + for index760 = 0; index760 < (mbt_ffi_load32((return_area) + 36)); index760 = index760 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index760 * 24) - let ptr62 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr62) - cleanup_list.push(ptr62) + let result756 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted758 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + let result757 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result757) + } + _ => panic() } - mbt_ffi_store32((iter_base) + 12, (payload61).length()) - mbt_ffi_store32((iter_base) + 8, address63) - cleanup_list.push(address63) - () + array759.push(@types.SchemaTypeDef::{id : result756, name : lifted758, body : mbt_ffi_load32((iter_base) + 20)}) } - FlagsType(payload65) => { - mbt_ffi_store8((iter_base) + 0, (17)) + mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) - let address67 = mbt_ffi_malloc((payload65).length() * 8); - for index68 = 0; index68 < (payload65).length(); index68 = index68 + 1 { - let iter_elem : String = (payload65)[(index68)] - let iter_base = address67 + (index68 * 8); + Option::Some(RegisteredTool::{definition : @common.Tool::{version : result, commands : @common.CommandTree::{nodes : array556}, schema : @types.SchemaGraph::{type_nodes : array754, defs : array759, root : mbt_ffi_load32((return_area) + 40)}}, implemented_by : @types.ComponentId::{uuid : @types.Uuid::{high_bits : (mbt_ffi_load64((return_area) + 48)).reinterpret_as_uint64(), low_bits : (mbt_ffi_load64((return_area) + 56)).reinterpret_as_uint64()}}}) + } + _ => panic() + } + let ret = lifted761 + mbt_ffi_free(ptr) + mbt_ffi_free(return_area) + return ret - let ptr66 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr66) - cleanup_list.push(ptr66) +} +///| +pub fn ToolRpc::tool_rpc(tool_name : String) -> ToolRpc { - } - mbt_ffi_store32((iter_base) + 12, (payload65).length()) - mbt_ffi_store32((iter_base) + 8, address67) - cleanup_list.push(address67) + let ptr = mbt_ffi_str2ptr(tool_name) + let result : Int = wasmImportConstructorToolRpc(ptr, tool_name.length()); + let ret = ToolRpc::ToolRpc(result) + mbt_ffi_free(ptr) + return ret - () - } - TupleType(payload69) => { - mbt_ffi_store8((iter_base) + 0, (18)) +} +///| +pub fn ToolRpc::invoke_and_await(self : ToolRpc, command_path : Array[String], input : @types.TypedSchemaValue, stdin : @streams.InputStream?) -> Result[@common.InvocationResult, RpcError] { + let cleanup_list : Array[Int] = [] - let address70 = mbt_ffi_malloc((payload69).length() * 4); - for index71 = 0; index71 < (payload69).length(); index71 = index71 + 1 { - let iter_elem : Int = (payload69)[(index71)] - let iter_base = address70 + (index71 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let ToolRpc(handle) = self - } - mbt_ffi_store32((iter_base) + 12, (payload69).length()) - mbt_ffi_store32((iter_base) + 8, address70) - cleanup_list.push(address70) + let address = mbt_ffi_malloc((command_path).length() * 8); + for index = 0; index < (command_path).length(); index = index + 1 { + let iter_elem : String = (command_path)[(index)] + let iter_base = address + (index * 8); - () - } - ListType(payload72) => { - mbt_ffi_store8((iter_base) + 0, (19)) - mbt_ffi_store32((iter_base) + 8, payload72) + let ptr = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr) + cleanup_list.push(ptr) - () - } - FixedListType(payload73) => { - mbt_ffi_store8((iter_base) + 0, (20)) - mbt_ffi_store32((iter_base) + 8, (payload73).element) - mbt_ffi_store32((iter_base) + 12, ((payload73).length).reinterpret_as_int()) + } - () - } - MapType(payload74) => { - mbt_ffi_store8((iter_base) + 0, (21)) - mbt_ffi_store32((iter_base) + 8, (payload74).key) - mbt_ffi_store32((iter_base) + 12, (payload74).value) + let address360 = mbt_ffi_malloc((((input).graph).type_nodes).length() * 144); + for index361 = 0; index361 < (((input).graph).type_nodes).length(); index361 = index361 + 1 { + let iter_elem : @types.SchemaTypeNode = (((input).graph).type_nodes)[(index361)] + let iter_base = address360 + (index361 * 144); + + match (iter_elem).body { + RefType(payload) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store32((iter_base) + 8, payload) () } - OptionType(payload75) => { - mbt_ffi_store8((iter_base) + 0, (22)) - mbt_ffi_store32((iter_base) + 8, payload75) + BoolType => { + mbt_ffi_store8((iter_base) + 0, (1)) () } - ResultType(payload76) => { - mbt_ffi_store8((iter_base) + 0, (23)) + S8Type(payload1) => { + mbt_ffi_store8((iter_base) + 0, (2)) - match ((payload76).ok) { + match (payload1) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload78) => { + Some(payload3) => { mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload78) - () - } - } + match ((payload3).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - match ((payload76).err) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + () + } + Some(payload5) => { + mbt_ffi_store8((iter_base) + 16, (1)) - () - } - Some(payload80) => { - mbt_ffi_store8((iter_base) + 16, (1)) - mbt_ffi_store32((iter_base) + 20, payload80) + match payload5 { + Signed(payload6) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload6) - () - } - } + () + } + Unsigned(payload7) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload7).reinterpret_as_int64()) - () - } - TextType(payload81) => { - mbt_ffi_store8((iter_base) + 0, (24)) + () + } + FloatBits(payload8) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload8).reinterpret_as_int64()) - match ((payload81).languages) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) - - () - } - Some(payload83) => { - mbt_ffi_store8((iter_base) + 8, (1)) - - let address85 = mbt_ffi_malloc((payload83).length() * 8); - for index86 = 0; index86 < (payload83).length(); index86 = index86 + 1 { - let iter_elem : String = (payload83)[(index86)] - let iter_base = address85 + (index86 * 8); - - let ptr84 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr84) - cleanup_list.push(ptr84) + () + } + } + () + } } - mbt_ffi_store32((iter_base) + 16, (payload83).length()) - mbt_ffi_store32((iter_base) + 12, address85) - cleanup_list.push(address85) - () - } - } + match ((payload3).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match ((payload81).min_length) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + () + } + Some(payload10) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () - } - Some(payload88) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload88).reinterpret_as_int()) + match payload10 { + Signed(payload11) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload11) - () - } - } + () + } + Unsigned(payload12) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload12).reinterpret_as_int64()) - match ((payload81).max_length) { - None => { - mbt_ffi_store8((iter_base) + 28, (0)) + () + } + FloatBits(payload13) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload13).reinterpret_as_int64()) - () - } - Some(payload90) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload90).reinterpret_as_int()) + () + } + } - () - } - } + () + } + } - match ((payload81).regex) { - None => { - mbt_ffi_store8((iter_base) + 36, (0)) + match ((payload3).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () - } - Some(payload92) => { - mbt_ffi_store8((iter_base) + 36, (1)) + () + } + Some(payload15) => { + mbt_ffi_store8((iter_base) + 64, (1)) - let ptr93 = mbt_ffi_str2ptr(payload92) - mbt_ffi_store32((iter_base) + 44, payload92.length()) - mbt_ffi_store32((iter_base) + 40, ptr93) - cleanup_list.push(ptr93) + let ptr16 = mbt_ffi_str2ptr(payload15) + mbt_ffi_store32((iter_base) + 72, payload15.length()) + mbt_ffi_store32((iter_base) + 68, ptr16) + cleanup_list.push(ptr16) + + () + } + } () } @@ -10318,60 +11379,103 @@ pub fn ToolRpc::invoke_and_await(self : ToolRpc, command_path : Array[String], i () } - BinaryType(payload94) => { - mbt_ffi_store8((iter_base) + 0, (25)) + S16Type(payload17) => { + mbt_ffi_store8((iter_base) + 0, (3)) - match ((payload94).mime_types) { + match (payload17) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload96) => { + Some(payload19) => { mbt_ffi_store8((iter_base) + 8, (1)) - let address98 = mbt_ffi_malloc((payload96).length() * 8); - for index99 = 0; index99 < (payload96).length(); index99 = index99 + 1 { - let iter_elem : String = (payload96)[(index99)] - let iter_base = address98 + (index99 * 8); + match ((payload19).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr97 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr97) - cleanup_list.push(ptr97) + () + } + Some(payload21) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload21 { + Signed(payload22) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload22) + + () + } + Unsigned(payload23) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload23).reinterpret_as_int64()) + + () + } + FloatBits(payload24) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload24).reinterpret_as_int64()) + + () + } + } + () + } } - mbt_ffi_store32((iter_base) + 16, (payload96).length()) - mbt_ffi_store32((iter_base) + 12, address98) - cleanup_list.push(address98) - () - } - } + match ((payload19).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match ((payload94).min_bytes) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + () + } + Some(payload26) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () - } - Some(payload101) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload101).reinterpret_as_int()) + match payload26 { + Signed(payload27) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload27) - () - } - } + () + } + Unsigned(payload28) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload28).reinterpret_as_int64()) - match ((payload94).max_bytes) { - None => { - mbt_ffi_store8((iter_base) + 28, (0)) + () + } + FloatBits(payload29) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload29).reinterpret_as_int64()) - () - } - Some(payload103) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload103).reinterpret_as_int()) + () + } + } + + () + } + } + + match ((payload19).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload31) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr32 = mbt_ffi_str2ptr(payload31) + mbt_ffi_store32((iter_base) + 72, payload31.length()) + mbt_ffi_store32((iter_base) + 68, ptr32) + cleanup_list.push(ptr32) + + () + } + } () } @@ -10379,62 +11483,103 @@ pub fn ToolRpc::invoke_and_await(self : ToolRpc, command_path : Array[String], i () } - PathType(payload104) => { - mbt_ffi_store8((iter_base) + 0, (26)) - mbt_ffi_store8((iter_base) + 8, (payload104).direction.ordinal()) - mbt_ffi_store8((iter_base) + 9, (payload104).kind.ordinal()) + S32Type(payload33) => { + mbt_ffi_store8((iter_base) + 0, (4)) - match ((payload104).allowed_mime_types) { + match (payload33) { None => { - mbt_ffi_store8((iter_base) + 12, (0)) + mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload106) => { - mbt_ffi_store8((iter_base) + 12, (1)) + Some(payload35) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let address108 = mbt_ffi_malloc((payload106).length() * 8); - for index109 = 0; index109 < (payload106).length(); index109 = index109 + 1 { - let iter_elem : String = (payload106)[(index109)] - let iter_base = address108 + (index109 * 8); + match ((payload35).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr107 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr107) - cleanup_list.push(ptr107) + () + } + Some(payload37) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload37 { + Signed(payload38) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload38) + + () + } + Unsigned(payload39) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload39).reinterpret_as_int64()) + () + } + FloatBits(payload40) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload40).reinterpret_as_int64()) + + () + } + } + + () + } } - mbt_ffi_store32((iter_base) + 20, (payload106).length()) - mbt_ffi_store32((iter_base) + 16, address108) - cleanup_list.push(address108) - () - } - } + match ((payload35).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match ((payload104).allowed_extensions) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + () + } + Some(payload42) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () - } - Some(payload111) => { - mbt_ffi_store8((iter_base) + 24, (1)) + match payload42 { + Signed(payload43) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload43) - let address113 = mbt_ffi_malloc((payload111).length() * 8); - for index114 = 0; index114 < (payload111).length(); index114 = index114 + 1 { - let iter_elem : String = (payload111)[(index114)] - let iter_base = address113 + (index114 * 8); + () + } + Unsigned(payload44) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload44).reinterpret_as_int64()) - let ptr112 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr112) - cleanup_list.push(ptr112) + () + } + FloatBits(payload45) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload45).reinterpret_as_int64()) + + () + } + } + () + } + } + + match ((payload35).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload47) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr48 = mbt_ffi_str2ptr(payload47) + mbt_ffi_store32((iter_base) + 72, payload47.length()) + mbt_ffi_store32((iter_base) + 68, ptr48) + cleanup_list.push(ptr48) + + () + } } - mbt_ffi_store32((iter_base) + 32, (payload111).length()) - mbt_ffi_store32((iter_base) + 28, address113) - cleanup_list.push(address113) () } @@ -10442,409 +11587,415 @@ pub fn ToolRpc::invoke_and_await(self : ToolRpc, command_path : Array[String], i () } - UrlType(payload115) => { - mbt_ffi_store8((iter_base) + 0, (27)) + S64Type(payload49) => { + mbt_ffi_store8((iter_base) + 0, (5)) - match ((payload115).allowed_schemes) { + match (payload49) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload117) => { + Some(payload51) => { mbt_ffi_store8((iter_base) + 8, (1)) - let address119 = mbt_ffi_malloc((payload117).length() * 8); - for index120 = 0; index120 < (payload117).length(); index120 = index120 + 1 { - let iter_elem : String = (payload117)[(index120)] - let iter_base = address119 + (index120 * 8); - - let ptr118 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr118) - cleanup_list.push(ptr118) - - } - mbt_ffi_store32((iter_base) + 16, (payload117).length()) - mbt_ffi_store32((iter_base) + 12, address119) - cleanup_list.push(address119) + match ((payload51).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - } + () + } + Some(payload53) => { + mbt_ffi_store8((iter_base) + 16, (1)) - match ((payload115).allowed_hosts) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + match payload53 { + Signed(payload54) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload54) - () - } - Some(payload122) => { - mbt_ffi_store8((iter_base) + 20, (1)) + () + } + Unsigned(payload55) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload55).reinterpret_as_int64()) - let address124 = mbt_ffi_malloc((payload122).length() * 8); - for index125 = 0; index125 < (payload122).length(); index125 = index125 + 1 { - let iter_elem : String = (payload122)[(index125)] - let iter_base = address124 + (index125 * 8); + () + } + FloatBits(payload56) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload56).reinterpret_as_int64()) - let ptr123 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr123) - cleanup_list.push(ptr123) + () + } + } + () + } } - mbt_ffi_store32((iter_base) + 28, (payload122).length()) - mbt_ffi_store32((iter_base) + 24, address124) - cleanup_list.push(address124) - () - } - } + match ((payload51).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - DatetimeType => { - mbt_ffi_store8((iter_base) + 0, (28)) + () + } + Some(payload58) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () - } - DurationType => { - mbt_ffi_store8((iter_base) + 0, (29)) + match payload58 { + Signed(payload59) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload59) - () - } - QuantityType(payload128) => { - mbt_ffi_store8((iter_base) + 0, (30)) + () + } + Unsigned(payload60) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload60).reinterpret_as_int64()) - let ptr129 = mbt_ffi_str2ptr((payload128).base_unit) - mbt_ffi_store32((iter_base) + 12, (payload128).base_unit.length()) - mbt_ffi_store32((iter_base) + 8, ptr129) + () + } + FloatBits(payload61) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload61).reinterpret_as_int64()) - let address131 = mbt_ffi_malloc(((payload128).allowed_suffixes).length() * 8); - for index132 = 0; index132 < ((payload128).allowed_suffixes).length(); index132 = index132 + 1 { - let iter_elem : String = ((payload128).allowed_suffixes)[(index132)] - let iter_base = address131 + (index132 * 8); + () + } + } - let ptr130 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr130) - cleanup_list.push(ptr130) + () + } + } - } - mbt_ffi_store32((iter_base) + 20, ((payload128).allowed_suffixes).length()) - mbt_ffi_store32((iter_base) + 16, address131) + match ((payload51).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - match ((payload128).min) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + () + } + Some(payload63) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () - } - Some(payload134) => { - mbt_ffi_store8((iter_base) + 24, (1)) - mbt_ffi_store64((iter_base) + 32, (payload134).mantissa) - mbt_ffi_store32((iter_base) + 40, (payload134).scale) + let ptr64 = mbt_ffi_str2ptr(payload63) + mbt_ffi_store32((iter_base) + 72, payload63.length()) + mbt_ffi_store32((iter_base) + 68, ptr64) + cleanup_list.push(ptr64) - let ptr135 = mbt_ffi_str2ptr((payload134).unit) - mbt_ffi_store32((iter_base) + 48, (payload134).unit.length()) - mbt_ffi_store32((iter_base) + 44, ptr135) - cleanup_list.push(ptr135) + () + } + } () } } - match ((payload128).max) { + () + } + U8Type(payload65) => { + mbt_ffi_store8((iter_base) + 0, (6)) + + match (payload65) { None => { - mbt_ffi_store8((iter_base) + 56, (0)) + mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload137) => { - mbt_ffi_store8((iter_base) + 56, (1)) - mbt_ffi_store64((iter_base) + 64, (payload137).mantissa) - mbt_ffi_store32((iter_base) + 72, (payload137).scale) - - let ptr138 = mbt_ffi_str2ptr((payload137).unit) - mbt_ffi_store32((iter_base) + 80, (payload137).unit.length()) - mbt_ffi_store32((iter_base) + 76, ptr138) - cleanup_list.push(ptr138) + Some(payload67) => { + mbt_ffi_store8((iter_base) + 8, (1)) - () - } - } - cleanup_list.push(ptr129) - cleanup_list.push(address131) + match ((payload67).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - UnionType(payload139) => { - mbt_ffi_store8((iter_base) + 0, (31)) + () + } + Some(payload69) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let address175 = mbt_ffi_malloc(((payload139).branches).length() * 92); - for index176 = 0; index176 < ((payload139).branches).length(); index176 = index176 + 1 { - let iter_elem : @types.UnionBranch = ((payload139).branches)[(index176)] - let iter_base = address175 + (index176 * 92); + match payload69 { + Signed(payload70) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload70) - let ptr140 = mbt_ffi_str2ptr((iter_elem).tag) - mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) - mbt_ffi_store32((iter_base) + 0, ptr140) - mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + () + } + Unsigned(payload71) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload71).reinterpret_as_int64()) - match (iter_elem).discriminator { - Prefix(payload141) => { - mbt_ffi_store8((iter_base) + 12, (0)) + () + } + FloatBits(payload72) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload72).reinterpret_as_int64()) - let ptr142 = mbt_ffi_str2ptr(payload141) - mbt_ffi_store32((iter_base) + 20, payload141.length()) - mbt_ffi_store32((iter_base) + 16, ptr142) - cleanup_list.push(ptr142) + () + } + } - () + () + } } - Suffix(payload143) => { - mbt_ffi_store8((iter_base) + 12, (1)) - let ptr144 = mbt_ffi_str2ptr(payload143) - mbt_ffi_store32((iter_base) + 20, payload143.length()) - mbt_ffi_store32((iter_base) + 16, ptr144) - cleanup_list.push(ptr144) + match ((payload67).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - Contains(payload145) => { - mbt_ffi_store8((iter_base) + 12, (2)) + () + } + Some(payload74) => { + mbt_ffi_store8((iter_base) + 40, (1)) - let ptr146 = mbt_ffi_str2ptr(payload145) - mbt_ffi_store32((iter_base) + 20, payload145.length()) - mbt_ffi_store32((iter_base) + 16, ptr146) - cleanup_list.push(ptr146) + match payload74 { + Signed(payload75) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload75) - () - } - Regex(payload147) => { - mbt_ffi_store8((iter_base) + 12, (3)) - - let ptr148 = mbt_ffi_str2ptr(payload147) - mbt_ffi_store32((iter_base) + 20, payload147.length()) - mbt_ffi_store32((iter_base) + 16, ptr148) - cleanup_list.push(ptr148) - - () - } - FieldEquals(payload149) => { - mbt_ffi_store8((iter_base) + 12, (4)) - - let ptr150 = mbt_ffi_str2ptr((payload149).field_name) - mbt_ffi_store32((iter_base) + 20, (payload149).field_name.length()) - mbt_ffi_store32((iter_base) + 16, ptr150) + () + } + Unsigned(payload76) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload76).reinterpret_as_int64()) - match ((payload149).literal) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + () + } + FloatBits(payload77) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload77).reinterpret_as_int64()) - () + () + } } - Some(payload152) => { - mbt_ffi_store8((iter_base) + 24, (1)) - - let ptr153 = mbt_ffi_str2ptr(payload152) - mbt_ffi_store32((iter_base) + 32, payload152.length()) - mbt_ffi_store32((iter_base) + 28, ptr153) - cleanup_list.push(ptr153) - () - } + () } - cleanup_list.push(ptr150) - - () } - FieldAbsent(payload154) => { - mbt_ffi_store8((iter_base) + 12, (5)) - let ptr155 = mbt_ffi_str2ptr(payload154) - mbt_ffi_store32((iter_base) + 20, payload154.length()) - mbt_ffi_store32((iter_base) + 16, ptr155) - cleanup_list.push(ptr155) + match ((payload67).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () - } - } + () + } + Some(payload79) => { + mbt_ffi_store8((iter_base) + 64, (1)) - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 36, (0)) + let ptr80 = mbt_ffi_str2ptr(payload79) + mbt_ffi_store32((iter_base) + 72, payload79.length()) + mbt_ffi_store32((iter_base) + 68, ptr80) + cleanup_list.push(ptr80) - () + () + } } - Some(payload157) => { - mbt_ffi_store8((iter_base) + 36, (1)) - - let ptr158 = mbt_ffi_str2ptr(payload157) - mbt_ffi_store32((iter_base) + 44, payload157.length()) - mbt_ffi_store32((iter_base) + 40, ptr158) - cleanup_list.push(ptr158) - () - } + () } + } - let address160 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index161 = 0; index161 < (((iter_elem).metadata).aliases).length(); index161 = index161 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index161)] - let iter_base = address160 + (index161 * 8); + () + } + U16Type(payload81) => { + mbt_ffi_store8((iter_base) + 0, (7)) - let ptr159 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr159) - cleanup_list.push(ptr159) + match (payload81) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + () } - mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 48, address160) + Some(payload83) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let address163 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index164 = 0; index164 < (((iter_elem).metadata).examples).length(); index164 = index164 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index164)] - let iter_base = address163 + (index164 * 8); + match ((payload83).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr162 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr162) - cleanup_list.push(ptr162) + () + } + Some(payload85) => { + mbt_ffi_store8((iter_base) + 16, (1)) - } - mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 56, address163) + match payload85 { + Signed(payload86) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload86) - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 64, (0)) + () + } + Unsigned(payload87) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload87).reinterpret_as_int64()) - () - } - Some(payload166) => { - mbt_ffi_store8((iter_base) + 64, (1)) + () + } + FloatBits(payload88) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload88).reinterpret_as_int64()) - let ptr167 = mbt_ffi_str2ptr(payload166) - mbt_ffi_store32((iter_base) + 72, payload166.length()) - mbt_ffi_store32((iter_base) + 68, ptr167) - cleanup_list.push(ptr167) + () + } + } - () + () + } } - } - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 76, (0)) + match ((payload83).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - Some(payload169) => { - mbt_ffi_store8((iter_base) + 76, (1)) + () + } + Some(payload90) => { + mbt_ffi_store8((iter_base) + 40, (1)) - match payload169 { - Multimodal => { - mbt_ffi_store8((iter_base) + 80, (0)) + match payload90 { + Signed(payload91) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload91) - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 80, (1)) + () + } + Unsigned(payload92) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload92).reinterpret_as_int64()) - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 80, (2)) + () + } + FloatBits(payload93) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload93).reinterpret_as_int64()) - () + () + } } - Other(payload173) => { - mbt_ffi_store8((iter_base) + 80, (3)) - let ptr174 = mbt_ffi_str2ptr(payload173) - mbt_ffi_store32((iter_base) + 88, payload173.length()) - mbt_ffi_store32((iter_base) + 84, ptr174) - cleanup_list.push(ptr174) + () + } + } + + match ((payload83).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () - } + () } + Some(payload95) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () + let ptr96 = mbt_ffi_str2ptr(payload95) + mbt_ffi_store32((iter_base) + 72, payload95.length()) + mbt_ffi_store32((iter_base) + 68, ptr96) + cleanup_list.push(ptr96) + + () + } } - } - cleanup_list.push(ptr140) - cleanup_list.push(address160) - cleanup_list.push(address163) + () + } } - mbt_ffi_store32((iter_base) + 12, ((payload139).branches).length()) - mbt_ffi_store32((iter_base) + 8, address175) - cleanup_list.push(address175) () } - SecretType(payload177) => { - mbt_ffi_store8((iter_base) + 0, (32)) + U32Type(payload97) => { + mbt_ffi_store8((iter_base) + 0, (8)) - match ((payload177).category) { + match (payload97) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload179) => { + Some(payload99) => { mbt_ffi_store8((iter_base) + 8, (1)) - let ptr180 = mbt_ffi_str2ptr(payload179) - mbt_ffi_store32((iter_base) + 16, payload179.length()) - mbt_ffi_store32((iter_base) + 12, ptr180) - cleanup_list.push(ptr180) + match ((payload99).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - } + () + } + Some(payload101) => { + mbt_ffi_store8((iter_base) + 16, (1)) - () - } - QuotaTokenType(payload181) => { - mbt_ffi_store8((iter_base) + 0, (33)) + match payload101 { + Signed(payload102) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload102) - match ((payload181).resource_name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + () + } + Unsigned(payload103) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload103).reinterpret_as_int64()) - () - } - Some(payload183) => { - mbt_ffi_store8((iter_base) + 8, (1)) + () + } + FloatBits(payload104) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload104).reinterpret_as_int64()) - let ptr184 = mbt_ffi_str2ptr(payload183) - mbt_ffi_store32((iter_base) + 16, payload183.length()) - mbt_ffi_store32((iter_base) + 12, ptr184) - cleanup_list.push(ptr184) + () + } + } - () - } - } + () + } + } - () - } - FutureType(payload185) => { - mbt_ffi_store8((iter_base) + 0, (34)) + match ((payload99).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match (payload185) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + () + } + Some(payload106) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () - } - Some(payload187) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload187) + match payload106 { + Signed(payload107) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload107) + + () + } + Unsigned(payload108) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload108).reinterpret_as_int64()) + + () + } + FloatBits(payload109) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload109).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload99).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload111) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr112 = mbt_ffi_str2ptr(payload111) + mbt_ffi_store32((iter_base) + 72, payload111.length()) + mbt_ffi_store32((iter_base) + 68, ptr112) + cleanup_list.push(ptr112) + + () + } + } () } @@ -10852,284 +12003,311 @@ pub fn ToolRpc::invoke_and_await(self : ToolRpc, command_path : Array[String], i () } - StreamType(payload188) => { - mbt_ffi_store8((iter_base) + 0, (35)) + U64Type(payload113) => { + mbt_ffi_store8((iter_base) + 0, (9)) - match (payload188) { + match (payload113) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload190) => { + Some(payload115) => { mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload190) - - () - } - } - () - } - } + match ((payload115).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 88, (0)) + () + } + Some(payload117) => { + mbt_ffi_store8((iter_base) + 16, (1)) - () - } - Some(payload192) => { - mbt_ffi_store8((iter_base) + 88, (1)) + match payload117 { + Signed(payload118) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload118) - let ptr193 = mbt_ffi_str2ptr(payload192) - mbt_ffi_store32((iter_base) + 96, payload192.length()) - mbt_ffi_store32((iter_base) + 92, ptr193) - cleanup_list.push(ptr193) + () + } + Unsigned(payload119) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload119).reinterpret_as_int64()) - () - } - } + () + } + FloatBits(payload120) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload120).reinterpret_as_int64()) - let address195 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index196 = 0; index196 < (((iter_elem).metadata).aliases).length(); index196 = index196 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index196)] - let iter_base = address195 + (index196 * 8); + () + } + } - let ptr194 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr194) - cleanup_list.push(ptr194) + () + } + } - } - mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 100, address195) + match ((payload115).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - let address198 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index199 = 0; index199 < (((iter_elem).metadata).examples).length(); index199 = index199 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index199)] - let iter_base = address198 + (index199 * 8); + () + } + Some(payload122) => { + mbt_ffi_store8((iter_base) + 40, (1)) - let ptr197 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr197) - cleanup_list.push(ptr197) + match payload122 { + Signed(payload123) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload123) - } - mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 108, address198) + () + } + Unsigned(payload124) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload124).reinterpret_as_int64()) - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 116, (0)) + () + } + FloatBits(payload125) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload125).reinterpret_as_int64()) - () - } - Some(payload201) => { - mbt_ffi_store8((iter_base) + 116, (1)) + () + } + } - let ptr202 = mbt_ffi_str2ptr(payload201) - mbt_ffi_store32((iter_base) + 124, payload201.length()) - mbt_ffi_store32((iter_base) + 120, ptr202) - cleanup_list.push(ptr202) + () + } + } - () - } - } + match ((payload115).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 128, (0)) + () + } + Some(payload127) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () - } - Some(payload204) => { - mbt_ffi_store8((iter_base) + 128, (1)) + let ptr128 = mbt_ffi_str2ptr(payload127) + mbt_ffi_store32((iter_base) + 72, payload127.length()) + mbt_ffi_store32((iter_base) + 68, ptr128) + cleanup_list.push(ptr128) - match payload204 { - Multimodal => { - mbt_ffi_store8((iter_base) + 132, (0)) + () + } + } () } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 132, (1)) + } - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 132, (2)) + () + } + F32Type(payload129) => { + mbt_ffi_store8((iter_base) + 0, (10)) + + match (payload129) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) () } - Other(payload208) => { - mbt_ffi_store8((iter_base) + 132, (3)) + Some(payload131) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let ptr209 = mbt_ffi_str2ptr(payload208) - mbt_ffi_store32((iter_base) + 140, payload208.length()) - mbt_ffi_store32((iter_base) + 136, ptr209) - cleanup_list.push(ptr209) + match ((payload131).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - } + () + } + Some(payload133) => { + mbt_ffi_store8((iter_base) + 16, (1)) - () - } - } - cleanup_list.push(address195) - cleanup_list.push(address198) + match payload133 { + Signed(payload134) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload134) - } + () + } + Unsigned(payload135) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload135).reinterpret_as_int64()) - let address216 = mbt_ffi_malloc((((input).graph).defs).length() * 24); - for index217 = 0; index217 < (((input).graph).defs).length(); index217 = index217 + 1 { - let iter_elem : @types.SchemaTypeDef = (((input).graph).defs)[(index217)] - let iter_base = address216 + (index217 * 24); + () + } + FloatBits(payload136) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload136).reinterpret_as_int64()) - let ptr212 = mbt_ffi_str2ptr((iter_elem).id) - mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) - mbt_ffi_store32((iter_base) + 0, ptr212) + () + } + } - match ((iter_elem).name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + () + } + } - () - } - Some(payload214) => { - mbt_ffi_store8((iter_base) + 8, (1)) + match ((payload131).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - let ptr215 = mbt_ffi_str2ptr(payload214) - mbt_ffi_store32((iter_base) + 16, payload214.length()) - mbt_ffi_store32((iter_base) + 12, ptr215) - cleanup_list.push(ptr215) + () + } + Some(payload138) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () - } - } - mbt_ffi_store32((iter_base) + 20, (iter_elem).body) - cleanup_list.push(ptr212) + match payload138 { + Signed(payload139) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload139) - } + () + } + Unsigned(payload140) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload140).reinterpret_as_int64()) - let address288 = mbt_ffi_malloc((((input).value).value_nodes).length() * 32); - for index289 = 0; index289 < (((input).value).value_nodes).length(); index289 = index289 + 1 { - let iter_elem : @types.SchemaValueNode = (((input).value).value_nodes)[(index289)] - let iter_base = address288 + (index289 * 32); + () + } + FloatBits(payload141) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload141).reinterpret_as_int64()) - match iter_elem { - BoolValue(payload218) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload218 { 1 } else { 0 })) + () + } + } - () - } - S8Value(payload219) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload219)) + () + } + } - () - } - S16Value(payload220) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload220)) + match ((payload131).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () - } - S32Value(payload221) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload221) + () + } + Some(payload143) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () - } - S64Value(payload222) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload222) + let ptr144 = mbt_ffi_str2ptr(payload143) + mbt_ffi_store32((iter_base) + 72, payload143.length()) + mbt_ffi_store32((iter_base) + 68, ptr144) + cleanup_list.push(ptr144) - () - } - U8Value(payload223) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload223).to_int()) + () + } + } - () - } - U16Value(payload224) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload224).reinterpret_as_int()) + () + } + } () } - U32Value(payload225) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload225).reinterpret_as_int()) + F64Type(payload145) => { + mbt_ffi_store8((iter_base) + 0, (11)) - () - } - U64Value(payload226) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload226).reinterpret_as_int64()) + match (payload145) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - () - } - F32Value(payload227) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload227) + () + } + Some(payload147) => { + mbt_ffi_store8((iter_base) + 8, (1)) - () - } - F64Value(payload228) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload228) + match ((payload147).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - CharValue(payload229) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload229).to_int()) + () + } + Some(payload149) => { + mbt_ffi_store8((iter_base) + 16, (1)) - () - } - StringValue(payload230) => { - mbt_ffi_store8((iter_base) + 0, (12)) + match payload149 { + Signed(payload150) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload150) - let ptr231 = mbt_ffi_str2ptr(payload230) - mbt_ffi_store32((iter_base) + 12, payload230.length()) - mbt_ffi_store32((iter_base) + 8, ptr231) - cleanup_list.push(ptr231) + () + } + Unsigned(payload151) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload151).reinterpret_as_int64()) - () - } - RecordValue(payload232) => { - mbt_ffi_store8((iter_base) + 0, (13)) + () + } + FloatBits(payload152) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload152).reinterpret_as_int64()) - let address233 = mbt_ffi_malloc((payload232).length() * 4); - for index234 = 0; index234 < (payload232).length(); index234 = index234 + 1 { - let iter_elem : Int = (payload232)[(index234)] - let iter_base = address233 + (index234 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + () + } + } - } - mbt_ffi_store32((iter_base) + 12, (payload232).length()) - mbt_ffi_store32((iter_base) + 8, address233) - cleanup_list.push(address233) + () + } + } - () - } - VariantValue(payload235) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload235).case).reinterpret_as_int()) + match ((payload147).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match ((payload235).payload) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + () + } + Some(payload154) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () - } - Some(payload237) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload237) + match payload154 { + Signed(payload155) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload155) + + () + } + Unsigned(payload156) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload156).reinterpret_as_int64()) + + () + } + FloatBits(payload157) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload157).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload147).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload159) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr160 = mbt_ffi_str2ptr(payload159) + mbt_ffi_store32((iter_base) + 72, payload159.length()) + mbt_ffi_store32((iter_base) + 68, ptr160) + cleanup_list.push(ptr160) + + () + } + } () } @@ -11137,4628 +12315,4423 @@ pub fn ToolRpc::invoke_and_await(self : ToolRpc, command_path : Array[String], i () } - EnumValue(payload238) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload238).reinterpret_as_int()) + CharType => { + mbt_ffi_store8((iter_base) + 0, (12)) () } - FlagsValue(payload239) => { - mbt_ffi_store8((iter_base) + 0, (16)) - - let address240 = mbt_ffi_malloc((payload239).length() * 1); - for index241 = 0; index241 < (payload239).length(); index241 = index241 + 1 { - let iter_elem : Bool = (payload239)[(index241)] - let iter_base = address240 + (index241 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) - - } - mbt_ffi_store32((iter_base) + 12, (payload239).length()) - mbt_ffi_store32((iter_base) + 8, address240) - cleanup_list.push(address240) + StringType => { + mbt_ffi_store8((iter_base) + 0, (13)) () } - TupleValue(payload242) => { - mbt_ffi_store8((iter_base) + 0, (17)) + RecordType(payload163) => { + mbt_ffi_store8((iter_base) + 0, (14)) - let address243 = mbt_ffi_malloc((payload242).length() * 4); - for index244 = 0; index244 < (payload242).length(); index244 = index244 + 1 { - let iter_elem : Int = (payload242)[(index244)] - let iter_base = address243 + (index244 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let address184 = mbt_ffi_malloc((payload163).length() * 68); + for index185 = 0; index185 < (payload163).length(); index185 = index185 + 1 { + let iter_elem : @types.NamedFieldType = (payload163)[(index185)] + let iter_base = address184 + (index185 * 68); - } - mbt_ffi_store32((iter_base) + 12, (payload242).length()) - mbt_ffi_store32((iter_base) + 8, address243) - cleanup_list.push(address243) + let ptr164 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr164) + mbt_ffi_store32((iter_base) + 8, (iter_elem).body) - () - } - ListValue(payload245) => { - mbt_ffi_store8((iter_base) + 0, (18)) + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - let address246 = mbt_ffi_malloc((payload245).length() * 4); - for index247 = 0; index247 < (payload245).length(); index247 = index247 + 1 { - let iter_elem : Int = (payload245)[(index247)] - let iter_base = address246 + (index247 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + () + } + Some(payload166) => { + mbt_ffi_store8((iter_base) + 12, (1)) - } - mbt_ffi_store32((iter_base) + 12, (payload245).length()) - mbt_ffi_store32((iter_base) + 8, address246) - cleanup_list.push(address246) + let ptr167 = mbt_ffi_str2ptr(payload166) + mbt_ffi_store32((iter_base) + 20, payload166.length()) + mbt_ffi_store32((iter_base) + 16, ptr167) + cleanup_list.push(ptr167) - () - } - FixedListValue(payload248) => { - mbt_ffi_store8((iter_base) + 0, (19)) + () + } + } - let address249 = mbt_ffi_malloc((payload248).length() * 4); - for index250 = 0; index250 < (payload248).length(); index250 = index250 + 1 { - let iter_elem : Int = (payload248)[(index250)] - let iter_base = address249 + (index250 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let address169 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index170 = 0; index170 < (((iter_elem).metadata).aliases).length(); index170 = index170 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index170)] + let iter_base = address169 + (index170 * 8); - } - mbt_ffi_store32((iter_base) + 12, (payload248).length()) - mbt_ffi_store32((iter_base) + 8, address249) - cleanup_list.push(address249) + let ptr168 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr168) + cleanup_list.push(ptr168) - () - } - MapValue(payload251) => { - mbt_ffi_store8((iter_base) + 0, (20)) + } + mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 24, address169) - let address252 = mbt_ffi_malloc((payload251).length() * 8); - for index253 = 0; index253 < (payload251).length(); index253 = index253 + 1 { - let iter_elem : @types.MapEntry = (payload251)[(index253)] - let iter_base = address252 + (index253 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + let address172 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index173 = 0; index173 < (((iter_elem).metadata).examples).length(); index173 = index173 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index173)] + let iter_base = address172 + (index173 * 8); - } - mbt_ffi_store32((iter_base) + 12, (payload251).length()) - mbt_ffi_store32((iter_base) + 8, address252) - cleanup_list.push(address252) + let ptr171 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr171) + cleanup_list.push(ptr171) - () - } - OptionValue(payload254) => { - mbt_ffi_store8((iter_base) + 0, (21)) + } + mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 32, address172) - match (payload254) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - Some(payload256) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload256) + () + } + Some(payload175) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () + let ptr176 = mbt_ffi_str2ptr(payload175) + mbt_ffi_store32((iter_base) + 48, payload175.length()) + mbt_ffi_store32((iter_base) + 44, ptr176) + cleanup_list.push(ptr176) + + () + } } - } - () - } - ResultValue(payload257) => { - mbt_ffi_store8((iter_base) + 0, (22)) + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 52, (0)) - match payload257 { - OkValue(payload258) => { - mbt_ffi_store8((iter_base) + 8, (0)) + () + } + Some(payload178) => { + mbt_ffi_store8((iter_base) + 52, (1)) - match (payload258) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + match payload178 { + Multimodal => { + mbt_ffi_store8((iter_base) + 56, (0)) - () - } - Some(payload260) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload260) + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 56, (1)) - () - } - } + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 56, (2)) - () - } - ErrValue(payload261) => { - mbt_ffi_store8((iter_base) + 8, (1)) + () + } + Other(payload182) => { + mbt_ffi_store8((iter_base) + 56, (3)) - match (payload261) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let ptr183 = mbt_ffi_str2ptr(payload182) + mbt_ffi_store32((iter_base) + 64, payload182.length()) + mbt_ffi_store32((iter_base) + 60, ptr183) + cleanup_list.push(ptr183) - () + () + } } - Some(payload263) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload263) - () - } + () } - - () } + cleanup_list.push(ptr164) + cleanup_list.push(address169) + cleanup_list.push(address172) + } + mbt_ffi_store32((iter_base) + 12, (payload163).length()) + mbt_ffi_store32((iter_base) + 8, address184) + cleanup_list.push(address184) () } - TextValue(payload264) => { - mbt_ffi_store8((iter_base) + 0, (23)) + VariantType(payload186) => { + mbt_ffi_store8((iter_base) + 0, (15)) - let ptr265 = mbt_ffi_str2ptr((payload264).text) - mbt_ffi_store32((iter_base) + 12, (payload264).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr265) + let address209 = mbt_ffi_malloc((payload186).length() * 72); + for index210 = 0; index210 < (payload186).length(); index210 = index210 + 1 { + let iter_elem : @types.VariantCaseType = (payload186)[(index210)] + let iter_base = address209 + (index210 * 72); - match ((payload264).language) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + let ptr187 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr187) - () - } - Some(payload267) => { - mbt_ffi_store8((iter_base) + 16, (1)) + match ((iter_elem).payload) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let ptr268 = mbt_ffi_str2ptr(payload267) - mbt_ffi_store32((iter_base) + 24, payload267.length()) - mbt_ffi_store32((iter_base) + 20, ptr268) - cleanup_list.push(ptr268) + () + } + Some(payload189) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload189) - () + () + } } - } - cleanup_list.push(ptr265) - () - } - BinaryValue(payload269) => { - mbt_ffi_store8((iter_base) + 0, (24)) + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr270 = mbt_ffi_bytes2ptr((payload269).bytes) + () + } + Some(payload191) => { + mbt_ffi_store8((iter_base) + 16, (1)) - mbt_ffi_store32((iter_base) + 12, (payload269).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr270) + let ptr192 = mbt_ffi_str2ptr(payload191) + mbt_ffi_store32((iter_base) + 24, payload191.length()) + mbt_ffi_store32((iter_base) + 20, ptr192) + cleanup_list.push(ptr192) - match ((payload269).mime_type) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + () + } + } + + let address194 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index195 = 0; index195 < (((iter_elem).metadata).aliases).length(); index195 = index195 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index195)] + let iter_base = address194 + (index195 * 8); + + let ptr193 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr193) + cleanup_list.push(ptr193) - () } - Some(payload272) => { - mbt_ffi_store8((iter_base) + 16, (1)) + mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 28, address194) - let ptr273 = mbt_ffi_str2ptr(payload272) - mbt_ffi_store32((iter_base) + 24, payload272.length()) - mbt_ffi_store32((iter_base) + 20, ptr273) - cleanup_list.push(ptr273) + let address197 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index198 = 0; index198 < (((iter_elem).metadata).examples).length(); index198 = index198 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index198)] + let iter_base = address197 + (index198 * 8); - () + let ptr196 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr196) + cleanup_list.push(ptr196) + + } + mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 36, address197) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 44, (0)) + + () + } + Some(payload200) => { + mbt_ffi_store8((iter_base) + 44, (1)) + + let ptr201 = mbt_ffi_str2ptr(payload200) + mbt_ffi_store32((iter_base) + 52, payload200.length()) + mbt_ffi_store32((iter_base) + 48, ptr201) + cleanup_list.push(ptr201) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 56, (0)) + + () + } + Some(payload203) => { + mbt_ffi_store8((iter_base) + 56, (1)) + + match payload203 { + Multimodal => { + mbt_ffi_store8((iter_base) + 60, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 60, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 60, (2)) + + () + } + Other(payload207) => { + mbt_ffi_store8((iter_base) + 60, (3)) + + let ptr208 = mbt_ffi_str2ptr(payload207) + mbt_ffi_store32((iter_base) + 68, payload207.length()) + mbt_ffi_store32((iter_base) + 64, ptr208) + cleanup_list.push(ptr208) + + () + } + } + + () + } } + cleanup_list.push(ptr187) + cleanup_list.push(address194) + cleanup_list.push(address197) + } - cleanup_list.push(ptr270) + mbt_ffi_store32((iter_base) + 12, (payload186).length()) + mbt_ffi_store32((iter_base) + 8, address209) + cleanup_list.push(address209) () } - PathValue(payload274) => { - mbt_ffi_store8((iter_base) + 0, (25)) + EnumType(payload211) => { + mbt_ffi_store8((iter_base) + 0, (16)) - let ptr275 = mbt_ffi_str2ptr(payload274) - mbt_ffi_store32((iter_base) + 12, payload274.length()) - mbt_ffi_store32((iter_base) + 8, ptr275) - cleanup_list.push(ptr275) + let address213 = mbt_ffi_malloc((payload211).length() * 8); + for index214 = 0; index214 < (payload211).length(); index214 = index214 + 1 { + let iter_elem : String = (payload211)[(index214)] + let iter_base = address213 + (index214 * 8); - () - } - UrlValue(payload276) => { - mbt_ffi_store8((iter_base) + 0, (26)) + let ptr212 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr212) + cleanup_list.push(ptr212) - let ptr277 = mbt_ffi_str2ptr(payload276) - mbt_ffi_store32((iter_base) + 12, payload276.length()) - mbt_ffi_store32((iter_base) + 8, ptr277) - cleanup_list.push(ptr277) + } + mbt_ffi_store32((iter_base) + 12, (payload211).length()) + mbt_ffi_store32((iter_base) + 8, address213) + cleanup_list.push(address213) () } - DatetimeValue(payload278) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload278).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload278).nanoseconds).reinterpret_as_int()) + FlagsType(payload215) => { + mbt_ffi_store8((iter_base) + 0, (17)) - () - } - DurationValue(payload279) => { - mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload279).nanoseconds) + let address217 = mbt_ffi_malloc((payload215).length() * 8); + for index218 = 0; index218 < (payload215).length(); index218 = index218 + 1 { + let iter_elem : String = (payload215)[(index218)] + let iter_base = address217 + (index218 * 8); - () - } - QuantityValueNode(payload280) => { - mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload280).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload280).scale) + let ptr216 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr216) + cleanup_list.push(ptr216) - let ptr281 = mbt_ffi_str2ptr((payload280).unit) - mbt_ffi_store32((iter_base) + 24, (payload280).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr281) - cleanup_list.push(ptr281) + } + mbt_ffi_store32((iter_base) + 12, (payload215).length()) + mbt_ffi_store32((iter_base) + 8, address217) + cleanup_list.push(address217) () } - UnionValue(payload282) => { - mbt_ffi_store8((iter_base) + 0, (30)) + TupleType(payload219) => { + mbt_ffi_store8((iter_base) + 0, (18)) + + let address220 = mbt_ffi_malloc((payload219).length() * 4); + for index221 = 0; index221 < (payload219).length(); index221 = index221 + 1 { + let iter_elem : Int = (payload219)[(index221)] + let iter_base = address220 + (index221 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - let ptr283 = mbt_ffi_str2ptr((payload282).tag) - mbt_ffi_store32((iter_base) + 12, (payload282).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr283) - mbt_ffi_store32((iter_base) + 16, (payload282).body) - cleanup_list.push(ptr283) + } + mbt_ffi_store32((iter_base) + 12, (payload219).length()) + mbt_ffi_store32((iter_base) + 8, address220) + cleanup_list.push(address220) () } - SecretValue(payload284) => { - mbt_ffi_store8((iter_base) + 0, (31)) + ListType(payload222) => { + mbt_ffi_store8((iter_base) + 0, (19)) + mbt_ffi_store32((iter_base) + 8, payload222) - let ptr285 = mbt_ffi_str2ptr((payload284).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload284).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr285) - cleanup_list.push(ptr285) + () + } + FixedListType(payload223) => { + mbt_ffi_store8((iter_base) + 0, (20)) + mbt_ffi_store32((iter_base) + 8, (payload223).element) + mbt_ffi_store32((iter_base) + 12, ((payload223).length).reinterpret_as_int()) () } - QuotaTokenHandle(payload286) => { - mbt_ffi_store8((iter_base) + 0, (32)) + MapType(payload224) => { + mbt_ffi_store8((iter_base) + 0, (21)) + mbt_ffi_store32((iter_base) + 8, (payload224).key) + mbt_ffi_store32((iter_base) + 12, (payload224).value) - let @types.QuotaToken(handle287) = payload286 - mbt_ffi_store32((iter_base) + 8, handle287) + () + } + OptionType(payload225) => { + mbt_ffi_store8((iter_base) + 0, (22)) + mbt_ffi_store32((iter_base) + 8, payload225) () } - } + ResultType(payload226) => { + mbt_ffi_store8((iter_base) + 0, (23)) - } + match ((payload226).ok) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let (lowered, lowered293) = match (stdin) { - None => { + () + } + Some(payload228) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload228) - ((0), 0) - } - Some(payload291) => { + () + } + } - let @streams.InputStream(handle292) = payload291 + match ((payload226).err) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - ((1), handle292) - } - } - let return_area = mbt_ffi_malloc(48) - wasmImportMethodToolRpcInvokeAndAwait(handle, address, (command_path).length(), address210, (((input).graph).type_nodes).length(), address216, (((input).graph).defs).length(), ((input).graph).root, address288, (((input).value).value_nodes).length(), ((input).value).root, lowered, lowered293, return_area); + () + } + Some(payload230) => { + mbt_ffi_store8((iter_base) + 16, (1)) + mbt_ffi_store32((iter_base) + 20, payload230) - let lifted636 = match (mbt_ffi_load8_u((return_area) + 0)) { - 0 => { + () + } + } - let lifted456 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((return_area) + 4) { - 0 => Option::None - 1 => { + () + } + TextType(payload231) => { + mbt_ffi_store8((iter_base) + 0, (24)) - let array417 : Array[@types.SchemaTypeNode] = []; - for index418 = 0; index418 < (mbt_ffi_load32((return_area) + 12)); index418 = index418 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 8)) + (index418 * 144) + match ((payload231).languages) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let lifted403 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + () + } + Some(payload233) => { + mbt_ffi_store8((iter_base) + 8, (1)) - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { + let address235 = mbt_ffi_malloc((payload233).length() * 8); + for index236 = 0; index236 < (payload233).length(); index236 = index236 + 1 { + let iter_elem : String = (payload233)[(index236)] + let iter_base = address235 + (index236 * 8); - @types.SchemaTypeBody::BoolType - } - 2 => { + let ptr234 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr234) + cleanup_list.push(ptr234) - @types.SchemaTypeBody::S8Type - } - 3 => { + } + mbt_ffi_store32((iter_base) + 16, (payload233).length()) + mbt_ffi_store32((iter_base) + 12, address235) + cleanup_list.push(address235) - @types.SchemaTypeBody::S16Type - } - 4 => { + () + } + } - @types.SchemaTypeBody::S32Type - } - 5 => { + match ((payload231).min_length) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) - @types.SchemaTypeBody::S64Type - } - 6 => { + () + } + Some(payload238) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload238).reinterpret_as_int()) - @types.SchemaTypeBody::U8Type - } - 7 => { + () + } + } - @types.SchemaTypeBody::U16Type - } - 8 => { + match ((payload231).max_length) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) - @types.SchemaTypeBody::U32Type - } - 9 => { + () + } + Some(payload240) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload240).reinterpret_as_int()) - @types.SchemaTypeBody::U64Type - } - 10 => { + () + } + } - @types.SchemaTypeBody::F32Type - } - 11 => { + match ((payload231).regex) { + None => { + mbt_ffi_store8((iter_base) + 36, (0)) - @types.SchemaTypeBody::F64Type - } - 12 => { + () + } + Some(payload242) => { + mbt_ffi_store8((iter_base) + 36, (1)) - @types.SchemaTypeBody::CharType - } - 13 => { + let ptr243 = mbt_ffi_str2ptr(payload242) + mbt_ffi_store32((iter_base) + 44, payload242.length()) + mbt_ffi_store32((iter_base) + 40, ptr243) + cleanup_list.push(ptr243) - @types.SchemaTypeBody::StringType - } - 14 => { + () + } + } - let array305 : Array[@types.NamedFieldType] = []; - for index306 = 0; index306 < (mbt_ffi_load32((iter_base) + 12)); index306 = index306 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index306 * 68) + () + } + BinaryType(payload244) => { + mbt_ffi_store8((iter_base) + 0, (25)) - let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + match ((payload244).mime_types) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let lifted : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + () + } + Some(payload246) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let result294 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let address248 = mbt_ffi_malloc((payload246).length() * 8); + for index249 = 0; index249 < (payload246).length(); index249 = index249 + 1 { + let iter_elem : String = (payload246)[(index249)] + let iter_base = address248 + (index249 * 8); - Option::Some(result294) - } - _ => panic() - } + let ptr247 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr247) + cleanup_list.push(ptr247) - let array : Array[String] = []; - for index296 = 0; index296 < (mbt_ffi_load32((iter_base) + 28)); index296 = index296 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index296 * 8) + } + mbt_ffi_store32((iter_base) + 16, (payload246).length()) + mbt_ffi_store32((iter_base) + 12, address248) + cleanup_list.push(address248) - let result295 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + } - array.push(result295) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + match ((payload244).min_bytes) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) - let array298 : Array[String] = []; - for index299 = 0; index299 < (mbt_ffi_load32((iter_base) + 36)); index299 = index299 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index299 * 8) + () + } + Some(payload251) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload251).reinterpret_as_int()) - let result297 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + } - array298.push(result297) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + match ((payload244).max_bytes) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) - let lifted301 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + () + } + Some(payload253) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload253).reinterpret_as_int()) - let result300 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + () + } + } - Option::Some(result300) - } - _ => panic() - } + () + } + PathType(payload254) => { + mbt_ffi_store8((iter_base) + 0, (26)) + mbt_ffi_store8((iter_base) + 8, (payload254).direction.ordinal()) + mbt_ffi_store8((iter_base) + 9, (payload254).kind.ordinal()) - let lifted304 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + match ((payload254).allowed_mime_types) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - let lifted303 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + () + } + Some(payload256) => { + mbt_ffi_store8((iter_base) + 12, (1)) - @types.Role::Multimodal - } - 1 => { + let address258 = mbt_ffi_malloc((payload256).length() * 8); + for index259 = 0; index259 < (payload256).length(); index259 = index259 + 1 { + let iter_elem : String = (payload256)[(index259)] + let iter_base = address258 + (index259 * 8); - @types.Role::UnstructuredText - } - 2 => { + let ptr257 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr257) + cleanup_list.push(ptr257) - @types.Role::UnstructuredBinary - } - 3 => { + } + mbt_ffi_store32((iter_base) + 20, (payload256).length()) + mbt_ffi_store32((iter_base) + 16, address258) + cleanup_list.push(address258) - let result302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + () + } + } - @types.Role::Other(result302) - } - _ => panic() - } + match ((payload254).allowed_extensions) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) - Option::Some(lifted303) - } - _ => panic() - } + () + } + Some(payload261) => { + mbt_ffi_store8((iter_base) + 24, (1)) - array305.push(@types.NamedFieldType::{name : result, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted, aliases : array, examples : array298, deprecated : lifted301, role : lifted304}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let address263 = mbt_ffi_malloc((payload261).length() * 8); + for index264 = 0; index264 < (payload261).length(); index264 = index264 + 1 { + let iter_elem : String = (payload261)[(index264)] + let iter_base = address263 + (index264 * 8); - @types.SchemaTypeBody::RecordType(array305) - } - 15 => { + let ptr262 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr262) + cleanup_list.push(ptr262) - let array322 : Array[@types.VariantCaseType] = []; - for index323 = 0; index323 < (mbt_ffi_load32((iter_base) + 12)); index323 = index323 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index323 * 72) + } + mbt_ffi_store32((iter_base) + 32, (payload261).length()) + mbt_ffi_store32((iter_base) + 28, address263) + cleanup_list.push(address263) - let result307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + } - let lifted308 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + UrlType(payload265) => { + mbt_ffi_store8((iter_base) + 0, (27)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + match ((payload265).allowed_schemes) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let lifted310 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + () + } + Some(payload267) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let result309 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let address269 = mbt_ffi_malloc((payload267).length() * 8); + for index270 = 0; index270 < (payload267).length(); index270 = index270 + 1 { + let iter_elem : String = (payload267)[(index270)] + let iter_base = address269 + (index270 * 8); - Option::Some(result309) - } - _ => panic() - } + let ptr268 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr268) + cleanup_list.push(ptr268) - let array312 : Array[String] = []; - for index313 = 0; index313 < (mbt_ffi_load32((iter_base) + 32)); index313 = index313 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index313 * 8) + } + mbt_ffi_store32((iter_base) + 16, (payload267).length()) + mbt_ffi_store32((iter_base) + 12, address269) + cleanup_list.push(address269) - let result311 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + } - array312.push(result311) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + match ((payload265).allowed_hosts) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) - let array315 : Array[String] = []; - for index316 = 0; index316 < (mbt_ffi_load32((iter_base) + 40)); index316 = index316 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index316 * 8) + () + } + Some(payload272) => { + mbt_ffi_store8((iter_base) + 20, (1)) - let result314 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let address274 = mbt_ffi_malloc((payload272).length() * 8); + for index275 = 0; index275 < (payload272).length(); index275 = index275 + 1 { + let iter_elem : String = (payload272)[(index275)] + let iter_base = address274 + (index275 * 8); - array315.push(result314) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + let ptr273 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr273) + cleanup_list.push(ptr273) - let lifted318 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + } + mbt_ffi_store32((iter_base) + 28, (payload272).length()) + mbt_ffi_store32((iter_base) + 24, address274) + cleanup_list.push(address274) - let result317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + () + } + } - Option::Some(result317) - } - _ => panic() - } + () + } + DatetimeType => { + mbt_ffi_store8((iter_base) + 0, (28)) - let lifted321 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + () + } + DurationType => { + mbt_ffi_store8((iter_base) + 0, (29)) - let lifted320 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + () + } + QuantityType(payload278) => { + mbt_ffi_store8((iter_base) + 0, (30)) - @types.Role::Multimodal - } - 1 => { + let ptr279 = mbt_ffi_str2ptr((payload278).base_unit) + mbt_ffi_store32((iter_base) + 12, (payload278).base_unit.length()) + mbt_ffi_store32((iter_base) + 8, ptr279) - @types.Role::UnstructuredText - } - 2 => { + let address281 = mbt_ffi_malloc(((payload278).allowed_suffixes).length() * 8); + for index282 = 0; index282 < ((payload278).allowed_suffixes).length(); index282 = index282 + 1 { + let iter_elem : String = ((payload278).allowed_suffixes)[(index282)] + let iter_base = address281 + (index282 * 8); - @types.Role::UnstructuredBinary - } - 3 => { + let ptr280 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr280) + cleanup_list.push(ptr280) - let result319 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + } + mbt_ffi_store32((iter_base) + 20, ((payload278).allowed_suffixes).length()) + mbt_ffi_store32((iter_base) + 16, address281) - @types.Role::Other(result319) - } - _ => panic() - } + match ((payload278).min) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) - Option::Some(lifted320) - } - _ => panic() - } + () + } + Some(payload284) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload284).mantissa) + mbt_ffi_store32((iter_base) + 40, (payload284).scale) - array322.push(@types.VariantCaseType::{name : result307, payload : lifted308, metadata : @types.MetadataEnvelope::{doc : lifted310, aliases : array312, examples : array315, deprecated : lifted318, role : lifted321}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let ptr285 = mbt_ffi_str2ptr((payload284).unit) + mbt_ffi_store32((iter_base) + 48, (payload284).unit.length()) + mbt_ffi_store32((iter_base) + 44, ptr285) + cleanup_list.push(ptr285) - @types.SchemaTypeBody::VariantType(array322) - } - 16 => { + () + } + } - let array325 : Array[String] = []; - for index326 = 0; index326 < (mbt_ffi_load32((iter_base) + 12)); index326 = index326 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index326 * 8) + match ((payload278).max) { + None => { + mbt_ffi_store8((iter_base) + 56, (0)) - let result324 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + Some(payload287) => { + mbt_ffi_store8((iter_base) + 56, (1)) + mbt_ffi_store64((iter_base) + 64, (payload287).mantissa) + mbt_ffi_store32((iter_base) + 72, (payload287).scale) - array325.push(result324) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let ptr288 = mbt_ffi_str2ptr((payload287).unit) + mbt_ffi_store32((iter_base) + 80, (payload287).unit.length()) + mbt_ffi_store32((iter_base) + 76, ptr288) + cleanup_list.push(ptr288) - @types.SchemaTypeBody::EnumType(array325) - } - 17 => { + () + } + } + cleanup_list.push(ptr279) + cleanup_list.push(address281) - let array328 : Array[String] = []; - for index329 = 0; index329 < (mbt_ffi_load32((iter_base) + 12)); index329 = index329 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index329 * 8) + () + } + UnionType(payload289) => { + mbt_ffi_store8((iter_base) + 0, (31)) - let result327 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let address325 = mbt_ffi_malloc(((payload289).branches).length() * 92); + for index326 = 0; index326 < ((payload289).branches).length(); index326 = index326 + 1 { + let iter_elem : @types.UnionBranch = ((payload289).branches)[(index326)] + let iter_base = address325 + (index326 * 92); - array328.push(result327) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let ptr290 = mbt_ffi_str2ptr((iter_elem).tag) + mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) + mbt_ffi_store32((iter_base) + 0, ptr290) + mbt_ffi_store32((iter_base) + 8, (iter_elem).body) - @types.SchemaTypeBody::FlagsType(array328) - } - 18 => { + match (iter_elem).discriminator { + Prefix(payload291) => { + mbt_ffi_store8((iter_base) + 12, (0)) - let array330 : Array[Int] = []; - for index331 = 0; index331 < (mbt_ffi_load32((iter_base) + 12)); index331 = index331 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index331 * 4) + let ptr292 = mbt_ffi_str2ptr(payload291) + mbt_ffi_store32((iter_base) + 20, payload291.length()) + mbt_ffi_store32((iter_base) + 16, ptr292) + cleanup_list.push(ptr292) - array330.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + Suffix(payload293) => { + mbt_ffi_store8((iter_base) + 12, (1)) - @types.SchemaTypeBody::TupleType(array330) - } - 19 => { + let ptr294 = mbt_ffi_str2ptr(payload293) + mbt_ffi_store32((iter_base) + 20, payload293.length()) + mbt_ffi_store32((iter_base) + 16, ptr294) + cleanup_list.push(ptr294) - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + () + } + Contains(payload295) => { + mbt_ffi_store8((iter_base) + 12, (2)) - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + let ptr296 = mbt_ffi_str2ptr(payload295) + mbt_ffi_store32((iter_base) + 20, payload295.length()) + mbt_ffi_store32((iter_base) + 16, ptr296) + cleanup_list.push(ptr296) - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + () + } + Regex(payload297) => { + mbt_ffi_store8((iter_base) + 12, (3)) - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) - } - 23 => { + let ptr298 = mbt_ffi_str2ptr(payload297) + mbt_ffi_store32((iter_base) + 20, payload297.length()) + mbt_ffi_store32((iter_base) + 16, ptr298) + cleanup_list.push(ptr298) - let lifted332 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + FieldEquals(payload299) => { + mbt_ffi_store8((iter_base) + 12, (4)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let ptr300 = mbt_ffi_str2ptr((payload299).field_name) + mbt_ffi_store32((iter_base) + 20, (payload299).field_name.length()) + mbt_ffi_store32((iter_base) + 16, ptr300) - let lifted333 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + match ((payload299).literal) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) - Option::Some(mbt_ffi_load32((iter_base) + 20)) - } - _ => panic() + () } + Some(payload302) => { + mbt_ffi_store8((iter_base) + 24, (1)) - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted332, err : lifted333}) - } - 24 => { - - let lifted337 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let ptr303 = mbt_ffi_str2ptr(payload302) + mbt_ffi_store32((iter_base) + 32, payload302.length()) + mbt_ffi_store32((iter_base) + 28, ptr303) + cleanup_list.push(ptr303) - let array335 : Array[String] = []; - for index336 = 0; index336 < (mbt_ffi_load32((iter_base) + 16)); index336 = index336 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index336 * 8) + () + } + } + cleanup_list.push(ptr300) - let result334 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + FieldAbsent(payload304) => { + mbt_ffi_store8((iter_base) + 12, (5)) - array335.push(result334) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + let ptr305 = mbt_ffi_str2ptr(payload304) + mbt_ffi_store32((iter_base) + 20, payload304.length()) + mbt_ffi_store32((iter_base) + 16, ptr305) + cleanup_list.push(ptr305) - Option::Some(array335) - } - _ => panic() - } + () + } + } - let lifted338 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 36, (0)) - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + () + } + Some(payload307) => { + mbt_ffi_store8((iter_base) + 36, (1)) - let lifted339 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + let ptr308 = mbt_ffi_str2ptr(payload307) + mbt_ffi_store32((iter_base) + 44, payload307.length()) + mbt_ffi_store32((iter_base) + 40, ptr308) + cleanup_list.push(ptr308) - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + () + } + } - let lifted341 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + let address310 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index311 = 0; index311 < (((iter_elem).metadata).aliases).length(); index311 = index311 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index311)] + let iter_base = address310 + (index311 * 8); - let result340 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let ptr309 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr309) + cleanup_list.push(ptr309) - Option::Some(result340) - } - _ => panic() - } + } + mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 48, address310) - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted337, min_length : lifted338, max_length : lifted339, regex : lifted341}) - } - 25 => { + let address313 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index314 = 0; index314 < (((iter_elem).metadata).examples).length(); index314 = index314 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index314)] + let iter_base = address313 + (index314 * 8); - let lifted345 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let ptr312 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr312) + cleanup_list.push(ptr312) - let array343 : Array[String] = []; - for index344 = 0; index344 < (mbt_ffi_load32((iter_base) + 16)); index344 = index344 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index344 * 8) + } + mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 56, address313) - let result342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array343.push(result342) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - - Option::Some(array343) - } - _ => panic() - } - - let lifted346 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { - - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } - - let lifted347 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() - } + () + } + Some(payload316) => { + mbt_ffi_store8((iter_base) + 64, (1)) - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted345, min_bytes : lifted346, max_bytes : lifted347}) - } - 26 => { + let ptr317 = mbt_ffi_str2ptr(payload316) + mbt_ffi_store32((iter_base) + 72, payload316.length()) + mbt_ffi_store32((iter_base) + 68, ptr317) + cleanup_list.push(ptr317) - let lifted351 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + () + } + } - let array349 : Array[String] = []; - for index350 = 0; index350 < (mbt_ffi_load32((iter_base) + 20)); index350 = index350 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index350 * 8) + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 76, (0)) - let result348 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + Some(payload319) => { + mbt_ffi_store8((iter_base) + 76, (1)) - array349.push(result348) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + match payload319 { + Multimodal => { + mbt_ffi_store8((iter_base) + 80, (0)) - Option::Some(array349) - } - _ => panic() + () } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 80, (1)) - let lifted355 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { - - let array353 : Array[String] = []; - for index354 = 0; index354 < (mbt_ffi_load32((iter_base) + 32)); index354 = index354 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index354 * 8) + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 80, (2)) - let result352 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + Other(payload323) => { + mbt_ffi_store8((iter_base) + 80, (3)) - array353.push(result352) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let ptr324 = mbt_ffi_str2ptr(payload323) + mbt_ffi_store32((iter_base) + 88, payload323.length()) + mbt_ffi_store32((iter_base) + 84, ptr324) + cleanup_list.push(ptr324) - Option::Some(array353) - } - _ => panic() + () } - - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted351, allowed_extensions : lifted355}) } - 27 => { - let lifted359 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + } + cleanup_list.push(ptr290) + cleanup_list.push(address310) + cleanup_list.push(address313) - let array357 : Array[String] = []; - for index358 = 0; index358 < (mbt_ffi_load32((iter_base) + 16)); index358 = index358 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index358 * 8) + } + mbt_ffi_store32((iter_base) + 12, ((payload289).branches).length()) + mbt_ffi_store32((iter_base) + 8, address325) + cleanup_list.push(address325) - let result356 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + SecretType(payload327) => { + mbt_ffi_store8((iter_base) + 0, (32)) - array357.push(result356) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + match ((payload327).category) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - Option::Some(array357) - } - _ => panic() - } + () + } + Some(payload329) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let lifted363 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let ptr330 = mbt_ffi_str2ptr(payload329) + mbt_ffi_store32((iter_base) + 16, payload329.length()) + mbt_ffi_store32((iter_base) + 12, ptr330) + cleanup_list.push(ptr330) - let array361 : Array[String] = []; - for index362 = 0; index362 < (mbt_ffi_load32((iter_base) + 28)); index362 = index362 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index362 * 8) + () + } + } - let result360 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + QuotaTokenType(payload331) => { + mbt_ffi_store8((iter_base) + 0, (33)) - array361.push(result360) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + match ((payload331).resource_name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - Option::Some(array361) - } - _ => panic() - } + () + } + Some(payload333) => { + mbt_ffi_store8((iter_base) + 8, (1)) - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted359, allowed_hosts : lifted363}) - } - 28 => { + let ptr334 = mbt_ffi_str2ptr(payload333) + mbt_ffi_store32((iter_base) + 16, payload333.length()) + mbt_ffi_store32((iter_base) + 12, ptr334) + cleanup_list.push(ptr334) - @types.SchemaTypeBody::DatetimeType - } - 29 => { + () + } + } - @types.SchemaTypeBody::DurationType - } - 30 => { + () + } + FutureType(payload335) => { + mbt_ffi_store8((iter_base) + 0, (34)) - let result364 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + match (payload335) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let array366 : Array[String] = []; - for index367 = 0; index367 < (mbt_ffi_load32((iter_base) + 20)); index367 = index367 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index367 * 8) + () + } + Some(payload337) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload337) - let result365 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + () + } + } - array366.push(result365) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + () + } + StreamType(payload338) => { + mbt_ffi_store8((iter_base) + 0, (35)) - let lifted369 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + match (payload338) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let result368 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + () + } + Some(payload340) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload340) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result368}) - } - _ => panic() - } + () + } + } - let lifted371 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + () + } + } - let result370 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 88, (0)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result370}) - } - _ => panic() - } + () + } + Some(payload342) => { + mbt_ffi_store8((iter_base) + 88, (1)) - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result364, allowed_suffixes : array366, min : lifted369, max : lifted371}) - } - 31 => { + let ptr343 = mbt_ffi_str2ptr(payload342) + mbt_ffi_store32((iter_base) + 96, payload342.length()) + mbt_ffi_store32((iter_base) + 92, ptr343) + cleanup_list.push(ptr343) - let array395 : Array[@types.UnionBranch] = []; - for index396 = 0; index396 < (mbt_ffi_load32((iter_base) + 12)); index396 = index396 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index396 * 92) + () + } + } - let result372 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let address345 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index346 = 0; index346 < (((iter_elem).metadata).aliases).length(); index346 = index346 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index346)] + let iter_base = address345 + (index346 * 8); - let lifted381 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + let ptr344 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr344) + cleanup_list.push(ptr344) - let result373 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + } + mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 100, address345) - @types.DiscriminatorRule::Prefix(result373) - } - 1 => { + let address348 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index349 = 0; index349 < (((iter_elem).metadata).examples).length(); index349 = index349 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index349)] + let iter_base = address348 + (index349 * 8); - let result374 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let ptr347 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr347) + cleanup_list.push(ptr347) - @types.DiscriminatorRule::Suffix(result374) - } - 2 => { + } + mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 108, address348) - let result375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 116, (0)) - @types.DiscriminatorRule::Contains(result375) - } - 3 => { + () + } + Some(payload351) => { + mbt_ffi_store8((iter_base) + 116, (1)) - let result376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let ptr352 = mbt_ffi_str2ptr(payload351) + mbt_ffi_store32((iter_base) + 124, payload351.length()) + mbt_ffi_store32((iter_base) + 120, ptr352) + cleanup_list.push(ptr352) - @types.DiscriminatorRule::Regex(result376) - } - 4 => { + () + } + } - let result377 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 128, (0)) - let lifted379 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + () + } + Some(payload354) => { + mbt_ffi_store8((iter_base) + 128, (1)) - let result378 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + match payload354 { + Multimodal => { + mbt_ffi_store8((iter_base) + 132, (0)) - Option::Some(result378) - } - _ => panic() - } + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 132, (1)) - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result377, literal : lifted379}) - } - 5 => { + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 132, (2)) - let result380 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + () + } + Other(payload358) => { + mbt_ffi_store8((iter_base) + 132, (3)) - @types.DiscriminatorRule::FieldAbsent(result380) - } - _ => panic() - } + let ptr359 = mbt_ffi_str2ptr(payload358) + mbt_ffi_store32((iter_base) + 140, payload358.length()) + mbt_ffi_store32((iter_base) + 136, ptr359) + cleanup_list.push(ptr359) - let lifted383 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + () + } + } - let result382 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + () + } + } + cleanup_list.push(address345) + cleanup_list.push(address348) - Option::Some(result382) - } - _ => panic() - } + } - let array385 : Array[String] = []; - for index386 = 0; index386 < (mbt_ffi_load32((iter_base) + 52)); index386 = index386 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index386 * 8) + let address366 = mbt_ffi_malloc((((input).graph).defs).length() * 24); + for index367 = 0; index367 < (((input).graph).defs).length(); index367 = index367 + 1 { + let iter_elem : @types.SchemaTypeDef = (((input).graph).defs)[(index367)] + let iter_base = address366 + (index367 * 24); - let result384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let ptr362 = mbt_ffi_str2ptr((iter_elem).id) + mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) + mbt_ffi_store32((iter_base) + 0, ptr362) - array385.push(result384) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + match ((iter_elem).name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let array388 : Array[String] = []; - for index389 = 0; index389 < (mbt_ffi_load32((iter_base) + 60)); index389 = index389 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index389 * 8) + () + } + Some(payload364) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let result387 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let ptr365 = mbt_ffi_str2ptr(payload364) + mbt_ffi_store32((iter_base) + 16, payload364.length()) + mbt_ffi_store32((iter_base) + 12, ptr365) + cleanup_list.push(ptr365) - array388.push(result387) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + () + } + } + mbt_ffi_store32((iter_base) + 20, (iter_elem).body) + cleanup_list.push(ptr362) - let lifted391 : String? = match mbt_ffi_load8_u((iter_base) + 64) { - 0 => Option::None - 1 => { + } - let result390 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let address438 = mbt_ffi_malloc((((input).value).value_nodes).length() * 32); + for index439 = 0; index439 < (((input).value).value_nodes).length(); index439 = index439 + 1 { + let iter_elem : @types.SchemaValueNode = (((input).value).value_nodes)[(index439)] + let iter_base = address438 + (index439 * 32); - Option::Some(result390) - } - _ => panic() - } + match iter_elem { + BoolValue(payload368) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload368 { 1 } else { 0 })) - let lifted394 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { - 0 => Option::None - 1 => { + () + } + S8Value(payload369) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload369)) - let lifted393 = match (mbt_ffi_load8_u((iter_base) + 80)) { - 0 => { + () + } + S16Value(payload370) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload370)) - @types.Role::Multimodal - } - 1 => { + () + } + S32Value(payload371) => { + mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload371) - @types.Role::UnstructuredText - } - 2 => { + () + } + S64Value(payload372) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload372) - @types.Role::UnstructuredBinary - } - 3 => { + () + } + U8Value(payload373) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload373).to_int()) - let result392 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + () + } + U16Value(payload374) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload374).reinterpret_as_int()) - @types.Role::Other(result392) - } - _ => panic() - } + () + } + U32Value(payload375) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload375).reinterpret_as_int()) - Option::Some(lifted393) - } - _ => panic() - } + () + } + U64Value(payload376) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload376).reinterpret_as_int64()) - array395.push(@types.UnionBranch::{tag : result372, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted381, metadata : @types.MetadataEnvelope::{doc : lifted383, aliases : array385, examples : array388, deprecated : lifted391, role : lifted394}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + F32Value(payload377) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload377) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array395}) - } - 32 => { + () + } + F64Value(payload378) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload378) - let lifted398 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + CharValue(payload379) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload379).to_int()) - let result397 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + () + } + StringValue(payload380) => { + mbt_ffi_store8((iter_base) + 0, (12)) - Option::Some(result397) - } - _ => panic() - } + let ptr381 = mbt_ffi_str2ptr(payload380) + mbt_ffi_store32((iter_base) + 12, payload380.length()) + mbt_ffi_store32((iter_base) + 8, ptr381) + cleanup_list.push(ptr381) - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted398}) - } - 33 => { + () + } + RecordValue(payload382) => { + mbt_ffi_store8((iter_base) + 0, (13)) - let lifted400 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let address383 = mbt_ffi_malloc((payload382).length() * 4); + for index384 = 0; index384 < (payload382).length(); index384 = index384 + 1 { + let iter_elem : Int = (payload382)[(index384)] + let iter_base = address383 + (index384 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - let result399 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + } + mbt_ffi_store32((iter_base) + 12, (payload382).length()) + mbt_ffi_store32((iter_base) + 8, address383) + cleanup_list.push(address383) - Option::Some(result399) - } - _ => panic() - } + () + } + VariantValue(payload385) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload385).case).reinterpret_as_int()) - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted400}) - } - 34 => { + match ((payload385).payload) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - let lifted401 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + Some(payload387) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload387) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + () + } + } - @types.SchemaTypeBody::FutureType(lifted401) - } - 35 => { + () + } + EnumValue(payload388) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload388).reinterpret_as_int()) - let lifted402 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + () + } + FlagsValue(payload389) => { + mbt_ffi_store8((iter_base) + 0, (16)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let address390 = mbt_ffi_malloc((payload389).length() * 1); + for index391 = 0; index391 < (payload389).length(); index391 = index391 + 1 { + let iter_elem : Bool = (payload389)[(index391)] + let iter_base = address390 + (index391 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) - @types.SchemaTypeBody::StreamType(lifted402) - } - _ => panic() - } + } + mbt_ffi_store32((iter_base) + 12, (payload389).length()) + mbt_ffi_store32((iter_base) + 8, address390) + cleanup_list.push(address390) - let lifted405 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { + () + } + TupleValue(payload392) => { + mbt_ffi_store8((iter_base) + 0, (17)) - let result404 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let address393 = mbt_ffi_malloc((payload392).length() * 4); + for index394 = 0; index394 < (payload392).length(); index394 = index394 + 1 { + let iter_elem : Int = (payload392)[(index394)] + let iter_base = address393 + (index394 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - Option::Some(result404) - } - _ => panic() - } + } + mbt_ffi_store32((iter_base) + 12, (payload392).length()) + mbt_ffi_store32((iter_base) + 8, address393) + cleanup_list.push(address393) + + () + } + ListValue(payload395) => { + mbt_ffi_store8((iter_base) + 0, (18)) - let array407 : Array[String] = []; - for index408 = 0; index408 < (mbt_ffi_load32((iter_base) + 104)); index408 = index408 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index408 * 8) + let address396 = mbt_ffi_malloc((payload395).length() * 4); + for index397 = 0; index397 < (payload395).length(); index397 = index397 + 1 { + let iter_elem : Int = (payload395)[(index397)] + let iter_base = address396 + (index397 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - let result406 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + } + mbt_ffi_store32((iter_base) + 12, (payload395).length()) + mbt_ffi_store32((iter_base) + 8, address396) + cleanup_list.push(address396) - array407.push(result406) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + () + } + FixedListValue(payload398) => { + mbt_ffi_store8((iter_base) + 0, (19)) - let array410 : Array[String] = []; - for index411 = 0; index411 < (mbt_ffi_load32((iter_base) + 112)); index411 = index411 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index411 * 8) + let address399 = mbt_ffi_malloc((payload398).length() * 4); + for index400 = 0; index400 < (payload398).length(); index400 = index400 + 1 { + let iter_elem : Int = (payload398)[(index400)] + let iter_base = address399 + (index400 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - let result409 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + } + mbt_ffi_store32((iter_base) + 12, (payload398).length()) + mbt_ffi_store32((iter_base) + 8, address399) + cleanup_list.push(address399) - array410.push(result409) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + () + } + MapValue(payload401) => { + mbt_ffi_store8((iter_base) + 0, (20)) - let lifted413 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + let address402 = mbt_ffi_malloc((payload401).length() * 8); + for index403 = 0; index403 < (payload401).length(); index403 = index403 + 1 { + let iter_elem : @types.MapEntry = (payload401)[(index403)] + let iter_base = address402 + (index403 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) - let result412 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + } + mbt_ffi_store32((iter_base) + 12, (payload401).length()) + mbt_ffi_store32((iter_base) + 8, address402) + cleanup_list.push(address402) - Option::Some(result412) - } - _ => panic() - } + () + } + OptionValue(payload404) => { + mbt_ffi_store8((iter_base) + 0, (21)) - let lifted416 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + match (payload404) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let lifted415 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + () + } + Some(payload406) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload406) - @types.Role::Multimodal - } - 1 => { + () + } + } - @types.Role::UnstructuredText - } - 2 => { + () + } + ResultValue(payload407) => { + mbt_ffi_store8((iter_base) + 0, (22)) - @types.Role::UnstructuredBinary - } - 3 => { + match payload407 { + OkValue(payload408) => { + mbt_ffi_store8((iter_base) + 8, (0)) - let result414 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + match (payload408) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - @types.Role::Other(result414) - } - _ => panic() - } + () + } + Some(payload410) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload410) - Option::Some(lifted415) + () } - _ => panic() } - array417.push(@types.SchemaTypeNode::{body : lifted403, metadata : @types.MetadataEnvelope::{doc : lifted405, aliases : array407, examples : array410, deprecated : lifted413, role : lifted416}}) + () } - mbt_ffi_free(mbt_ffi_load32((return_area) + 8)) - - let array422 : Array[@types.SchemaTypeDef] = []; - for index423 = 0; index423 < (mbt_ffi_load32((return_area) + 20)); index423 = index423 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index423 * 24) - - let result419 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + ErrValue(payload411) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let lifted421 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + match (payload411) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + () + } + Some(payload413) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload413) - Option::Some(result420) + () } - _ => panic() } - array422.push(@types.SchemaTypeDef::{id : result419, name : lifted421, body : mbt_ffi_load32((iter_base) + 20)}) + () } - mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) + } - let array454 : Array[@types.SchemaValueNode] = []; - for index455 = 0; index455 < (mbt_ffi_load32((return_area) + 32)); index455 = index455 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 28)) + (index455 * 32) + () + } + TextValue(payload414) => { + mbt_ffi_store8((iter_base) + 0, (23)) - let lifted453 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let ptr415 = mbt_ffi_str2ptr((payload414).text) + mbt_ffi_store32((iter_base) + 12, (payload414).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr415) - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + match ((payload414).language) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + () + } + Some(payload417) => { + mbt_ffi_store8((iter_base) + 16, (1)) - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + let ptr418 = mbt_ffi_str2ptr(payload417) + mbt_ffi_store32((iter_base) + 24, payload417.length()) + mbt_ffi_store32((iter_base) + 20, ptr418) + cleanup_list.push(ptr418) - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + () + } + } + cleanup_list.push(ptr415) - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + () + } + BinaryValue(payload419) => { + mbt_ffi_store8((iter_base) + 0, (24)) - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + let ptr420 = mbt_ffi_bytes2ptr((payload419).bytes) - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + mbt_ffi_store32((iter_base) + 12, (payload419).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr420) - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + match ((payload419).mime_type) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + () + } + Some(payload422) => { + mbt_ffi_store8((iter_base) + 16, (1)) - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + let ptr423 = mbt_ffi_str2ptr(payload422) + mbt_ffi_store32((iter_base) + 24, payload422.length()) + mbt_ffi_store32((iter_base) + 20, ptr423) + cleanup_list.push(ptr423) - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + () + } + } + cleanup_list.push(ptr420) - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + () + } + PathValue(payload424) => { + mbt_ffi_store8((iter_base) + 0, (25)) - let result424 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let ptr425 = mbt_ffi_str2ptr(payload424) + mbt_ffi_store32((iter_base) + 12, payload424.length()) + mbt_ffi_store32((iter_base) + 8, ptr425) + cleanup_list.push(ptr425) - @types.SchemaValueNode::StringValue(result424) - } - 13 => { + () + } + UrlValue(payload426) => { + mbt_ffi_store8((iter_base) + 0, (26)) - let array425 : Array[Int] = []; - for index426 = 0; index426 < (mbt_ffi_load32((iter_base) + 12)); index426 = index426 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index426 * 4) + let ptr427 = mbt_ffi_str2ptr(payload426) + mbt_ffi_store32((iter_base) + 12, payload426.length()) + mbt_ffi_store32((iter_base) + 8, ptr427) + cleanup_list.push(ptr427) - array425.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + DatetimeValue(payload428) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload428).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload428).nanoseconds).reinterpret_as_int()) - @types.SchemaValueNode::RecordValue(array425) - } - 14 => { + () + } + DurationValue(payload429) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload429).nanoseconds) - let lifted427 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + () + } + QuantityValueNode(payload430) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload430).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload430).scale) - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + let ptr431 = mbt_ffi_str2ptr((payload430).unit) + mbt_ffi_store32((iter_base) + 24, (payload430).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr431) + cleanup_list.push(ptr431) - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted427}) - } - 15 => { + () + } + UnionValue(payload432) => { + mbt_ffi_store8((iter_base) + 0, (30)) - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + let ptr433 = mbt_ffi_str2ptr((payload432).tag) + mbt_ffi_store32((iter_base) + 12, (payload432).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr433) + mbt_ffi_store32((iter_base) + 16, (payload432).body) + cleanup_list.push(ptr433) - let array428 : Array[Bool] = []; - for index429 = 0; index429 < (mbt_ffi_load32((iter_base) + 12)); index429 = index429 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index429 * 1) + () + } + SecretValue(payload434) => { + mbt_ffi_store8((iter_base) + 0, (31)) - array428.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let ptr435 = mbt_ffi_str2ptr((payload434).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload434).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr435) + cleanup_list.push(ptr435) - @types.SchemaValueNode::FlagsValue(array428) - } - 17 => { + () + } + QuotaTokenHandle(payload436) => { + mbt_ffi_store8((iter_base) + 0, (32)) - let array430 : Array[Int] = []; - for index431 = 0; index431 < (mbt_ffi_load32((iter_base) + 12)); index431 = index431 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index431 * 4) + let @types.QuotaToken(handle437) = payload436 + mbt_ffi_store32((iter_base) + 8, handle437) - array430.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + () + } + } - @types.SchemaValueNode::TupleValue(array430) - } - 18 => { + } - let array432 : Array[Int] = []; - for index433 = 0; index433 < (mbt_ffi_load32((iter_base) + 12)); index433 = index433 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index433 * 4) + let (lowered, lowered443) = match (stdin) { + None => { - array432.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + ((0), 0) + } + Some(payload441) => { - @types.SchemaValueNode::ListValue(array432) - } - 19 => { + let @streams.InputStream(handle442) = payload441 + + ((1), handle442) + } + } + let return_area = mbt_ffi_malloc(48) + wasmImportMethodToolRpcInvokeAndAwait(handle, address, (command_path).length(), address360, (((input).graph).type_nodes).length(), address366, (((input).graph).defs).length(), ((input).graph).root, address438, (((input).value).value_nodes).length(), ((input).value).root, lowered, lowered443, return_area); - let array434 : Array[Int] = []; - for index435 = 0; index435 < (mbt_ffi_load32((iter_base) + 12)); index435 = index435 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index435 * 4) + let lifted926 = match (mbt_ffi_load8_u((return_area) + 0)) { + 0 => { - array434.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted676 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((return_area) + 4) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::FixedListValue(array434) - } - 20 => { + let array637 : Array[@types.SchemaTypeNode] = []; + for index638 = 0; index638 < (mbt_ffi_load32((return_area) + 12)); index638 = index638 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 8)) + (index638 * 144) - let array436 : Array[@types.MapEntry] = []; - for index437 = 0; index437 < (mbt_ffi_load32((iter_base) + 12)); index437 = index437 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index437 * 8) + let lifted623 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - array436.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { - @types.SchemaValueNode::MapValue(array436) + @types.SchemaTypeBody::BoolType } - 21 => { + 2 => { - let lifted438 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted448 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let lifted444 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::OptionValue(lifted438) - } - 22 => { + let lifted = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted441 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted439 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted) + } + _ => panic() + } + + let lifted446 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) + let lifted445 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted445) } _ => panic() } - @types.ResultValuePayload::OkValue(lifted439) - } - 1 => { - - let lifted440 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted447 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) + let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result) } _ => panic() } - @types.ResultValuePayload::ErrValue(lifted440) + Option::Some(@types.NumericRestrictions::{min : lifted444, max : lifted446, unit : lifted447}) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted441) + @types.SchemaTypeBody::S8Type(lifted448) } - 23 => { - - let result442 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + 3 => { - let lifted444 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted455 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result443 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - - Option::Some(result443) - } - _ => panic() - } + let lifted450 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result442, language : lifted444}) - } - 24 => { + let lifted449 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result445 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted447 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result446 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result446) - } - _ => panic() - } + Option::Some(lifted449) + } + _ => panic() + } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result445, mime_type : lifted447}) - } - 25 => { + let lifted452 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result448 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted451 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaValueNode::PathValue(result448) - } - 26 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result449 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::UrlValue(result449) - } - 27 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) - } - 28 => { + Option::Some(lifted451) + } + _ => panic() + } - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) - } - 29 => { + let lifted454 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result450 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result453 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result450}) - } - 30 => { + Option::Some(result453) + } + _ => panic() + } - let result451 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(@types.NumericRestrictions::{min : lifted450, max : lifted452, unit : lifted454}) + } + _ => panic() + } - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result451, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaTypeBody::S16Type(lifted455) } - 31 => { + 4 => { - let result452 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted462 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result452}) - } - 32 => { + let lifted457 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) - } - _ => panic() - } + let lifted456 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - array454.push(lifted453) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 28)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array417, defs : array422, root : mbt_ffi_load32((return_area) + 24)}, value : @types.SchemaValueTree::{value_nodes : array454, root : mbt_ffi_load32((return_area) + 36)}}) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted457 : @streams.OutputStream? = match mbt_ffi_load8_u((return_area) + 40) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(@streams.OutputStream::OutputStream(mbt_ffi_load32((return_area) + 44))) - } - _ => panic() - } + Option::Some(lifted456) + } + _ => panic() + } - Result::Ok(@common.InvocationResult::{result : lifted456, stdout : lifted457}) - } - 1 => { + let lifted459 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted635 = match (mbt_ffi_load8_u((return_area) + 4)) { - 0 => { + let lifted458 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result458 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - RpcError::ProtocolError(result458) - } - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result459 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - RpcError::Denied(result459) - } - 2 => { + Option::Some(lifted458) + } + _ => panic() + } - let result460 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + let lifted461 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - RpcError::NotFound(result460) - } - 3 => { + let result460 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result461 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + Option::Some(result460) + } + _ => panic() + } - RpcError::RemoteInternalError(result461) - } - 4 => { + Option::Some(@types.NumericRestrictions::{min : lifted457, max : lifted459, unit : lifted461}) + } + _ => panic() + } - let lifted634 = match (mbt_ffi_load8_u((return_area) + 8)) { - 0 => { + @types.SchemaTypeBody::S32Type(lifted462) + } + 5 => { - let result462 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + let lifted469 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @common.ToolError::InvalidToolName(result462) - } - 1 => { - - let array464 : Array[String] = []; - for index465 = 0; index465 < (mbt_ffi_load32((return_area) + 16)); index465 = index465 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index465 * 8) - - let result463 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array464.push(result463) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) + let lifted464 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @common.ToolError::InvalidCommandPath(array464) - } - 2 => { + let lifted463 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result466 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @common.ToolError::InvalidInput(result466) - } - 3 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result467 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @common.ToolError::ConstraintViolation(result467) - } - 4 => { + Option::Some(lifted463) + } + _ => panic() + } - let result468 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + let lifted466 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @common.ToolError::InvalidResult(result468) - } - 5 => { + let lifted465 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array595 : Array[@types.SchemaTypeNode] = []; - for index596 = 0; index596 < (mbt_ffi_load32((return_area) + 16)); index596 = index596 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index596 * 144) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted581 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::BoolType - } - 2 => { + Option::Some(lifted465) + } + _ => panic() + } - @types.SchemaTypeBody::S8Type - } - 3 => { + let lifted468 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S16Type - } - 4 => { + let result467 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaTypeBody::S32Type - } - 5 => { + Option::Some(result467) + } + _ => panic() + } - @types.SchemaTypeBody::S64Type + Option::Some(@types.NumericRestrictions::{min : lifted464, max : lifted466, unit : lifted468}) } - 6 => { + _ => panic() + } - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.SchemaTypeBody::S64Type(lifted469) + } + 6 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + let lifted476 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + let lifted471 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::U64Type - } - 10 => { + let lifted470 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::F32Type - } - 11 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::F64Type - } - 12 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::CharType - } - 13 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::StringType - } - 14 => { + Option::Some(lifted470) + } + _ => panic() + } - let array483 : Array[@types.NamedFieldType] = []; - for index484 = 0; index484 < (mbt_ffi_load32((iter_base) + 12)); index484 = index484 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index484 * 68) + let lifted473 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result469 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted472 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted471 : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result470 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(result470) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() + + Option::Some(lifted472) } + _ => panic() + } - let array473 : Array[String] = []; - for index474 = 0; index474 < (mbt_ffi_load32((iter_base) + 28)); index474 = index474 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index474 * 8) + let lifted475 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result472 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result474 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - array473.push(result472) + Option::Some(result474) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + _ => panic() + } - let array476 : Array[String] = []; - for index477 = 0; index477 < (mbt_ffi_load32((iter_base) + 36)); index477 = index477 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index477 * 8) + Option::Some(@types.NumericRestrictions::{min : lifted471, max : lifted473, unit : lifted475}) + } + _ => panic() + } - let result475 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::U8Type(lifted476) + } + 7 => { - array476.push(result475) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + let lifted483 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let lifted479 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + let lifted478 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result478 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let lifted477 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(result478) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted482 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted481 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.Role::Multimodal - } - 1 => { + Option::Some(lifted477) + } + _ => panic() + } - @types.Role::UnstructuredText - } - 2 => { + let lifted480 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredBinary - } - 3 => { + let lifted479 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result480 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.Role::Other(result480) - } - _ => panic() + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) } + 2 => { - Option::Some(lifted481) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() + + Option::Some(lifted479) } + _ => panic() + } + + let lifted482 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - array483.push(@types.NamedFieldType::{name : result469, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted471, aliases : array473, examples : array476, deprecated : lifted479, role : lifted482}}) + let result481 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result481) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array483) + Option::Some(@types.NumericRestrictions::{min : lifted478, max : lifted480, unit : lifted482}) } - 15 => { + _ => panic() + } - let array500 : Array[@types.VariantCaseType] = []; - for index501 = 0; index501 < (mbt_ffi_load32((iter_base) + 12)); index501 = index501 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index501 * 72) + @types.SchemaTypeBody::U16Type(lifted483) + } + 8 => { - let result485 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted490 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let lifted486 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted485 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let lifted484 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let lifted488 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result487 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(result487) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() + + Option::Some(lifted484) } + _ => panic() + } - let array490 : Array[String] = []; - for index491 = 0; index491 < (mbt_ffi_load32((iter_base) + 32)); index491 = index491 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index491 * 8) + let lifted487 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result489 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted486 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - array490.push(result489) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let array493 : Array[String] = []; - for index494 = 0; index494 < (mbt_ffi_load32((iter_base) + 40)); index494 = index494 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index494 * 8) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result492 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - array493.push(result492) + Option::Some(lifted486) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + _ => panic() + } - let lifted496 : String? = match mbt_ffi_load8_u((iter_base) + 44) { - 0 => Option::None - 1 => { + let lifted489 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result495 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result488 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result495) - } - _ => panic() + Option::Some(result488) } + _ => panic() + } - let lifted499 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + Option::Some(@types.NumericRestrictions::{min : lifted485, max : lifted487, unit : lifted489}) + } + _ => panic() + } - let lifted498 = match (mbt_ffi_load8_u((iter_base) + 60)) { - 0 => { + @types.SchemaTypeBody::U32Type(lifted490) + } + 9 => { - @types.Role::Multimodal - } - 1 => { + let lifted497 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredText - } - 2 => { + let lifted492 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredBinary - } - 3 => { + let lifted491 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result497 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.Role::Other(result497) - } - _ => panic() + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) } + 2 => { - Option::Some(lifted498) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - _ => panic() - } - - array500.push(@types.VariantCaseType::{name : result485, payload : lifted486, metadata : @types.MetadataEnvelope::{doc : lifted488, aliases : array490, examples : array493, deprecated : lifted496, role : lifted499}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::VariantType(array500) - } - 16 => { - - let array503 : Array[String] = []; - for index504 = 0; index504 < (mbt_ffi_load32((iter_base) + 12)); index504 = index504 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index504 * 8) - - let result502 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array503.push(result502) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::EnumType(array503) - } - 17 => { - let array506 : Array[String] = []; - for index507 = 0; index507 < (mbt_ffi_load32((iter_base) + 12)); index507 = index507 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index507 * 8) - - let result505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array506.push(result505) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::FlagsType(array506) - } - 18 => { - - let array508 : Array[Int] = []; - for index509 = 0; index509 < (mbt_ffi_load32((iter_base) + 12)); index509 = index509 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index509 * 4) - - array508.push(mbt_ffi_load32((iter_base) + 0)) + Option::Some(lifted491) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array508) - } - 19 => { - - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + let lifted494 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) - } - 21 => { + let lifted493 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) - } - 22 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) - } - 23 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted510 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(mbt_ffi_load32((iter_base) + 12)) + Option::Some(lifted493) } _ => panic() } - let lifted511 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted496 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 20)) + let result495 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result495) } _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted510, err : lifted511}) + Option::Some(@types.NumericRestrictions::{min : lifted492, max : lifted494, unit : lifted496}) } - 24 => { + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted497) + } + 10 => { - let lifted515 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted504 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted499 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let array513 : Array[String] = []; - for index514 = 0; index514 < (mbt_ffi_load32((iter_base) + 16)); index514 = index514 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index514 * 8) + let lifted498 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result512 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - array513.push(result512) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array513) + Option::Some(lifted498) } _ => panic() } - let lifted516 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted501 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() - } + let lifted500 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted517 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted500) } _ => panic() } - let lifted519 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted503 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result518 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result502 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result518) + Option::Some(result502) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted515, min_length : lifted516, max_length : lifted517, regex : lifted519}) + Option::Some(@types.NumericRestrictions::{min : lifted499, max : lifted501, unit : lifted503}) } - 25 => { + _ => panic() + } - let lifted523 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + @types.SchemaTypeBody::F32Type(lifted504) + } + 11 => { + + let lifted511 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted506 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let array521 : Array[String] = []; - for index522 = 0; index522 < (mbt_ffi_load32((iter_base) + 16)); index522 = index522 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index522 * 8) + let lifted505 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result520 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - array521.push(result520) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array521) + Option::Some(lifted505) } _ => panic() } - let lifted524 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted508 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + let lifted507 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted507) } _ => panic() } - let lifted525 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted510 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + let result509 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result509) } _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted523, min_bytes : lifted524, max_bytes : lifted525}) + Option::Some(@types.NumericRestrictions::{min : lifted506, max : lifted508, unit : lifted510}) } - 26 => { + _ => panic() + } - let lifted529 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::F64Type(lifted511) + } + 12 => { - let array527 : Array[String] = []; - for index528 = 0; index528 < (mbt_ffi_load32((iter_base) + 20)); index528 = index528 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index528 * 8) + @types.SchemaTypeBody::CharType + } + 13 => { - let result526 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::StringType + } + 14 => { - array527.push(result526) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + let array525 : Array[@types.NamedFieldType] = []; + for index526 = 0; index526 < (mbt_ffi_load32((iter_base) + 12)); index526 = index526 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index526 * 68) - Option::Some(array527) - } - _ => panic() - } + let result512 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted533 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + let lifted514 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - let array531 : Array[String] = []; - for index532 = 0; index532 < (mbt_ffi_load32((iter_base) + 32)); index532 = index532 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index532 * 8) + let result513 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let result530 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(result513) + } + _ => panic() + } - array531.push(result530) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + let array : Array[String] = []; + for index516 = 0; index516 < (mbt_ffi_load32((iter_base) + 28)); index516 = index516 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index516 * 8) - Option::Some(array531) - } - _ => panic() - } + let result515 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted529, allowed_extensions : lifted533}) + array.push(result515) } - 27 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let lifted537 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let array518 : Array[String] = []; + for index519 = 0; index519 < (mbt_ffi_load32((iter_base) + 36)); index519 = index519 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index519 * 8) - let array535 : Array[String] = []; - for index536 = 0; index536 < (mbt_ffi_load32((iter_base) + 16)); index536 = index536 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index536 * 8) + let result517 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result534 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + array518.push(result517) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - array535.push(result534) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + let lifted521 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - Option::Some(array535) - } - _ => panic() + let result520 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result520) } + _ => panic() + } - let lifted541 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + let lifted524 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { - let array539 : Array[String] = []; - for index540 = 0; index540 < (mbt_ffi_load32((iter_base) + 28)); index540 = index540 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index540 * 8) + let lifted523 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { - let result538 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.Role::Multimodal + } + 1 => { - array539.push(result538) + @types.Role::UnstructuredText } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result522 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - Option::Some(array539) + @types.Role::Other(result522) + } + _ => panic() } - _ => panic() - } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted537, allowed_hosts : lifted541}) + Option::Some(lifted523) + } + _ => panic() } - 28 => { - @types.SchemaTypeBody::DatetimeType - } - 29 => { + array525.push(@types.NamedFieldType::{name : result512, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted514, aliases : array, examples : array518, deprecated : lifted521, role : lifted524}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::DurationType - } - 30 => { + @types.SchemaTypeBody::RecordType(array525) + } + 15 => { - let result542 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let array542 : Array[@types.VariantCaseType] = []; + for index543 = 0; index543 < (mbt_ffi_load32((iter_base) + 12)); index543 = index543 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index543 * 72) - let array544 : Array[String] = []; - for index545 = 0; index545 < (mbt_ffi_load32((iter_base) + 20)); index545 = index545 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index545 * 8) + let result527 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result543 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted528 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array544.push(result543) + Option::Some(mbt_ffi_load32((iter_base) + 12)) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + _ => panic() + } - let lifted547 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + let lifted530 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result546 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result529 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result546}) - } - _ => panic() + Option::Some(result529) } + _ => panic() + } - let lifted549 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let array532 : Array[String] = []; + for index533 = 0; index533 < (mbt_ffi_load32((iter_base) + 32)); index533 = index533 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index533 * 8) - let result548 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result531 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result548}) - } - _ => panic() - } + array532.push(result531) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + let array535 : Array[String] = []; + for index536 = 0; index536 < (mbt_ffi_load32((iter_base) + 40)); index536 = index536 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index536 * 8) - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result542, allowed_suffixes : array544, min : lifted547, max : lifted549}) + let result534 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array535.push(result534) } - 31 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let array573 : Array[@types.UnionBranch] = []; - for index574 = 0; index574 < (mbt_ffi_load32((iter_base) + 12)); index574 = index574 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index574 * 92) + let lifted538 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - let result550 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result537 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - let lifted559 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + Option::Some(result537) + } + _ => panic() + } + + let lifted541 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let result551 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted540 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - @types.DiscriminatorRule::Prefix(result551) + @types.Role::Multimodal } 1 => { - let result552 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - @types.DiscriminatorRule::Suffix(result552) + @types.Role::UnstructuredText } 2 => { - let result553 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - @types.DiscriminatorRule::Contains(result553) + @types.Role::UnstructuredBinary } 3 => { - let result554 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result539 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.DiscriminatorRule::Regex(result554) + @types.Role::Other(result539) } - 4 => { - - let result555 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + _ => panic() + } - let lifted557 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + Option::Some(lifted540) + } + _ => panic() + } - let result556 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + array542.push(@types.VariantCaseType::{name : result527, payload : lifted528, metadata : @types.MetadataEnvelope::{doc : lifted530, aliases : array532, examples : array535, deprecated : lifted538, role : lifted541}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - Option::Some(result556) - } - _ => panic() - } + @types.SchemaTypeBody::VariantType(array542) + } + 16 => { - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result555, literal : lifted557}) - } - 5 => { + let array545 : Array[String] = []; + for index546 = 0; index546 < (mbt_ffi_load32((iter_base) + 12)); index546 = index546 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index546 * 8) - let result558 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result544 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.DiscriminatorRule::FieldAbsent(result558) - } - _ => panic() - } + array545.push(result544) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let lifted561 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::EnumType(array545) + } + 17 => { - let result560 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let array548 : Array[String] = []; + for index549 = 0; index549 < (mbt_ffi_load32((iter_base) + 12)); index549 = index549 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index549 * 8) - Option::Some(result560) - } - _ => panic() - } + let result547 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array563 : Array[String] = []; - for index564 = 0; index564 < (mbt_ffi_load32((iter_base) + 52)); index564 = index564 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index564 * 8) + array548.push(result547) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let result562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::FlagsType(array548) + } + 18 => { - array563.push(result562) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + let array550 : Array[Int] = []; + for index551 = 0; index551 < (mbt_ffi_load32((iter_base) + 12)); index551 = index551 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index551 * 4) - let array566 : Array[String] = []; - for index567 = 0; index567 < (mbt_ffi_load32((iter_base) + 60)); index567 = index567 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index567 * 8) + array550.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let result565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaTypeBody::TupleType(array550) + } + 19 => { - array566.push(result565) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { - let lifted569 : String? = match mbt_ffi_load8_u((iter_base) + 64) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { - let result568 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { - Option::Some(result568) - } - _ => panic() - } + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { - let lifted572 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { - 0 => Option::None - 1 => { + let lifted552 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let lifted571 = match (mbt_ffi_load8_u((iter_base) + 80)) { - 0 => { + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - @types.Role::Multimodal - } - 1 => { + let lifted553 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredText - } - 2 => { + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } - @types.Role::UnstructuredBinary - } - 3 => { + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted552, err : lifted553}) + } + 24 => { - let result570 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let lifted557 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.Role::Other(result570) - } - _ => panic() - } + let array555 : Array[String] = []; + for index556 = 0; index556 < (mbt_ffi_load32((iter_base) + 16)); index556 = index556 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index556 * 8) - Option::Some(lifted571) - } - _ => panic() - } + let result554 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array573.push(@types.UnionBranch::{tag : result550, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted559, metadata : @types.MetadataEnvelope::{doc : lifted561, aliases : array563, examples : array566, deprecated : lifted569, role : lifted572}}) + array555.push(result554) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array573}) + Option::Some(array555) } - 32 => { + _ => panic() + } - let lifted576 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted558 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - let result575 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } - Option::Some(result575) - } - _ => panic() - } + let lifted559 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted576}) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) } - 33 => { - - let lifted578 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + _ => panic() + } - let result577 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let lifted561 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - Option::Some(result577) - } - _ => panic() - } + let result560 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted578}) + Option::Some(result560) } - 34 => { + _ => panic() + } - let lifted579 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted557, min_length : lifted558, max_length : lifted559, regex : lifted561}) + } + 25 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let lifted565 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::FutureType(lifted579) - } - 35 => { + let array563 : Array[String] = []; + for index564 = 0; index564 < (mbt_ffi_load32((iter_base) + 16)); index564 = index564 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index564 * 8) - let lifted580 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result562 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() + array563.push(result562) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @types.SchemaTypeBody::StreamType(lifted580) + Option::Some(array563) } _ => panic() } - let lifted583 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted566 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let result582 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - - Option::Some(result582) + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) } _ => panic() } - let array585 : Array[String] = []; - for index586 = 0; index586 < (mbt_ffi_load32((iter_base) + 104)); index586 = index586 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index586 * 8) - - let result584 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted567 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - array585.push(result584) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array588 : Array[String] = []; - for index589 = 0; index589 < (mbt_ffi_load32((iter_base) + 112)); index589 = index589 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index589 * 8) - - let result587 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array588.push(result587) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted565, min_bytes : lifted566, max_bytes : lifted567}) + } + 26 => { - let lifted591 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted571 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result590 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let array569 : Array[String] = []; + for index570 = 0; index570 < (mbt_ffi_load32((iter_base) + 20)); index570 = index570 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index570 * 8) - Option::Some(result590) + let result568 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array569.push(result568) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + Option::Some(array569) } _ => panic() } - let lifted594 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted575 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let lifted593 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { - - @types.Role::Multimodal - } - 1 => { - - @types.Role::UnstructuredText - } - 2 => { - - @types.Role::UnstructuredBinary - } - 3 => { + let array573 : Array[String] = []; + for index574 = 0; index574 < (mbt_ffi_load32((iter_base) + 32)); index574 = index574 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index574 * 8) - let result592 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result572 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.Role::Other(result592) - } - _ => panic() + array573.push(result572) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(lifted593) + Option::Some(array573) } _ => panic() } - array595.push(@types.SchemaTypeNode::{body : lifted581, metadata : @types.MetadataEnvelope::{doc : lifted583, aliases : array585, examples : array588, deprecated : lifted591, role : lifted594}}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted571, allowed_extensions : lifted575}) } - mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) + 27 => { + + let lifted579 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array577 : Array[String] = []; + for index578 = 0; index578 < (mbt_ffi_load32((iter_base) + 16)); index578 = index578 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index578 * 8) - let array600 : Array[@types.SchemaTypeDef] = []; - for index601 = 0; index601 < (mbt_ffi_load32((return_area) + 24)); index601 = index601 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index601 * 24) + let result576 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array577.push(result576) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - let result597 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(array577) + } + _ => panic() + } - let lifted599 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted583 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let result598 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let array581 : Array[String] = []; + for index582 = 0; index582 < (mbt_ffi_load32((iter_base) + 28)); index582 = index582 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index582 * 8) - Option::Some(result598) + let result580 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array581.push(result580) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + Option::Some(array581) } _ => panic() } - array600.push(@types.SchemaTypeDef::{id : result597, name : lifted599, body : mbt_ffi_load32((iter_base) + 20)}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted579, allowed_hosts : lifted583}) } - mbt_ffi_free(mbt_ffi_load32((return_area) + 20)) + 28 => { - let array632 : Array[@types.SchemaValueNode] = []; - for index633 = 0; index633 < (mbt_ffi_load32((return_area) + 36)); index633 = index633 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index633 * 32) + @types.SchemaTypeBody::DatetimeType + } + 29 => { - let lifted631 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + @types.SchemaTypeBody::DurationType + } + 30 => { - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + let result584 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + let array586 : Array[String] = []; + for index587 = 0; index587 < (mbt_ffi_load32((iter_base) + 20)); index587 = index587 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index587 * 8) - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + let result585 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + array586.push(result585) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + let lifted589 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + let result588 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result588}) } - 7 => { + _ => panic() + } - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + let lifted591 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + let result590 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result590}) } - 10 => { + _ => panic() + } - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result584, allowed_suffixes : array586, min : lifted589, max : lifted591}) + } + 31 => { - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + let array615 : Array[@types.UnionBranch] = []; + for index616 = 0; index616 < (mbt_ffi_load32((iter_base) + 12)); index616 = index616 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index616 * 92) - let result602 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result592 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::StringValue(result602) - } - 13 => { + let lifted601 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { - let array603 : Array[Int] = []; - for index604 = 0; index604 < (mbt_ffi_load32((iter_base) + 12)); index604 = index604 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index604 * 4) + let result593 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - array603.push(mbt_ffi_load32((iter_base) + 0)) + @types.DiscriminatorRule::Prefix(result593) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaValueNode::RecordValue(array603) - } - 14 => { + 1 => { - let lifted605 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let result594 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() + @types.DiscriminatorRule::Suffix(result594) } + 2 => { - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted605}) - } - 15 => { + let result595 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + @types.DiscriminatorRule::Contains(result595) + } + 3 => { - let array606 : Array[Bool] = []; - for index607 = 0; index607 < (mbt_ffi_load32((iter_base) + 12)); index607 = index607 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index607 * 1) + let result596 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - array606.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + @types.DiscriminatorRule::Regex(result596) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + 4 => { - @types.SchemaValueNode::FlagsValue(array606) - } - 17 => { + let result597 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + let lifted599 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result598 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - let array608 : Array[Int] = []; - for index609 = 0; index609 < (mbt_ffi_load32((iter_base) + 12)); index609 = index609 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index609 * 4) + Option::Some(result598) + } + _ => panic() + } - array608.push(mbt_ffi_load32((iter_base) + 0)) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result597, literal : lifted599}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + 5 => { + + let result600 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.SchemaValueNode::TupleValue(array608) + @types.DiscriminatorRule::FieldAbsent(result600) + } + _ => panic() } - 18 => { - let array610 : Array[Int] = []; - for index611 = 0; index611 < (mbt_ffi_load32((iter_base) + 12)); index611 = index611 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index611 * 4) + let lifted603 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - array610.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let result602 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - @types.SchemaValueNode::ListValue(array610) + Option::Some(result602) + } + _ => panic() } - 19 => { - let array612 : Array[Int] = []; - for index613 = 0; index613 < (mbt_ffi_load32((iter_base) + 12)); index613 = index613 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index613 * 4) + let array605 : Array[String] = []; + for index606 = 0; index606 < (mbt_ffi_load32((iter_base) + 52)); index606 = index606 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index606 * 8) - array612.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let result604 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::FixedListValue(array612) + array605.push(result604) } - 20 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array614 : Array[@types.MapEntry] = []; - for index615 = 0; index615 < (mbt_ffi_load32((iter_base) + 12)); index615 = index615 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index615 * 8) + let array608 : Array[String] = []; + for index609 = 0; index609 < (mbt_ffi_load32((iter_base) + 60)); index609 = index609 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index609 * 8) - array614.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let result607 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::MapValue(array614) + array608.push(result607) } - 21 => { + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted616 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted611 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + let result610 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaValueNode::OptionValue(lifted616) + Option::Some(result610) + } + _ => panic() } - 22 => { - let lifted619 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + let lifted614 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { - let lifted617 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted613 = match (mbt_ffi_load8_u((iter_base) + 80)) { + 0 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() + @types.Role::Multimodal } + 1 => { - @types.ResultValuePayload::OkValue(lifted617) - } - 1 => { - - let lifted618 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @types.Role::UnstructuredText + } + 2 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() + @types.Role::UnstructuredBinary } + 3 => { + + let result612 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.ResultValuePayload::ErrValue(lifted618) + @types.Role::Other(result612) + } + _ => panic() } - _ => panic() - } - @types.SchemaValueNode::ResultValue(lifted619) + Option::Some(lifted613) + } + _ => panic() } - 23 => { - let result620 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + array615.push(@types.UnionBranch::{tag : result592, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted601, metadata : @types.MetadataEnvelope::{doc : lifted603, aliases : array605, examples : array608, deprecated : lifted611, role : lifted614}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let lifted622 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array615}) + } + 32 => { - let result621 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let lifted618 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - Option::Some(result621) - } - _ => panic() - } + let result617 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result620, language : lifted622}) + Option::Some(result617) } - 24 => { - - let result623 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + _ => panic() + } - let lifted625 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted618}) + } + 33 => { - let result624 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let lifted620 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - Option::Some(result624) - } - _ => panic() - } + let result619 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result623, mime_type : lifted625}) + Option::Some(result619) } - 25 => { + _ => panic() + } + + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted620}) + } + 34 => { - let result626 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted621 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::PathValue(result626) + Option::Some(mbt_ffi_load32((iter_base) + 12)) } - 26 => { + _ => panic() + } - let result627 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.SchemaTypeBody::FutureType(lifted621) + } + 35 => { - @types.SchemaValueNode::UrlValue(result627) - } - 27 => { + let lifted622 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + Option::Some(mbt_ffi_load32((iter_base) + 12)) } - 28 => { + _ => panic() + } - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) - } - 29 => { + @types.SchemaTypeBody::StreamType(lifted622) + } + _ => panic() + } - let result628 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let lifted625 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result628}) - } - 30 => { + let result624 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - let result629 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + Option::Some(result624) + } + _ => panic() + } - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result629, body : mbt_ffi_load32((iter_base) + 16)}) - } - 31 => { + let array627 : Array[String] = []; + for index628 = 0; index628 < (mbt_ffi_load32((iter_base) + 104)); index628 = index628 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index628 * 8) - let result630 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result626 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result630}) - } - 32 => { + array627.push(result626) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) - } - _ => panic() - } + let array630 : Array[String] = []; + for index631 = 0; index631 < (mbt_ffi_load32((iter_base) + 112)); index631 = index631 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index631 * 8) - array632.push(lifted631) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) + let result629 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @common.ToolError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array595, defs : array600, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array632, root : mbt_ffi_load32((return_area) + 40)}}) + array630.push(result629) } - _ => panic() - } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - RpcError::RemoteToolError(lifted634) - } - _ => panic() - } + let lifted633 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { - Result::Err(lifted635) - } - _ => panic() - } - let ret = lifted636 - mbt_ffi_free(address) - mbt_ffi_free(address210) - mbt_ffi_free(address216) - mbt_ffi_free(address288) - mbt_ffi_free(return_area) + let result632 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - cleanup_list.each(mbt_ffi_free) - return ret + Option::Some(result632) + } + _ => panic() + } -} -///| -pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @types.TypedSchemaValue, stdin : @streams.InputStream?) -> Result[Unit, RpcError] { - let cleanup_list : Array[Int] = [] + let lifted636 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { - let ToolRpc(handle) = self + let lifted635 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { - let address = mbt_ffi_malloc((command_path).length() * 8); - for index = 0; index < (command_path).length(); index = index + 1 { - let iter_elem : String = (command_path)[(index)] - let iter_base = address + (index * 8); + @types.Role::Multimodal + } + 1 => { - let ptr = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr) - cleanup_list.push(ptr) + @types.Role::UnstructuredText + } + 2 => { - } + @types.Role::UnstructuredBinary + } + 3 => { - let address210 = mbt_ffi_malloc((((input).graph).type_nodes).length() * 144); - for index211 = 0; index211 < (((input).graph).type_nodes).length(); index211 = index211 + 1 { - let iter_elem : @types.SchemaTypeNode = (((input).graph).type_nodes)[(index211)] - let iter_base = address210 + (index211 * 144); + let result634 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - match (iter_elem).body { - RefType(payload) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store32((iter_base) + 8, payload) + @types.Role::Other(result634) + } + _ => panic() + } - () - } - BoolType => { - mbt_ffi_store8((iter_base) + 0, (1)) + Option::Some(lifted635) + } + _ => panic() + } - () - } - S8Type => { - mbt_ffi_store8((iter_base) + 0, (2)) + array637.push(@types.SchemaTypeNode::{body : lifted623, metadata : @types.MetadataEnvelope::{doc : lifted625, aliases : array627, examples : array630, deprecated : lifted633, role : lifted636}}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 8)) - () - } - S16Type => { - mbt_ffi_store8((iter_base) + 0, (3)) + let array642 : Array[@types.SchemaTypeDef] = []; + for index643 = 0; index643 < (mbt_ffi_load32((return_area) + 20)); index643 = index643 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index643 * 24) - () - } - S32Type => { - mbt_ffi_store8((iter_base) + 0, (4)) + let result639 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - S64Type => { - mbt_ffi_store8((iter_base) + 0, (5)) + let lifted641 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - U8Type => { - mbt_ffi_store8((iter_base) + 0, (6)) + let result640 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - () - } - U16Type => { - mbt_ffi_store8((iter_base) + 0, (7)) + Option::Some(result640) + } + _ => panic() + } - () - } - U32Type => { - mbt_ffi_store8((iter_base) + 0, (8)) + array642.push(@types.SchemaTypeDef::{id : result639, name : lifted641, body : mbt_ffi_load32((iter_base) + 20)}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) - () - } - U64Type => { - mbt_ffi_store8((iter_base) + 0, (9)) + let array674 : Array[@types.SchemaValueNode] = []; + for index675 = 0; index675 < (mbt_ffi_load32((return_area) + 32)); index675 = index675 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 28)) + (index675 * 32) - () - } - F32Type => { - mbt_ffi_store8((iter_base) + 0, (10)) + let lifted673 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - () - } - F64Type => { - mbt_ffi_store8((iter_base) + 0, (11)) + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) + } + 1 => { - () - } - CharType => { - mbt_ffi_store8((iter_base) + 0, (12)) - - () - } - StringType => { - mbt_ffi_store8((iter_base) + 0, (13)) + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { - () - } - RecordType(payload13) => { - mbt_ffi_store8((iter_base) + 0, (14)) + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { - let address34 = mbt_ffi_malloc((payload13).length() * 68); - for index35 = 0; index35 < (payload13).length(); index35 = index35 + 1 { - let iter_elem : @types.NamedFieldType = (payload13)[(index35)] - let iter_base = address34 + (index35 * 68); + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { - let ptr14 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr14) - mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { - () - } - Some(payload16) => { - mbt_ffi_store8((iter_base) + 12, (1)) + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { - let ptr17 = mbt_ffi_str2ptr(payload16) - mbt_ffi_store32((iter_base) + 20, payload16.length()) - mbt_ffi_store32((iter_base) + 16, ptr17) - cleanup_list.push(ptr17) + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { - () - } - } + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { - let address19 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index20 = 0; index20 < (((iter_elem).metadata).aliases).length(); index20 = index20 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index20)] - let iter_base = address19 + (index20 * 8); + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { - let ptr18 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr18) - cleanup_list.push(ptr18) + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { - } - mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 24, address19) + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { - let address22 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index23 = 0; index23 < (((iter_elem).metadata).examples).length(); index23 = index23 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index23)] - let iter_base = address22 + (index23 * 8); + let result644 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let ptr21 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr21) - cleanup_list.push(ptr21) + @types.SchemaValueNode::StringValue(result644) + } + 13 => { - } - mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 32, address22) + let array645 : Array[Int] = []; + for index646 = 0; index646 < (mbt_ffi_load32((iter_base) + 12)); index646 = index646 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index646 * 4) - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 40, (0)) + array645.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - Some(payload25) => { - mbt_ffi_store8((iter_base) + 40, (1)) + @types.SchemaValueNode::RecordValue(array645) + } + 14 => { - let ptr26 = mbt_ffi_str2ptr(payload25) - mbt_ffi_store32((iter_base) + 48, payload25.length()) - mbt_ffi_store32((iter_base) + 44, ptr26) - cleanup_list.push(ptr26) + let lifted647 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - () - } - } + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 52, (0)) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted647}) + } + 15 => { - () - } - Some(payload28) => { - mbt_ffi_store8((iter_base) + 52, (1)) + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { - match payload28 { - Multimodal => { - mbt_ffi_store8((iter_base) + 56, (0)) + let array648 : Array[Bool] = []; + for index649 = 0; index649 < (mbt_ffi_load32((iter_base) + 12)); index649 = index649 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index649 * 1) - () + array648.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 56, (1)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 56, (2)) + @types.SchemaValueNode::FlagsValue(array648) + } + 17 => { - () + let array650 : Array[Int] = []; + for index651 = 0; index651 < (mbt_ffi_load32((iter_base) + 12)); index651 = index651 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index651 * 4) + + array650.push(mbt_ffi_load32((iter_base) + 0)) } - Other(payload32) => { - mbt_ffi_store8((iter_base) + 56, (3)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::TupleValue(array650) + } + 18 => { - let ptr33 = mbt_ffi_str2ptr(payload32) - mbt_ffi_store32((iter_base) + 64, payload32.length()) - mbt_ffi_store32((iter_base) + 60, ptr33) - cleanup_list.push(ptr33) + let array652 : Array[Int] = []; + for index653 = 0; index653 < (mbt_ffi_load32((iter_base) + 12)); index653 = index653 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index653 * 4) - () + array652.push(mbt_ffi_load32((iter_base) + 0)) } - } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - } - cleanup_list.push(ptr14) - cleanup_list.push(address19) - cleanup_list.push(address22) + @types.SchemaValueNode::ListValue(array652) + } + 19 => { - } - mbt_ffi_store32((iter_base) + 12, (payload13).length()) - mbt_ffi_store32((iter_base) + 8, address34) - cleanup_list.push(address34) + let array654 : Array[Int] = []; + for index655 = 0; index655 < (mbt_ffi_load32((iter_base) + 12)); index655 = index655 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index655 * 4) - () - } - VariantType(payload36) => { - mbt_ffi_store8((iter_base) + 0, (15)) + array654.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let address59 = mbt_ffi_malloc((payload36).length() * 72); - for index60 = 0; index60 < (payload36).length(); index60 = index60 + 1 { - let iter_elem : @types.VariantCaseType = (payload36)[(index60)] - let iter_base = address59 + (index60 * 72); + @types.SchemaValueNode::FixedListValue(array654) + } + 20 => { - let ptr37 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr37) + let array656 : Array[@types.MapEntry] = []; + for index657 = 0; index657 < (mbt_ffi_load32((iter_base) + 12)); index657 = index657 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index657 * 8) - match ((iter_elem).payload) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + array656.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - Some(payload39) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload39) + @types.SchemaValueNode::MapValue(array656) + } + 21 => { - () - } - } + let lifted658 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - () - } - Some(payload41) => { - mbt_ffi_store8((iter_base) + 16, (1)) + @types.SchemaValueNode::OptionValue(lifted658) + } + 22 => { - let ptr42 = mbt_ffi_str2ptr(payload41) - mbt_ffi_store32((iter_base) + 24, payload41.length()) - mbt_ffi_store32((iter_base) + 20, ptr42) - cleanup_list.push(ptr42) + let lifted661 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { - () - } - } + let lifted659 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - let address44 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index45 = 0; index45 < (((iter_elem).metadata).aliases).length(); index45 = index45 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index45)] - let iter_base = address44 + (index45 * 8); + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - let ptr43 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr43) - cleanup_list.push(ptr43) + @types.ResultValuePayload::OkValue(lifted659) + } + 1 => { - } - mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 28, address44) + let lifted660 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - let address47 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index48 = 0; index48 < (((iter_elem).metadata).examples).length(); index48 = index48 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index48)] - let iter_base = address47 + (index48 * 8); + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - let ptr46 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr46) - cleanup_list.push(ptr46) + @types.ResultValuePayload::ErrValue(lifted660) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 36, address47) + @types.SchemaValueNode::ResultValue(lifted661) + } + 23 => { - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 44, (0)) + let result662 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - () - } - Some(payload50) => { - mbt_ffi_store8((iter_base) + 44, (1)) + let lifted664 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let ptr51 = mbt_ffi_str2ptr(payload50) - mbt_ffi_store32((iter_base) + 52, payload50.length()) - mbt_ffi_store32((iter_base) + 48, ptr51) - cleanup_list.push(ptr51) + let result663 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - () - } - } + Option::Some(result663) + } + _ => panic() + } - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 56, (0)) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result662, language : lifted664}) + } + 24 => { - () - } - Some(payload53) => { - mbt_ffi_store8((iter_base) + 56, (1)) + let result665 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - match payload53 { - Multimodal => { - mbt_ffi_store8((iter_base) + 60, (0)) + let lifted667 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 60, (1)) + let result666 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - () + Option::Some(result666) + } + _ => panic() } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 60, (2)) - () - } - Other(payload57) => { - mbt_ffi_store8((iter_base) + 60, (3)) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result665, mime_type : lifted667}) + } + 25 => { - let ptr58 = mbt_ffi_str2ptr(payload57) - mbt_ffi_store32((iter_base) + 68, payload57.length()) - mbt_ffi_store32((iter_base) + 64, ptr58) - cleanup_list.push(ptr58) + let result668 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - () - } + @types.SchemaValueNode::PathValue(result668) } + 26 => { - () - } - } - cleanup_list.push(ptr37) - cleanup_list.push(address44) - cleanup_list.push(address47) - - } - mbt_ffi_store32((iter_base) + 12, (payload36).length()) - mbt_ffi_store32((iter_base) + 8, address59) - cleanup_list.push(address59) + let result669 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - () - } - EnumType(payload61) => { - mbt_ffi_store8((iter_base) + 0, (16)) + @types.SchemaValueNode::UrlValue(result669) + } + 27 => { - let address63 = mbt_ffi_malloc((payload61).length() * 8); - for index64 = 0; index64 < (payload61).length(); index64 = index64 + 1 { - let iter_elem : String = (payload61)[(index64)] - let iter_base = address63 + (index64 * 8); + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + } + 28 => { - let ptr62 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr62) - cleanup_list.push(ptr62) + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + } + 29 => { - } - mbt_ffi_store32((iter_base) + 12, (payload61).length()) - mbt_ffi_store32((iter_base) + 8, address63) - cleanup_list.push(address63) + let result670 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - () - } - FlagsType(payload65) => { - mbt_ffi_store8((iter_base) + 0, (17)) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result670}) + } + 30 => { - let address67 = mbt_ffi_malloc((payload65).length() * 8); - for index68 = 0; index68 < (payload65).length(); index68 = index68 + 1 { - let iter_elem : String = (payload65)[(index68)] - let iter_base = address67 + (index68 * 8); + let result671 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let ptr66 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr66) - cleanup_list.push(ptr66) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result671, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { - } - mbt_ffi_store32((iter_base) + 12, (payload65).length()) - mbt_ffi_store32((iter_base) + 8, address67) - cleanup_list.push(address67) + let result672 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - () - } - TupleType(payload69) => { - mbt_ffi_store8((iter_base) + 0, (18)) - - let address70 = mbt_ffi_malloc((payload69).length() * 4); - for index71 = 0; index71 < (payload69).length(); index71 = index71 + 1 { - let iter_elem : Int = (payload69)[(index71)] - let iter_base = address70 + (index71 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result672}) + } + 32 => { - } - mbt_ffi_store32((iter_base) + 12, (payload69).length()) - mbt_ffi_store32((iter_base) + 8, address70) - cleanup_list.push(address70) + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) + } + _ => panic() + } - () - } - ListType(payload72) => { - mbt_ffi_store8((iter_base) + 0, (19)) - mbt_ffi_store32((iter_base) + 8, payload72) + array674.push(lifted673) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 28)) - () + Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array637, defs : array642, root : mbt_ffi_load32((return_area) + 24)}, value : @types.SchemaValueTree::{value_nodes : array674, root : mbt_ffi_load32((return_area) + 36)}}) + } + _ => panic() } - FixedListType(payload73) => { - mbt_ffi_store8((iter_base) + 0, (20)) - mbt_ffi_store32((iter_base) + 8, (payload73).element) - mbt_ffi_store32((iter_base) + 12, ((payload73).length).reinterpret_as_int()) - () - } - MapType(payload74) => { - mbt_ffi_store8((iter_base) + 0, (21)) - mbt_ffi_store32((iter_base) + 8, (payload74).key) - mbt_ffi_store32((iter_base) + 12, (payload74).value) + let lifted677 : @streams.OutputStream? = match mbt_ffi_load8_u((return_area) + 40) { + 0 => Option::None + 1 => { - () + Option::Some(@streams.OutputStream::OutputStream(mbt_ffi_load32((return_area) + 44))) + } + _ => panic() } - OptionType(payload75) => { - mbt_ffi_store8((iter_base) + 0, (22)) - mbt_ffi_store32((iter_base) + 8, payload75) - () - } - ResultType(payload76) => { - mbt_ffi_store8((iter_base) + 0, (23)) + Result::Ok(@common.InvocationResult::{result : lifted676, stdout : lifted677}) + } + 1 => { - match ((payload76).ok) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted925 = match (mbt_ffi_load8_u((return_area) + 4)) { + 0 => { - () - } - Some(payload78) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload78) + let result678 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - () - } + RpcError::ProtocolError(result678) } + 1 => { - match ((payload76).err) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) - - () - } - Some(payload80) => { - mbt_ffi_store8((iter_base) + 16, (1)) - mbt_ffi_store32((iter_base) + 20, payload80) + let result679 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - () - } + RpcError::Denied(result679) } + 2 => { - () - } - TextType(payload81) => { - mbt_ffi_store8((iter_base) + 0, (24)) + let result680 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - match ((payload81).languages) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + RpcError::NotFound(result680) + } + 3 => { - () - } - Some(payload83) => { - mbt_ffi_store8((iter_base) + 8, (1)) + let result681 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - let address85 = mbt_ffi_malloc((payload83).length() * 8); - for index86 = 0; index86 < (payload83).length(); index86 = index86 + 1 { - let iter_elem : String = (payload83)[(index86)] - let iter_base = address85 + (index86 * 8); + RpcError::RemoteInternalError(result681) + } + 4 => { - let ptr84 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr84) - cleanup_list.push(ptr84) + let lifted924 = match (mbt_ffi_load8_u((return_area) + 8)) { + 0 => { - } - mbt_ffi_store32((iter_base) + 16, (payload83).length()) - mbt_ffi_store32((iter_base) + 12, address85) - cleanup_list.push(address85) + let result682 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - () - } - } + @common.ToolError::InvalidToolName(result682) + } + 1 => { - match ((payload81).min_length) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + let array684 : Array[String] = []; + for index685 = 0; index685 < (mbt_ffi_load32((return_area) + 16)); index685 = index685 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index685 * 8) - () - } - Some(payload88) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload88).reinterpret_as_int()) + let result683 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - } + array684.push(result683) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) - match ((payload81).max_length) { - None => { - mbt_ffi_store8((iter_base) + 28, (0)) + @common.ToolError::InvalidCommandPath(array684) + } + 2 => { - () - } - Some(payload90) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload90).reinterpret_as_int()) + let result686 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - () - } - } + @common.ToolError::InvalidInput(result686) + } + 3 => { - match ((payload81).regex) { - None => { - mbt_ffi_store8((iter_base) + 36, (0)) + let result687 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - () - } - Some(payload92) => { - mbt_ffi_store8((iter_base) + 36, (1)) + @common.ToolError::ConstraintViolation(result687) + } + 4 => { - let ptr93 = mbt_ffi_str2ptr(payload92) - mbt_ffi_store32((iter_base) + 44, payload92.length()) - mbt_ffi_store32((iter_base) + 40, ptr93) - cleanup_list.push(ptr93) + let result688 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - () - } - } + @common.ToolError::InvalidResult(result688) + } + 5 => { - () - } - BinaryType(payload94) => { - mbt_ffi_store8((iter_base) + 0, (25)) + let array885 : Array[@types.SchemaTypeNode] = []; + for index886 = 0; index886 < (mbt_ffi_load32((return_area) + 16)); index886 = index886 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index886 * 144) - match ((payload94).mime_types) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted871 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - () - } - Some(payload96) => { - mbt_ffi_store8((iter_base) + 8, (1)) + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { - let address98 = mbt_ffi_malloc((payload96).length() * 8); - for index99 = 0; index99 < (payload96).length(); index99 = index99 + 1 { - let iter_elem : String = (payload96)[(index99)] - let iter_base = address98 + (index99 * 8); + @types.SchemaTypeBody::BoolType + } + 2 => { - let ptr97 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr97) - cleanup_list.push(ptr97) + let lifted695 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 16, (payload96).length()) - mbt_ffi_store32((iter_base) + 12, address98) - cleanup_list.push(address98) + let lifted690 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - } + let lifted689 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - match ((payload94).min_bytes) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - Some(payload101) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload101).reinterpret_as_int()) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - match ((payload94).max_bytes) { - None => { - mbt_ffi_store8((iter_base) + 28, (0)) + Option::Some(lifted689) + } + _ => panic() + } - () - } - Some(payload103) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload103).reinterpret_as_int()) + let lifted692 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - } + let lifted691 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - PathType(payload104) => { - mbt_ffi_store8((iter_base) + 0, (26)) - mbt_ffi_store8((iter_base) + 8, (payload104).direction.ordinal()) - mbt_ffi_store8((iter_base) + 9, (payload104).kind.ordinal()) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - match ((payload104).allowed_mime_types) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - Some(payload106) => { - mbt_ffi_store8((iter_base) + 12, (1)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let address108 = mbt_ffi_malloc((payload106).length() * 8); - for index109 = 0; index109 < (payload106).length(); index109 = index109 + 1 { - let iter_elem : String = (payload106)[(index109)] - let iter_base = address108 + (index109 * 8); + Option::Some(lifted691) + } + _ => panic() + } - let ptr107 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr107) - cleanup_list.push(ptr107) + let lifted694 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 20, (payload106).length()) - mbt_ffi_store32((iter_base) + 16, address108) - cleanup_list.push(address108) + let result693 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - } + Option::Some(result693) + } + _ => panic() + } - match ((payload104).allowed_extensions) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + Option::Some(@types.NumericRestrictions::{min : lifted690, max : lifted692, unit : lifted694}) + } + _ => panic() + } - () - } - Some(payload111) => { - mbt_ffi_store8((iter_base) + 24, (1)) + @types.SchemaTypeBody::S8Type(lifted695) + } + 3 => { - let address113 = mbt_ffi_malloc((payload111).length() * 8); - for index114 = 0; index114 < (payload111).length(); index114 = index114 + 1 { - let iter_elem : String = (payload111)[(index114)] - let iter_base = address113 + (index114 * 8); + let lifted702 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr112 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr112) - cleanup_list.push(ptr112) + let lifted697 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 32, (payload111).length()) - mbt_ffi_store32((iter_base) + 28, address113) - cleanup_list.push(address113) + let lifted696 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - UrlType(payload115) => { - mbt_ffi_store8((iter_base) + 0, (27)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - match ((payload115).allowed_schemes) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload117) => { - mbt_ffi_store8((iter_base) + 8, (1)) + Option::Some(lifted696) + } + _ => panic() + } - let address119 = mbt_ffi_malloc((payload117).length() * 8); - for index120 = 0; index120 < (payload117).length(); index120 = index120 + 1 { - let iter_elem : String = (payload117)[(index120)] - let iter_base = address119 + (index120 * 8); + let lifted699 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let ptr118 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr118) - cleanup_list.push(ptr118) + let lifted698 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - } - mbt_ffi_store32((iter_base) + 16, (payload117).length()) - mbt_ffi_store32((iter_base) + 12, address119) - cleanup_list.push(address119) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - match ((payload115).allowed_hosts) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload122) => { - mbt_ffi_store8((iter_base) + 20, (1)) + Option::Some(lifted698) + } + _ => panic() + } - let address124 = mbt_ffi_malloc((payload122).length() * 8); - for index125 = 0; index125 < (payload122).length(); index125 = index125 + 1 { - let iter_elem : String = (payload122)[(index125)] - let iter_base = address124 + (index125 * 8); + let lifted701 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let ptr123 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr123) - cleanup_list.push(ptr123) + let result700 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - } - mbt_ffi_store32((iter_base) + 28, (payload122).length()) - mbt_ffi_store32((iter_base) + 24, address124) - cleanup_list.push(address124) - - () - } - } + Option::Some(result700) + } + _ => panic() + } - () - } - DatetimeType => { - mbt_ffi_store8((iter_base) + 0, (28)) + Option::Some(@types.NumericRestrictions::{min : lifted697, max : lifted699, unit : lifted701}) + } + _ => panic() + } - () - } - DurationType => { - mbt_ffi_store8((iter_base) + 0, (29)) + @types.SchemaTypeBody::S16Type(lifted702) + } + 4 => { - () - } - QuantityType(payload128) => { - mbt_ffi_store8((iter_base) + 0, (30)) + let lifted709 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr129 = mbt_ffi_str2ptr((payload128).base_unit) - mbt_ffi_store32((iter_base) + 12, (payload128).base_unit.length()) - mbt_ffi_store32((iter_base) + 8, ptr129) + let lifted704 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let address131 = mbt_ffi_malloc(((payload128).allowed_suffixes).length() * 8); - for index132 = 0; index132 < ((payload128).allowed_suffixes).length(); index132 = index132 + 1 { - let iter_elem : String = ((payload128).allowed_suffixes)[(index132)] - let iter_base = address131 + (index132 * 8); + let lifted703 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let ptr130 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr130) - cleanup_list.push(ptr130) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - } - mbt_ffi_store32((iter_base) + 20, ((payload128).allowed_suffixes).length()) - mbt_ffi_store32((iter_base) + 16, address131) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - match ((payload128).min) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload134) => { - mbt_ffi_store8((iter_base) + 24, (1)) - mbt_ffi_store64((iter_base) + 32, (payload134).mantissa) - mbt_ffi_store32((iter_base) + 40, (payload134).scale) + Option::Some(lifted703) + } + _ => panic() + } - let ptr135 = mbt_ffi_str2ptr((payload134).unit) - mbt_ffi_store32((iter_base) + 48, (payload134).unit.length()) - mbt_ffi_store32((iter_base) + 44, ptr135) - cleanup_list.push(ptr135) + let lifted706 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - } + let lifted705 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - match ((payload128).max) { - None => { - mbt_ffi_store8((iter_base) + 56, (0)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - Some(payload137) => { - mbt_ffi_store8((iter_base) + 56, (1)) - mbt_ffi_store64((iter_base) + 64, (payload137).mantissa) - mbt_ffi_store32((iter_base) + 72, (payload137).scale) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let ptr138 = mbt_ffi_str2ptr((payload137).unit) - mbt_ffi_store32((iter_base) + 80, (payload137).unit.length()) - mbt_ffi_store32((iter_base) + 76, ptr138) - cleanup_list.push(ptr138) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - } - cleanup_list.push(ptr129) - cleanup_list.push(address131) + Option::Some(lifted705) + } + _ => panic() + } - () - } - UnionType(payload139) => { - mbt_ffi_store8((iter_base) + 0, (31)) + let lifted708 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let address175 = mbt_ffi_malloc(((payload139).branches).length() * 92); - for index176 = 0; index176 < ((payload139).branches).length(); index176 = index176 + 1 { - let iter_elem : @types.UnionBranch = ((payload139).branches)[(index176)] - let iter_base = address175 + (index176 * 92); + let result707 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let ptr140 = mbt_ffi_str2ptr((iter_elem).tag) - mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) - mbt_ffi_store32((iter_base) + 0, ptr140) - mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + Option::Some(result707) + } + _ => panic() + } - match (iter_elem).discriminator { - Prefix(payload141) => { - mbt_ffi_store8((iter_base) + 12, (0)) + Option::Some(@types.NumericRestrictions::{min : lifted704, max : lifted706, unit : lifted708}) + } + _ => panic() + } - let ptr142 = mbt_ffi_str2ptr(payload141) - mbt_ffi_store32((iter_base) + 20, payload141.length()) - mbt_ffi_store32((iter_base) + 16, ptr142) - cleanup_list.push(ptr142) + @types.SchemaTypeBody::S32Type(lifted709) + } + 5 => { - () - } - Suffix(payload143) => { - mbt_ffi_store8((iter_base) + 12, (1)) + let lifted716 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr144 = mbt_ffi_str2ptr(payload143) - mbt_ffi_store32((iter_base) + 20, payload143.length()) - mbt_ffi_store32((iter_base) + 16, ptr144) - cleanup_list.push(ptr144) + let lifted711 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - Contains(payload145) => { - mbt_ffi_store8((iter_base) + 12, (2)) + let lifted710 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let ptr146 = mbt_ffi_str2ptr(payload145) - mbt_ffi_store32((iter_base) + 20, payload145.length()) - mbt_ffi_store32((iter_base) + 16, ptr146) - cleanup_list.push(ptr146) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - Regex(payload147) => { - mbt_ffi_store8((iter_base) + 12, (3)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let ptr148 = mbt_ffi_str2ptr(payload147) - mbt_ffi_store32((iter_base) + 20, payload147.length()) - mbt_ffi_store32((iter_base) + 16, ptr148) - cleanup_list.push(ptr148) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - FieldEquals(payload149) => { - mbt_ffi_store8((iter_base) + 12, (4)) + Option::Some(lifted710) + } + _ => panic() + } - let ptr150 = mbt_ffi_str2ptr((payload149).field_name) - mbt_ffi_store32((iter_base) + 20, (payload149).field_name.length()) - mbt_ffi_store32((iter_base) + 16, ptr150) + let lifted713 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - match ((payload149).literal) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + let lifted712 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - Some(payload152) => { - mbt_ffi_store8((iter_base) + 24, (1)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let ptr153 = mbt_ffi_str2ptr(payload152) - mbt_ffi_store32((iter_base) + 32, payload152.length()) - mbt_ffi_store32((iter_base) + 28, ptr153) - cleanup_list.push(ptr153) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - } - cleanup_list.push(ptr150) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - FieldAbsent(payload154) => { - mbt_ffi_store8((iter_base) + 12, (5)) + Option::Some(lifted712) + } + _ => panic() + } - let ptr155 = mbt_ffi_str2ptr(payload154) - mbt_ffi_store32((iter_base) + 20, payload154.length()) - mbt_ffi_store32((iter_base) + 16, ptr155) - cleanup_list.push(ptr155) + let lifted715 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - } + let result714 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 36, (0)) + Option::Some(result714) + } + _ => panic() + } - () - } - Some(payload157) => { - mbt_ffi_store8((iter_base) + 36, (1)) + Option::Some(@types.NumericRestrictions::{min : lifted711, max : lifted713, unit : lifted715}) + } + _ => panic() + } - let ptr158 = mbt_ffi_str2ptr(payload157) - mbt_ffi_store32((iter_base) + 44, payload157.length()) - mbt_ffi_store32((iter_base) + 40, ptr158) - cleanup_list.push(ptr158) + @types.SchemaTypeBody::S64Type(lifted716) + } + 6 => { - () - } - } + let lifted723 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let address160 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index161 = 0; index161 < (((iter_elem).metadata).aliases).length(); index161 = index161 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index161)] - let iter_base = address160 + (index161 * 8); + let lifted718 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let ptr159 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr159) - cleanup_list.push(ptr159) + let lifted717 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - } - mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 48, address160) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let address163 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index164 = 0; index164 < (((iter_elem).metadata).examples).length(); index164 = index164 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index164)] - let iter_base = address163 + (index164 * 8); + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let ptr162 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr162) - cleanup_list.push(ptr162) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 56, address163) + Option::Some(lifted717) + } + _ => panic() + } - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 64, (0)) + let lifted720 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - Some(payload166) => { - mbt_ffi_store8((iter_base) + 64, (1)) + let lifted719 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let ptr167 = mbt_ffi_str2ptr(payload166) - mbt_ffi_store32((iter_base) + 72, payload166.length()) - mbt_ffi_store32((iter_base) + 68, ptr167) - cleanup_list.push(ptr167) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 76, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload169) => { - mbt_ffi_store8((iter_base) + 76, (1)) + Option::Some(lifted719) + } + _ => panic() + } - match payload169 { - Multimodal => { - mbt_ffi_store8((iter_base) + 80, (0)) + let lifted722 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 80, (1)) + let result721 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 80, (2)) + Option::Some(result721) + } + _ => panic() + } - () - } - Other(payload173) => { - mbt_ffi_store8((iter_base) + 80, (3)) + Option::Some(@types.NumericRestrictions::{min : lifted718, max : lifted720, unit : lifted722}) + } + _ => panic() + } - let ptr174 = mbt_ffi_str2ptr(payload173) - mbt_ffi_store32((iter_base) + 88, payload173.length()) - mbt_ffi_store32((iter_base) + 84, ptr174) - cleanup_list.push(ptr174) + @types.SchemaTypeBody::U8Type(lifted723) + } + 7 => { - () - } - } + let lifted730 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - } - cleanup_list.push(ptr140) - cleanup_list.push(address160) - cleanup_list.push(address163) + let lifted725 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, ((payload139).branches).length()) - mbt_ffi_store32((iter_base) + 8, address175) - cleanup_list.push(address175) + let lifted724 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - SecretType(payload177) => { - mbt_ffi_store8((iter_base) + 0, (32)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - match ((payload177).category) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - Some(payload179) => { - mbt_ffi_store8((iter_base) + 8, (1)) - - let ptr180 = mbt_ffi_str2ptr(payload179) - mbt_ffi_store32((iter_base) + 16, payload179.length()) - mbt_ffi_store32((iter_base) + 12, ptr180) - cleanup_list.push(ptr180) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - } + Option::Some(lifted724) + } + _ => panic() + } - () - } - QuotaTokenType(payload181) => { - mbt_ffi_store8((iter_base) + 0, (33)) + let lifted727 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - match ((payload181).resource_name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted726 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - Some(payload183) => { - mbt_ffi_store8((iter_base) + 8, (1)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let ptr184 = mbt_ffi_str2ptr(payload183) - mbt_ffi_store32((iter_base) + 16, payload183.length()) - mbt_ffi_store32((iter_base) + 12, ptr184) - cleanup_list.push(ptr184) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - FutureType(payload185) => { - mbt_ffi_store8((iter_base) + 0, (34)) + Option::Some(lifted726) + } + _ => panic() + } - match (payload185) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted729 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - Some(payload187) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload187) + let result728 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - } + Option::Some(result728) + } + _ => panic() + } - () - } - StreamType(payload188) => { - mbt_ffi_store8((iter_base) + 0, (35)) + Option::Some(@types.NumericRestrictions::{min : lifted725, max : lifted727, unit : lifted729}) + } + _ => panic() + } - match (payload188) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.SchemaTypeBody::U16Type(lifted730) + } + 8 => { - () - } - Some(payload190) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload190) + let lifted737 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - } + let lifted732 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - } + let lifted731 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 88, (0)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - Some(payload192) => { - mbt_ffi_store8((iter_base) + 88, (1)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let ptr193 = mbt_ffi_str2ptr(payload192) - mbt_ffi_store32((iter_base) + 96, payload192.length()) - mbt_ffi_store32((iter_base) + 92, ptr193) - cleanup_list.push(ptr193) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - } + Option::Some(lifted731) + } + _ => panic() + } - let address195 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index196 = 0; index196 < (((iter_elem).metadata).aliases).length(); index196 = index196 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index196)] - let iter_base = address195 + (index196 * 8); + let lifted734 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let ptr194 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr194) - cleanup_list.push(ptr194) + let lifted733 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - } - mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 100, address195) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let address198 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index199 = 0; index199 < (((iter_elem).metadata).examples).length(); index199 = index199 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index199)] - let iter_base = address198 + (index199 * 8); + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let ptr197 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr197) - cleanup_list.push(ptr197) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 108, address198) + Option::Some(lifted733) + } + _ => panic() + } - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 116, (0)) + let lifted736 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - Some(payload201) => { - mbt_ffi_store8((iter_base) + 116, (1)) + let result735 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let ptr202 = mbt_ffi_str2ptr(payload201) - mbt_ffi_store32((iter_base) + 124, payload201.length()) - mbt_ffi_store32((iter_base) + 120, ptr202) - cleanup_list.push(ptr202) + Option::Some(result735) + } + _ => panic() + } - () - } - } + Option::Some(@types.NumericRestrictions::{min : lifted732, max : lifted734, unit : lifted736}) + } + _ => panic() + } - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 128, (0)) + @types.SchemaTypeBody::U32Type(lifted737) + } + 9 => { - () - } - Some(payload204) => { - mbt_ffi_store8((iter_base) + 128, (1)) + let lifted744 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - match payload204 { - Multimodal => { - mbt_ffi_store8((iter_base) + 132, (0)) + let lifted739 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 132, (1)) + let lifted738 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 132, (2)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - Other(payload208) => { - mbt_ffi_store8((iter_base) + 132, (3)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let ptr209 = mbt_ffi_str2ptr(payload208) - mbt_ffi_store32((iter_base) + 140, payload208.length()) - mbt_ffi_store32((iter_base) + 136, ptr209) - cleanup_list.push(ptr209) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - } + Option::Some(lifted738) + } + _ => panic() + } - () - } - } - cleanup_list.push(address195) - cleanup_list.push(address198) + let lifted741 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - } + let lifted740 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let address216 = mbt_ffi_malloc((((input).graph).defs).length() * 24); - for index217 = 0; index217 < (((input).graph).defs).length(); index217 = index217 + 1 { - let iter_elem : @types.SchemaTypeDef = (((input).graph).defs)[(index217)] - let iter_base = address216 + (index217 * 24); + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let ptr212 = mbt_ffi_str2ptr((iter_elem).id) - mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) - mbt_ffi_store32((iter_base) + 0, ptr212) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - match ((iter_elem).name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - Some(payload214) => { - mbt_ffi_store8((iter_base) + 8, (1)) + Option::Some(lifted740) + } + _ => panic() + } - let ptr215 = mbt_ffi_str2ptr(payload214) - mbt_ffi_store32((iter_base) + 16, payload214.length()) - mbt_ffi_store32((iter_base) + 12, ptr215) - cleanup_list.push(ptr215) + let lifted743 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - } - mbt_ffi_store32((iter_base) + 20, (iter_elem).body) - cleanup_list.push(ptr212) + let result742 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - } + Option::Some(result742) + } + _ => panic() + } - let address288 = mbt_ffi_malloc((((input).value).value_nodes).length() * 32); - for index289 = 0; index289 < (((input).value).value_nodes).length(); index289 = index289 + 1 { - let iter_elem : @types.SchemaValueNode = (((input).value).value_nodes)[(index289)] - let iter_base = address288 + (index289 * 32); + Option::Some(@types.NumericRestrictions::{min : lifted739, max : lifted741, unit : lifted743}) + } + _ => panic() + } - match iter_elem { - BoolValue(payload218) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload218 { 1 } else { 0 })) + @types.SchemaTypeBody::U64Type(lifted744) + } + 10 => { - () - } - S8Value(payload219) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload219)) + let lifted751 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - S16Value(payload220) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload220)) + let lifted746 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - S32Value(payload221) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload221) + let lifted745 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - () - } - S64Value(payload222) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload222) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - () - } - U8Value(payload223) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload223).to_int()) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - U16Value(payload224) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload224).reinterpret_as_int()) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - U32Value(payload225) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload225).reinterpret_as_int()) + Option::Some(lifted745) + } + _ => panic() + } - () - } - U64Value(payload226) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload226).reinterpret_as_int64()) + let lifted748 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - F32Value(payload227) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload227) + let lifted747 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - () - } - F64Value(payload228) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload228) - - () - } - CharValue(payload229) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload229).to_int()) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - () - } - StringValue(payload230) => { - mbt_ffi_store8((iter_base) + 0, (12)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let ptr231 = mbt_ffi_str2ptr(payload230) - mbt_ffi_store32((iter_base) + 12, payload230.length()) - mbt_ffi_store32((iter_base) + 8, ptr231) - cleanup_list.push(ptr231) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - () - } - RecordValue(payload232) => { - mbt_ffi_store8((iter_base) + 0, (13)) + Option::Some(lifted747) + } + _ => panic() + } - let address233 = mbt_ffi_malloc((payload232).length() * 4); - for index234 = 0; index234 < (payload232).length(); index234 = index234 + 1 { - let iter_elem : Int = (payload232)[(index234)] - let iter_base = address233 + (index234 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted750 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload232).length()) - mbt_ffi_store32((iter_base) + 8, address233) - cleanup_list.push(address233) + let result749 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - () - } - VariantValue(payload235) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload235).case).reinterpret_as_int()) + Option::Some(result749) + } + _ => panic() + } - match ((payload235).payload) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + Option::Some(@types.NumericRestrictions::{min : lifted746, max : lifted748, unit : lifted750}) + } + _ => panic() + } - () - } - Some(payload237) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload237) + @types.SchemaTypeBody::F32Type(lifted751) + } + 11 => { - () - } - } + let lifted758 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - EnumValue(payload238) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload238).reinterpret_as_int()) + let lifted753 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - FlagsValue(payload239) => { - mbt_ffi_store8((iter_base) + 0, (16)) + let lifted752 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let address240 = mbt_ffi_malloc((payload239).length() * 1); - for index241 = 0; index241 < (payload239).length(); index241 = index241 + 1 { - let iter_elem : Bool = (payload239)[(index241)] - let iter_base = address240 + (index241 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload239).length()) - mbt_ffi_store32((iter_base) + 8, address240) - cleanup_list.push(address240) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - () - } - TupleValue(payload242) => { - mbt_ffi_store8((iter_base) + 0, (17)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let address243 = mbt_ffi_malloc((payload242).length() * 4); - for index244 = 0; index244 < (payload242).length(); index244 = index244 + 1 { - let iter_elem : Int = (payload242)[(index244)] - let iter_base = address243 + (index244 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + Option::Some(lifted752) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload242).length()) - mbt_ffi_store32((iter_base) + 8, address243) - cleanup_list.push(address243) + let lifted755 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - ListValue(payload245) => { - mbt_ffi_store8((iter_base) + 0, (18)) + let lifted754 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let address246 = mbt_ffi_malloc((payload245).length() * 4); - for index247 = 0; index247 < (payload245).length(); index247 = index247 + 1 { - let iter_elem : Int = (payload245)[(index247)] - let iter_base = address246 + (index247 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload245).length()) - mbt_ffi_store32((iter_base) + 8, address246) - cleanup_list.push(address246) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - () - } - FixedListValue(payload248) => { - mbt_ffi_store8((iter_base) + 0, (19)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let address249 = mbt_ffi_malloc((payload248).length() * 4); - for index250 = 0; index250 < (payload248).length(); index250 = index250 + 1 { - let iter_elem : Int = (payload248)[(index250)] - let iter_base = address249 + (index250 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + Option::Some(lifted754) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload248).length()) - mbt_ffi_store32((iter_base) + 8, address249) - cleanup_list.push(address249) + let lifted757 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - () - } - MapValue(payload251) => { - mbt_ffi_store8((iter_base) + 0, (20)) + let result756 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let address252 = mbt_ffi_malloc((payload251).length() * 8); - for index253 = 0; index253 < (payload251).length(); index253 = index253 + 1 { - let iter_elem : @types.MapEntry = (payload251)[(index253)] - let iter_base = address252 + (index253 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + Option::Some(result756) + } + _ => panic() + } - } - mbt_ffi_store32((iter_base) + 12, (payload251).length()) - mbt_ffi_store32((iter_base) + 8, address252) - cleanup_list.push(address252) + Option::Some(@types.NumericRestrictions::{min : lifted753, max : lifted755, unit : lifted757}) + } + _ => panic() + } - () - } - OptionValue(payload254) => { - mbt_ffi_store8((iter_base) + 0, (21)) + @types.SchemaTypeBody::F64Type(lifted758) + } + 12 => { - match (payload254) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.SchemaTypeBody::CharType + } + 13 => { - () - } - Some(payload256) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload256) + @types.SchemaTypeBody::StringType + } + 14 => { - () - } - } + let array773 : Array[@types.NamedFieldType] = []; + for index774 = 0; index774 < (mbt_ffi_load32((iter_base) + 12)); index774 = index774 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index774 * 68) - () - } - ResultValue(payload257) => { - mbt_ffi_store8((iter_base) + 0, (22)) + let result759 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - match payload257 { - OkValue(payload258) => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted761 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - match (payload258) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let result760 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - () - } - Some(payload260) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload260) + Option::Some(result760) + } + _ => panic() + } - () - } - } + let array763 : Array[String] = []; + for index764 = 0; index764 < (mbt_ffi_load32((iter_base) + 28)); index764 = index764 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index764 * 8) - () - } - ErrValue(payload261) => { - mbt_ffi_store8((iter_base) + 8, (1)) + let result762 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - match (payload261) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + array763.push(result762) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - () - } - Some(payload263) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload263) + let array766 : Array[String] = []; + for index767 = 0; index767 < (mbt_ffi_load32((iter_base) + 36)); index767 = index767 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index767 * 8) - () - } - } + let result765 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - } + array766.push(result765) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - () - } - TextValue(payload264) => { - mbt_ffi_store8((iter_base) + 0, (23)) + let lifted769 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let ptr265 = mbt_ffi_str2ptr((payload264).text) - mbt_ffi_store32((iter_base) + 12, (payload264).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr265) + let result768 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - match ((payload264).language) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + Option::Some(result768) + } + _ => panic() + } - () - } - Some(payload267) => { - mbt_ffi_store8((iter_base) + 16, (1)) + let lifted772 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { - let ptr268 = mbt_ffi_str2ptr(payload267) - mbt_ffi_store32((iter_base) + 24, payload267.length()) - mbt_ffi_store32((iter_base) + 20, ptr268) - cleanup_list.push(ptr268) + let lifted771 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { - () - } - } - cleanup_list.push(ptr265) + @types.Role::Multimodal + } + 1 => { - () - } - BinaryValue(payload269) => { - mbt_ffi_store8((iter_base) + 0, (24)) + @types.Role::UnstructuredText + } + 2 => { - let ptr270 = mbt_ffi_bytes2ptr((payload269).bytes) + @types.Role::UnstructuredBinary + } + 3 => { - mbt_ffi_store32((iter_base) + 12, (payload269).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr270) + let result770 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - match ((payload269).mime_type) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + @types.Role::Other(result770) + } + _ => panic() + } - () - } - Some(payload272) => { - mbt_ffi_store8((iter_base) + 16, (1)) + Option::Some(lifted771) + } + _ => panic() + } - let ptr273 = mbt_ffi_str2ptr(payload272) - mbt_ffi_store32((iter_base) + 24, payload272.length()) - mbt_ffi_store32((iter_base) + 20, ptr273) - cleanup_list.push(ptr273) + array773.push(@types.NamedFieldType::{name : result759, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted761, aliases : array763, examples : array766, deprecated : lifted769, role : lifted772}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - } - cleanup_list.push(ptr270) + @types.SchemaTypeBody::RecordType(array773) + } + 15 => { - () - } - PathValue(payload274) => { - mbt_ffi_store8((iter_base) + 0, (25)) + let array790 : Array[@types.VariantCaseType] = []; + for index791 = 0; index791 < (mbt_ffi_load32((iter_base) + 12)); index791 = index791 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index791 * 72) - let ptr275 = mbt_ffi_str2ptr(payload274) - mbt_ffi_store32((iter_base) + 12, payload274.length()) - mbt_ffi_store32((iter_base) + 8, ptr275) - cleanup_list.push(ptr275) + let result775 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - UrlValue(payload276) => { - mbt_ffi_store8((iter_base) + 0, (26)) + let lifted776 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr277 = mbt_ffi_str2ptr(payload276) - mbt_ffi_store32((iter_base) + 12, payload276.length()) - mbt_ffi_store32((iter_base) + 8, ptr277) - cleanup_list.push(ptr277) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - () - } - DatetimeValue(payload278) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload278).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload278).nanoseconds).reinterpret_as_int()) + let lifted778 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - DurationValue(payload279) => { - mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload279).nanoseconds) + let result777 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - () - } - QuantityValueNode(payload280) => { - mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload280).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload280).scale) + Option::Some(result777) + } + _ => panic() + } - let ptr281 = mbt_ffi_str2ptr((payload280).unit) - mbt_ffi_store32((iter_base) + 24, (payload280).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr281) - cleanup_list.push(ptr281) + let array780 : Array[String] = []; + for index781 = 0; index781 < (mbt_ffi_load32((iter_base) + 32)); index781 = index781 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index781 * 8) - () - } - UnionValue(payload282) => { - mbt_ffi_store8((iter_base) + 0, (30)) + let result779 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let ptr283 = mbt_ffi_str2ptr((payload282).tag) - mbt_ffi_store32((iter_base) + 12, (payload282).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr283) - mbt_ffi_store32((iter_base) + 16, (payload282).body) - cleanup_list.push(ptr283) + array780.push(result779) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - () - } - SecretValue(payload284) => { - mbt_ffi_store8((iter_base) + 0, (31)) + let array783 : Array[String] = []; + for index784 = 0; index784 < (mbt_ffi_load32((iter_base) + 40)); index784 = index784 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index784 * 8) - let ptr285 = mbt_ffi_str2ptr((payload284).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload284).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr285) - cleanup_list.push(ptr285) + let result782 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - QuotaTokenHandle(payload286) => { - mbt_ffi_store8((iter_base) + 0, (32)) + array783.push(result782) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let @types.QuotaToken(handle287) = payload286 - mbt_ffi_store32((iter_base) + 8, handle287) - - () - } - } - - } - - let (lowered, lowered293) = match (stdin) { - None => { - - ((0), 0) - } - Some(payload291) => { - - let @streams.InputStream(handle292) = payload291 - - ((1), handle292) - } - } - let return_area = mbt_ffi_malloc(44) - wasmImportMethodToolRpcInvoke(handle, address, (command_path).length(), address210, (((input).graph).type_nodes).length(), address216, (((input).graph).defs).length(), ((input).graph).root, address288, (((input).value).value_nodes).length(), ((input).value).root, lowered, lowered293, return_area); - - let lifted469 = match (mbt_ffi_load8_u((return_area) + 0)) { - 0 => { - - Result::Ok(()) - } - 1 => { - - let lifted468 = match (mbt_ffi_load8_u((return_area) + 4)) { - 0 => { - - let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - - RpcError::ProtocolError(result) - } - 1 => { - - let result294 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - - RpcError::Denied(result294) - } - 2 => { - - let result295 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - - RpcError::NotFound(result295) - } - 3 => { - - let result296 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) - - RpcError::RemoteInternalError(result296) - } - 4 => { - - let lifted467 = match (mbt_ffi_load8_u((return_area) + 8)) { - 0 => { - - let result297 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - - @common.ToolError::InvalidToolName(result297) - } - 1 => { - - let array : Array[String] = []; - for index299 = 0; index299 < (mbt_ffi_load32((return_area) + 16)); index299 = index299 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index299 * 8) - - let result298 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array.push(result298) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) - - @common.ToolError::InvalidCommandPath(array) - } - 2 => { - - let result300 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - - @common.ToolError::InvalidInput(result300) - } - 3 => { - - let result301 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - - @common.ToolError::ConstraintViolation(result301) - } - 4 => { - - let result302 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - - @common.ToolError::InvalidResult(result302) - } - 5 => { - - let array428 : Array[@types.SchemaTypeNode] = []; - for index429 = 0; index429 < (mbt_ffi_load32((return_area) + 16)); index429 = index429 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index429 * 144) - - let lifted414 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { - - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { - - @types.SchemaTypeBody::BoolType - } - 2 => { - - @types.SchemaTypeBody::S8Type - } - 3 => { - - @types.SchemaTypeBody::S16Type - } - 4 => { - - @types.SchemaTypeBody::S32Type - } - 5 => { - - @types.SchemaTypeBody::S64Type - } - 6 => { - - @types.SchemaTypeBody::U8Type - } - 7 => { - - @types.SchemaTypeBody::U16Type - } - 8 => { - - @types.SchemaTypeBody::U32Type - } - 9 => { - - @types.SchemaTypeBody::U64Type - } - 10 => { - - @types.SchemaTypeBody::F32Type - } - 11 => { - - @types.SchemaTypeBody::F64Type - } - 12 => { - - @types.SchemaTypeBody::CharType - } - 13 => { - - @types.SchemaTypeBody::StringType - } - 14 => { - - let array316 : Array[@types.NamedFieldType] = []; - for index317 = 0; index317 < (mbt_ffi_load32((iter_base) + 12)); index317 = index317 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index317 * 68) - - let result303 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - let lifted : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { - - let result304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - - Option::Some(result304) - } - _ => panic() - } - - let array306 : Array[String] = []; - for index307 = 0; index307 < (mbt_ffi_load32((iter_base) + 28)); index307 = index307 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index307 * 8) - - let result305 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array306.push(result305) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - - let array309 : Array[String] = []; - for index310 = 0; index310 < (mbt_ffi_load32((iter_base) + 36)); index310 = index310 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index310 * 8) - - let result308 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array309.push(result308) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - - let lifted312 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { - - let result311 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - - Option::Some(result311) - } - _ => panic() - } - - let lifted315 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None - 1 => { - - let lifted314 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { - - @types.Role::Multimodal - } - 1 => { - - @types.Role::UnstructuredText - } - 2 => { - - @types.Role::UnstructuredBinary - } - 3 => { - - let result313 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - - @types.Role::Other(result313) - } - _ => panic() - } - - Option::Some(lifted314) - } - _ => panic() - } - - array316.push(@types.NamedFieldType::{name : result303, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted, aliases : array306, examples : array309, deprecated : lifted312, role : lifted315}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - - @types.SchemaTypeBody::RecordType(array316) - } - 15 => { - - let array333 : Array[@types.VariantCaseType] = []; - for index334 = 0; index334 < (mbt_ffi_load32((iter_base) + 12)); index334 = index334 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index334 * 72) - - let result318 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - let lifted319 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { - - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } - - let lifted321 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { - - let result320 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - - Option::Some(result320) - } - _ => panic() - } - - let array323 : Array[String] = []; - for index324 = 0; index324 < (mbt_ffi_load32((iter_base) + 32)); index324 = index324 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index324 * 8) - - let result322 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array323.push(result322) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - - let array326 : Array[String] = []; - for index327 = 0; index327 < (mbt_ffi_load32((iter_base) + 40)); index327 = index327 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index327 * 8) - - let result325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array326.push(result325) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - - let lifted329 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted786 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result328 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result785 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result328) + Option::Some(result785) } _ => panic() } - let lifted332 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted789 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted331 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted788 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -15773,63 +16746,63 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty } 3 => { - let result330 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result787 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result330) + @types.Role::Other(result787) } _ => panic() } - Option::Some(lifted331) + Option::Some(lifted788) } _ => panic() } - array333.push(@types.VariantCaseType::{name : result318, payload : lifted319, metadata : @types.MetadataEnvelope::{doc : lifted321, aliases : array323, examples : array326, deprecated : lifted329, role : lifted332}}) + array790.push(@types.VariantCaseType::{name : result775, payload : lifted776, metadata : @types.MetadataEnvelope::{doc : lifted778, aliases : array780, examples : array783, deprecated : lifted786, role : lifted789}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array333) + @types.SchemaTypeBody::VariantType(array790) } 16 => { - let array336 : Array[String] = []; - for index337 = 0; index337 < (mbt_ffi_load32((iter_base) + 12)); index337 = index337 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index337 * 8) + let array793 : Array[String] = []; + for index794 = 0; index794 < (mbt_ffi_load32((iter_base) + 12)); index794 = index794 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index794 * 8) - let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result792 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array336.push(result335) + array793.push(result792) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array336) + @types.SchemaTypeBody::EnumType(array793) } 17 => { - let array339 : Array[String] = []; - for index340 = 0; index340 < (mbt_ffi_load32((iter_base) + 12)); index340 = index340 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index340 * 8) + let array796 : Array[String] = []; + for index797 = 0; index797 < (mbt_ffi_load32((iter_base) + 12)); index797 = index797 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index797 * 8) - let result338 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result795 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array339.push(result338) + array796.push(result795) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array339) + @types.SchemaTypeBody::FlagsType(array796) } 18 => { - let array341 : Array[Int] = []; - for index342 = 0; index342 < (mbt_ffi_load32((iter_base) + 12)); index342 = index342 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index342 * 4) + let array798 : Array[Int] = []; + for index799 = 0; index799 < (mbt_ffi_load32((iter_base) + 12)); index799 = index799 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index799 * 4) - array341.push(mbt_ffi_load32((iter_base) + 0)) + array798.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array341) + @types.SchemaTypeBody::TupleType(array798) } 19 => { @@ -15849,7 +16822,7 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty } 23 => { - let lifted343 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted800 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -15858,7 +16831,7 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - let lifted344 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted801 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -15867,30 +16840,30 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted343, err : lifted344}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted800, err : lifted801}) } 24 => { - let lifted348 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted805 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array346 : Array[String] = []; - for index347 = 0; index347 < (mbt_ffi_load32((iter_base) + 16)); index347 = index347 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index347 * 8) + let array803 : Array[String] = []; + for index804 = 0; index804 < (mbt_ffi_load32((iter_base) + 16)); index804 = index804 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index804 * 8) - let result345 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result802 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array346.push(result345) + array803.push(result802) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array346) + Option::Some(array803) } _ => panic() } - let lifted349 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted806 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -15899,7 +16872,7 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - let lifted350 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted807 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -15908,41 +16881,41 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - let lifted352 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted809 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result351 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result808 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result351) + Option::Some(result808) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted348, min_length : lifted349, max_length : lifted350, regex : lifted352}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted805, min_length : lifted806, max_length : lifted807, regex : lifted809}) } 25 => { - let lifted356 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted813 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array354 : Array[String] = []; - for index355 = 0; index355 < (mbt_ffi_load32((iter_base) + 16)); index355 = index355 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index355 * 8) + let array811 : Array[String] = []; + for index812 = 0; index812 < (mbt_ffi_load32((iter_base) + 16)); index812 = index812 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index812 * 8) - let result353 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result810 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array354.push(result353) + array811.push(result810) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array354) + Option::Some(array811) } _ => panic() } - let lifted357 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted814 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -15951,7 +16924,7 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - let lifted358 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted815 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -15960,91 +16933,91 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted356, min_bytes : lifted357, max_bytes : lifted358}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted813, min_bytes : lifted814, max_bytes : lifted815}) } 26 => { - let lifted362 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted819 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array360 : Array[String] = []; - for index361 = 0; index361 < (mbt_ffi_load32((iter_base) + 20)); index361 = index361 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index361 * 8) + let array817 : Array[String] = []; + for index818 = 0; index818 < (mbt_ffi_load32((iter_base) + 20)); index818 = index818 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index818 * 8) - let result359 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result816 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array360.push(result359) + array817.push(result816) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array360) + Option::Some(array817) } _ => panic() } - let lifted366 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted823 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array364 : Array[String] = []; - for index365 = 0; index365 < (mbt_ffi_load32((iter_base) + 32)); index365 = index365 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index365 * 8) + let array821 : Array[String] = []; + for index822 = 0; index822 < (mbt_ffi_load32((iter_base) + 32)); index822 = index822 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index822 * 8) - let result363 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result820 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array364.push(result363) + array821.push(result820) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array364) + Option::Some(array821) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted362, allowed_extensions : lifted366}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted819, allowed_extensions : lifted823}) } 27 => { - let lifted370 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted827 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array368 : Array[String] = []; - for index369 = 0; index369 < (mbt_ffi_load32((iter_base) + 16)); index369 = index369 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index369 * 8) + let array825 : Array[String] = []; + for index826 = 0; index826 < (mbt_ffi_load32((iter_base) + 16)); index826 = index826 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index826 * 8) - let result367 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result824 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array368.push(result367) + array825.push(result824) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array368) + Option::Some(array825) } _ => panic() } - let lifted374 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted831 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array372 : Array[String] = []; - for index373 = 0; index373 < (mbt_ffi_load32((iter_base) + 28)); index373 = index373 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index373 * 8) + let array829 : Array[String] = []; + for index830 = 0; index830 < (mbt_ffi_load32((iter_base) + 28)); index830 = index830 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index830 * 8) - let result371 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result828 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array372.push(result371) + array829.push(result828) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array372) + Option::Some(array829) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted370, allowed_hosts : lifted374}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted827, allowed_hosts : lifted831}) } 28 => { @@ -16056,148 +17029,148 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty } 30 => { - let result375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result832 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array377 : Array[String] = []; - for index378 = 0; index378 < (mbt_ffi_load32((iter_base) + 20)); index378 = index378 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index378 * 8) + let array834 : Array[String] = []; + for index835 = 0; index835 < (mbt_ffi_load32((iter_base) + 20)); index835 = index835 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index835 * 8) - let result376 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result833 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array377.push(result376) + array834.push(result833) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted380 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted837 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result379 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result836 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result379}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result836}) } _ => panic() } - let lifted382 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted839 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result381 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result838 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result381}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result838}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result375, allowed_suffixes : array377, min : lifted380, max : lifted382}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result832, allowed_suffixes : array834, min : lifted837, max : lifted839}) } 31 => { - let array406 : Array[@types.UnionBranch] = []; - for index407 = 0; index407 < (mbt_ffi_load32((iter_base) + 12)); index407 = index407 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index407 * 92) + let array863 : Array[@types.UnionBranch] = []; + for index864 = 0; index864 < (mbt_ffi_load32((iter_base) + 12)); index864 = index864 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index864 * 92) - let result383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result840 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted392 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted849 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result384 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result841 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result384) + @types.DiscriminatorRule::Prefix(result841) } 1 => { - let result385 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result842 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result385) + @types.DiscriminatorRule::Suffix(result842) } 2 => { - let result386 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result843 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result386) + @types.DiscriminatorRule::Contains(result843) } 3 => { - let result387 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result844 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result387) + @types.DiscriminatorRule::Regex(result844) } 4 => { - let result388 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result845 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted390 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted847 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result389 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result846 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result389) + Option::Some(result846) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result388, literal : lifted390}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result845, literal : lifted847}) } 5 => { - let result391 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result848 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result391) + @types.DiscriminatorRule::FieldAbsent(result848) } _ => panic() } - let lifted394 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted851 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result850 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result393) + Option::Some(result850) } _ => panic() } - let array396 : Array[String] = []; - for index397 = 0; index397 < (mbt_ffi_load32((iter_base) + 52)); index397 = index397 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index397 * 8) + let array853 : Array[String] = []; + for index854 = 0; index854 < (mbt_ffi_load32((iter_base) + 52)); index854 = index854 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index854 * 8) - let result395 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result852 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array396.push(result395) + array853.push(result852) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array399 : Array[String] = []; - for index400 = 0; index400 < (mbt_ffi_load32((iter_base) + 60)); index400 = index400 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index400 * 8) + let array856 : Array[String] = []; + for index857 = 0; index857 < (mbt_ffi_load32((iter_base) + 60)); index857 = index857 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index857 * 8) - let result398 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result855 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array399.push(result398) + array856.push(result855) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted402 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted859 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result401 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result858 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result401) + Option::Some(result858) } _ => panic() } - let lifted405 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted862 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted404 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted861 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -16212,57 +17185,57 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty } 3 => { - let result403 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result860 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result403) + @types.Role::Other(result860) } _ => panic() } - Option::Some(lifted404) + Option::Some(lifted861) } _ => panic() } - array406.push(@types.UnionBranch::{tag : result383, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted392, metadata : @types.MetadataEnvelope::{doc : lifted394, aliases : array396, examples : array399, deprecated : lifted402, role : lifted405}}) + array863.push(@types.UnionBranch::{tag : result840, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted849, metadata : @types.MetadataEnvelope::{doc : lifted851, aliases : array853, examples : array856, deprecated : lifted859, role : lifted862}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array406}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array863}) } 32 => { - let lifted409 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted866 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result408 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result865 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result408) + Option::Some(result865) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted409}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted866}) } 33 => { - let lifted411 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted868 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result410 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result867 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result410) + Option::Some(result867) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted411}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted868}) } 34 => { - let lifted412 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted869 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -16271,11 +17244,11 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - @types.SchemaTypeBody::FutureType(lifted412) + @types.SchemaTypeBody::FutureType(lifted869) } 35 => { - let lifted413 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted870 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -16284,58 +17257,58 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - @types.SchemaTypeBody::StreamType(lifted413) + @types.SchemaTypeBody::StreamType(lifted870) } _ => panic() } - let lifted416 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted873 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result872 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result415) + Option::Some(result872) } _ => panic() } - let array418 : Array[String] = []; - for index419 = 0; index419 < (mbt_ffi_load32((iter_base) + 104)); index419 = index419 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index419 * 8) + let array875 : Array[String] = []; + for index876 = 0; index876 < (mbt_ffi_load32((iter_base) + 104)); index876 = index876 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index876 * 8) - let result417 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result874 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array418.push(result417) + array875.push(result874) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array421 : Array[String] = []; - for index422 = 0; index422 < (mbt_ffi_load32((iter_base) + 112)); index422 = index422 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index422 * 8) + let array878 : Array[String] = []; + for index879 = 0; index879 < (mbt_ffi_load32((iter_base) + 112)); index879 = index879 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index879 * 8) - let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result877 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array421.push(result420) + array878.push(result877) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted424 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted881 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result423 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result880 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result423) + Option::Some(result880) } _ => panic() } - let lifted427 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted884 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted426 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted883 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -16350,48 +17323,48 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty } 3 => { - let result425 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result882 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result425) + @types.Role::Other(result882) } _ => panic() } - Option::Some(lifted426) + Option::Some(lifted883) } _ => panic() } - array428.push(@types.SchemaTypeNode::{body : lifted414, metadata : @types.MetadataEnvelope::{doc : lifted416, aliases : array418, examples : array421, deprecated : lifted424, role : lifted427}}) + array885.push(@types.SchemaTypeNode::{body : lifted871, metadata : @types.MetadataEnvelope::{doc : lifted873, aliases : array875, examples : array878, deprecated : lifted881, role : lifted884}}) } mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) - let array433 : Array[@types.SchemaTypeDef] = []; - for index434 = 0; index434 < (mbt_ffi_load32((return_area) + 24)); index434 = index434 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index434 * 24) + let array890 : Array[@types.SchemaTypeDef] = []; + for index891 = 0; index891 < (mbt_ffi_load32((return_area) + 24)); index891 = index891 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index891 * 24) - let result430 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result887 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted432 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted889 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result431 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result888 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result431) + Option::Some(result888) } _ => panic() } - array433.push(@types.SchemaTypeDef::{id : result430, name : lifted432, body : mbt_ffi_load32((iter_base) + 20)}) + array890.push(@types.SchemaTypeDef::{id : result887, name : lifted889, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((return_area) + 20)) - let array465 : Array[@types.SchemaValueNode] = []; - for index466 = 0; index466 < (mbt_ffi_load32((return_area) + 36)); index466 = index466 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index466 * 32) + let array922 : Array[@types.SchemaValueNode] = []; + for index923 = 0; index923 < (mbt_ffi_load32((return_area) + 36)); index923 = index923 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index923 * 32) - let lifted464 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted921 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -16442,25 +17415,25 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty } 12 => { - let result435 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result892 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result435) + @types.SchemaValueNode::StringValue(result892) } 13 => { - let array436 : Array[Int] = []; - for index437 = 0; index437 < (mbt_ffi_load32((iter_base) + 12)); index437 = index437 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index437 * 4) + let array893 : Array[Int] = []; + for index894 = 0; index894 < (mbt_ffi_load32((iter_base) + 12)); index894 = index894 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index894 * 4) - array436.push(mbt_ffi_load32((iter_base) + 0)) + array893.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array436) + @types.SchemaValueNode::RecordValue(array893) } 14 => { - let lifted438 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted895 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -16469,7 +17442,7 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted438}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted895}) } 15 => { @@ -16477,67 +17450,67 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty } 16 => { - let array439 : Array[Bool] = []; - for index440 = 0; index440 < (mbt_ffi_load32((iter_base) + 12)); index440 = index440 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index440 * 1) + let array896 : Array[Bool] = []; + for index897 = 0; index897 < (mbt_ffi_load32((iter_base) + 12)); index897 = index897 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index897 * 1) - array439.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array896.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array439) + @types.SchemaValueNode::FlagsValue(array896) } 17 => { - let array441 : Array[Int] = []; - for index442 = 0; index442 < (mbt_ffi_load32((iter_base) + 12)); index442 = index442 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index442 * 4) + let array898 : Array[Int] = []; + for index899 = 0; index899 < (mbt_ffi_load32((iter_base) + 12)); index899 = index899 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index899 * 4) - array441.push(mbt_ffi_load32((iter_base) + 0)) + array898.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array441) + @types.SchemaValueNode::TupleValue(array898) } 18 => { - let array443 : Array[Int] = []; - for index444 = 0; index444 < (mbt_ffi_load32((iter_base) + 12)); index444 = index444 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index444 * 4) + let array900 : Array[Int] = []; + for index901 = 0; index901 < (mbt_ffi_load32((iter_base) + 12)); index901 = index901 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index901 * 4) - array443.push(mbt_ffi_load32((iter_base) + 0)) + array900.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array443) + @types.SchemaValueNode::ListValue(array900) } 19 => { - let array445 : Array[Int] = []; - for index446 = 0; index446 < (mbt_ffi_load32((iter_base) + 12)); index446 = index446 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index446 * 4) + let array902 : Array[Int] = []; + for index903 = 0; index903 < (mbt_ffi_load32((iter_base) + 12)); index903 = index903 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index903 * 4) - array445.push(mbt_ffi_load32((iter_base) + 0)) + array902.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array445) + @types.SchemaValueNode::FixedListValue(array902) } 20 => { - let array447 : Array[@types.MapEntry] = []; - for index448 = 0; index448 < (mbt_ffi_load32((iter_base) + 12)); index448 = index448 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index448 * 8) + let array904 : Array[@types.MapEntry] = []; + for index905 = 0; index905 < (mbt_ffi_load32((iter_base) + 12)); index905 = index905 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index905 * 8) - array447.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array904.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array447) + @types.SchemaValueNode::MapValue(array904) } 21 => { - let lifted449 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted906 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -16546,14 +17519,14 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - @types.SchemaValueNode::OptionValue(lifted449) + @types.SchemaValueNode::OptionValue(lifted906) } 22 => { - let lifted452 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted909 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted450 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted907 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -16562,11 +17535,11 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - @types.ResultValuePayload::OkValue(lifted450) + @types.ResultValuePayload::OkValue(lifted907) } 1 => { - let lifted451 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted908 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -16575,58 +17548,58 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - @types.ResultValuePayload::ErrValue(lifted451) + @types.ResultValuePayload::ErrValue(lifted908) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted452) + @types.SchemaValueNode::ResultValue(lifted909) } 23 => { - let result453 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result910 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted455 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted912 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result454 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result911 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result454) + Option::Some(result911) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result453, language : lifted455}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result910, language : lifted912}) } 24 => { - let result456 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result913 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted458 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted915 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result457 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result914 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result457) + Option::Some(result914) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result456, mime_type : lifted458}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result913, mime_type : lifted915}) } 25 => { - let result459 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result916 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result459) + @types.SchemaValueNode::PathValue(result916) } 26 => { - let result460 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result917 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result460) + @types.SchemaValueNode::UrlValue(result917) } 27 => { @@ -16638,21 +17611,21 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty } 29 => { - let result461 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result918 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result461}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result918}) } 30 => { - let result462 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result919 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result462, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result919, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result463 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result920 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result463}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result920}) } 32 => { @@ -16661,29 +17634,29 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty _ => panic() } - array465.push(lifted464) + array922.push(lifted921) } mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) - @common.ToolError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array428, defs : array433, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array465, root : mbt_ffi_load32((return_area) + 40)}}) + @common.ToolError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array885, defs : array890, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array922, root : mbt_ffi_load32((return_area) + 40)}}) } _ => panic() } - RpcError::RemoteToolError(lifted467) + RpcError::RemoteToolError(lifted924) } _ => panic() } - Result::Err(lifted468) + Result::Err(lifted925) } _ => panic() } - let ret = lifted469 + let ret = lifted926 mbt_ffi_free(address) - mbt_ffi_free(address210) - mbt_ffi_free(address216) - mbt_ffi_free(address288) + mbt_ffi_free(address360) + mbt_ffi_free(address366) + mbt_ffi_free(address438) mbt_ffi_free(return_area) cleanup_list.each(mbt_ffi_free) @@ -16691,7 +17664,7 @@ pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @ty } ///| -pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[String], input : @types.TypedSchemaValue, stdin : @streams.InputStream?) -> FutureInvokeResult { +pub fn ToolRpc::invoke(self : ToolRpc, command_path : Array[String], input : @types.TypedSchemaValue, stdin : @streams.InputStream?) -> Result[Unit, RpcError] { let cleanup_list : Array[Int] = [] let ToolRpc(handle) = self @@ -16708,10 +17681,10 @@ pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[Stri } - let address210 = mbt_ffi_malloc((((input).graph).type_nodes).length() * 144); - for index211 = 0; index211 < (((input).graph).type_nodes).length(); index211 = index211 + 1 { - let iter_elem : @types.SchemaTypeNode = (((input).graph).type_nodes)[(index211)] - let iter_base = address210 + (index211 * 144); + let address360 = mbt_ffi_malloc((((input).graph).type_nodes).length() * 144); + for index361 = 0; index361 < (((input).graph).type_nodes).length(); index361 = index361 + 1 { + let iter_elem : @types.SchemaTypeNode = (((input).graph).type_nodes)[(index361)] + let iter_base = address360 + (index361 * 144); match (iter_elem).body { RefType(payload) => { @@ -16725,443 +17698,519 @@ pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[Stri () } - S8Type => { + S8Type(payload1) => { mbt_ffi_store8((iter_base) + 0, (2)) - () - } - S16Type => { - mbt_ffi_store8((iter_base) + 0, (3)) + match (payload1) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - () - } - S32Type => { - mbt_ffi_store8((iter_base) + 0, (4)) + () + } + Some(payload3) => { + mbt_ffi_store8((iter_base) + 8, (1)) - () - } - S64Type => { - mbt_ffi_store8((iter_base) + 0, (5)) + match ((payload3).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - U8Type => { - mbt_ffi_store8((iter_base) + 0, (6)) + () + } + Some(payload5) => { + mbt_ffi_store8((iter_base) + 16, (1)) - () - } - U16Type => { - mbt_ffi_store8((iter_base) + 0, (7)) + match payload5 { + Signed(payload6) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload6) - () - } - U32Type => { - mbt_ffi_store8((iter_base) + 0, (8)) + () + } + Unsigned(payload7) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload7).reinterpret_as_int64()) - () - } - U64Type => { - mbt_ffi_store8((iter_base) + 0, (9)) + () + } + FloatBits(payload8) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload8).reinterpret_as_int64()) - () - } - F32Type => { - mbt_ffi_store8((iter_base) + 0, (10)) + () + } + } - () - } - F64Type => { - mbt_ffi_store8((iter_base) + 0, (11)) + () + } + } - () - } - CharType => { - mbt_ffi_store8((iter_base) + 0, (12)) + match ((payload3).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - StringType => { - mbt_ffi_store8((iter_base) + 0, (13)) + () + } + Some(payload10) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () - } - RecordType(payload13) => { - mbt_ffi_store8((iter_base) + 0, (14)) + match payload10 { + Signed(payload11) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload11) - let address34 = mbt_ffi_malloc((payload13).length() * 68); - for index35 = 0; index35 < (payload13).length(); index35 = index35 + 1 { - let iter_elem : @types.NamedFieldType = (payload13)[(index35)] - let iter_base = address34 + (index35 * 68); + () + } + Unsigned(payload12) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload12).reinterpret_as_int64()) - let ptr14 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr14) - mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + () + } + FloatBits(payload13) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload13).reinterpret_as_int64()) - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + () + } + } - () + () + } } - Some(payload16) => { - mbt_ffi_store8((iter_base) + 12, (1)) - let ptr17 = mbt_ffi_str2ptr(payload16) - mbt_ffi_store32((iter_base) + 20, payload16.length()) - mbt_ffi_store32((iter_base) + 16, ptr17) - cleanup_list.push(ptr17) + match ((payload3).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () + () + } + Some(payload15) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr16 = mbt_ffi_str2ptr(payload15) + mbt_ffi_store32((iter_base) + 72, payload15.length()) + mbt_ffi_store32((iter_base) + 68, ptr16) + cleanup_list.push(ptr16) + + () + } } + + () } + } - let address19 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index20 = 0; index20 < (((iter_elem).metadata).aliases).length(); index20 = index20 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index20)] - let iter_base = address19 + (index20 * 8); + () + } + S16Type(payload17) => { + mbt_ffi_store8((iter_base) + 0, (3)) - let ptr18 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr18) - cleanup_list.push(ptr18) + match (payload17) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + () } - mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 24, address19) + Some(payload19) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let address22 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index23 = 0; index23 < (((iter_elem).metadata).examples).length(); index23 = index23 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index23)] - let iter_base = address22 + (index23 * 8); + match ((payload19).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr21 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr21) - cleanup_list.push(ptr21) + () + } + Some(payload21) => { + mbt_ffi_store8((iter_base) + 16, (1)) - } - mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 32, address22) + match payload21 { + Signed(payload22) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload22) - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 40, (0)) + () + } + Unsigned(payload23) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload23).reinterpret_as_int64()) - () - } - Some(payload25) => { - mbt_ffi_store8((iter_base) + 40, (1)) + () + } + FloatBits(payload24) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload24).reinterpret_as_int64()) - let ptr26 = mbt_ffi_str2ptr(payload25) - mbt_ffi_store32((iter_base) + 48, payload25.length()) - mbt_ffi_store32((iter_base) + 44, ptr26) - cleanup_list.push(ptr26) + () + } + } - () + () + } } - } - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 52, (0)) + match ((payload19).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - Some(payload28) => { - mbt_ffi_store8((iter_base) + 52, (1)) + () + } + Some(payload26) => { + mbt_ffi_store8((iter_base) + 40, (1)) - match payload28 { - Multimodal => { - mbt_ffi_store8((iter_base) + 56, (0)) + match payload26 { + Signed(payload27) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload27) - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 56, (1)) + () + } + Unsigned(payload28) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload28).reinterpret_as_int64()) - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 56, (2)) + () + } + FloatBits(payload29) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload29).reinterpret_as_int64()) - () + () + } } - Other(payload32) => { - mbt_ffi_store8((iter_base) + 56, (3)) - let ptr33 = mbt_ffi_str2ptr(payload32) - mbt_ffi_store32((iter_base) + 64, payload32.length()) - mbt_ffi_store32((iter_base) + 60, ptr33) - cleanup_list.push(ptr33) + () + } + } - () - } + match ((payload19).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () } + Some(payload31) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () + let ptr32 = mbt_ffi_str2ptr(payload31) + mbt_ffi_store32((iter_base) + 72, payload31.length()) + mbt_ffi_store32((iter_base) + 68, ptr32) + cleanup_list.push(ptr32) + + () + } } - } - cleanup_list.push(ptr14) - cleanup_list.push(address19) - cleanup_list.push(address22) + () + } } - mbt_ffi_store32((iter_base) + 12, (payload13).length()) - mbt_ffi_store32((iter_base) + 8, address34) - cleanup_list.push(address34) () } - VariantType(payload36) => { - mbt_ffi_store8((iter_base) + 0, (15)) + S32Type(payload33) => { + mbt_ffi_store8((iter_base) + 0, (4)) - let address59 = mbt_ffi_malloc((payload36).length() * 72); - for index60 = 0; index60 < (payload36).length(); index60 = index60 + 1 { - let iter_elem : @types.VariantCaseType = (payload36)[(index60)] - let iter_base = address59 + (index60 * 72); + match (payload33) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let ptr37 = mbt_ffi_str2ptr((iter_elem).name) - mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) - mbt_ffi_store32((iter_base) + 0, ptr37) + () + } + Some(payload35) => { + mbt_ffi_store8((iter_base) + 8, (1)) - match ((iter_elem).payload) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + match ((payload35).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - Some(payload39) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload39) + () + } + Some(payload37) => { + mbt_ffi_store8((iter_base) + 16, (1)) - () - } - } + match payload37 { + Signed(payload38) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload38) - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + () + } + Unsigned(payload39) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload39).reinterpret_as_int64()) - () - } - Some(payload41) => { - mbt_ffi_store8((iter_base) + 16, (1)) + () + } + FloatBits(payload40) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload40).reinterpret_as_int64()) - let ptr42 = mbt_ffi_str2ptr(payload41) - mbt_ffi_store32((iter_base) + 24, payload41.length()) - mbt_ffi_store32((iter_base) + 20, ptr42) - cleanup_list.push(ptr42) + () + } + } - () + () + } } - } - - let address44 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index45 = 0; index45 < (((iter_elem).metadata).aliases).length(); index45 = index45 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index45)] - let iter_base = address44 + (index45 * 8); - let ptr43 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr43) - cleanup_list.push(ptr43) + match ((payload35).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - } - mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 28, address44) + () + } + Some(payload42) => { + mbt_ffi_store8((iter_base) + 40, (1)) - let address47 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index48 = 0; index48 < (((iter_elem).metadata).examples).length(); index48 = index48 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index48)] - let iter_base = address47 + (index48 * 8); + match payload42 { + Signed(payload43) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload43) - let ptr46 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr46) - cleanup_list.push(ptr46) + () + } + Unsigned(payload44) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload44).reinterpret_as_int64()) - } - mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 36, address47) + () + } + FloatBits(payload45) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload45).reinterpret_as_int64()) - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 44, (0)) + () + } + } - () + () + } } - Some(payload50) => { - mbt_ffi_store8((iter_base) + 44, (1)) - let ptr51 = mbt_ffi_str2ptr(payload50) - mbt_ffi_store32((iter_base) + 52, payload50.length()) - mbt_ffi_store32((iter_base) + 48, ptr51) - cleanup_list.push(ptr51) + match ((payload35).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () + () + } + Some(payload47) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr48 = mbt_ffi_str2ptr(payload47) + mbt_ffi_store32((iter_base) + 72, payload47.length()) + mbt_ffi_store32((iter_base) + 68, ptr48) + cleanup_list.push(ptr48) + + () + } } + + () } + } - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 56, (0)) + () + } + S64Type(payload49) => { + mbt_ffi_store8((iter_base) + 0, (5)) - () - } - Some(payload53) => { - mbt_ffi_store8((iter_base) + 56, (1)) + match (payload49) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - match payload53 { - Multimodal => { - mbt_ffi_store8((iter_base) + 60, (0)) + () + } + Some(payload51) => { + mbt_ffi_store8((iter_base) + 8, (1)) - () - } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 60, (1)) + match ((payload51).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 60, (2)) + () + } + Some(payload53) => { + mbt_ffi_store8((iter_base) + 16, (1)) - () - } - Other(payload57) => { - mbt_ffi_store8((iter_base) + 60, (3)) + match payload53 { + Signed(payload54) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload54) + + () + } + Unsigned(payload55) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload55).reinterpret_as_int64()) - let ptr58 = mbt_ffi_str2ptr(payload57) - mbt_ffi_store32((iter_base) + 68, payload57.length()) - mbt_ffi_store32((iter_base) + 64, ptr58) - cleanup_list.push(ptr58) + () + } + FloatBits(payload56) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload56).reinterpret_as_int64()) - () + () + } } - } - () + () + } } - } - cleanup_list.push(ptr37) - cleanup_list.push(address44) - cleanup_list.push(address47) - } - mbt_ffi_store32((iter_base) + 12, (payload36).length()) - mbt_ffi_store32((iter_base) + 8, address59) - cleanup_list.push(address59) + match ((payload51).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - EnumType(payload61) => { - mbt_ffi_store8((iter_base) + 0, (16)) + () + } + Some(payload58) => { + mbt_ffi_store8((iter_base) + 40, (1)) - let address63 = mbt_ffi_malloc((payload61).length() * 8); - for index64 = 0; index64 < (payload61).length(); index64 = index64 + 1 { - let iter_elem : String = (payload61)[(index64)] - let iter_base = address63 + (index64 * 8); + match payload58 { + Signed(payload59) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload59) - let ptr62 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr62) - cleanup_list.push(ptr62) + () + } + Unsigned(payload60) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload60).reinterpret_as_int64()) - } - mbt_ffi_store32((iter_base) + 12, (payload61).length()) - mbt_ffi_store32((iter_base) + 8, address63) - cleanup_list.push(address63) + () + } + FloatBits(payload61) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload61).reinterpret_as_int64()) - () - } - FlagsType(payload65) => { - mbt_ffi_store8((iter_base) + 0, (17)) + () + } + } - let address67 = mbt_ffi_malloc((payload65).length() * 8); - for index68 = 0; index68 < (payload65).length(); index68 = index68 + 1 { - let iter_elem : String = (payload65)[(index68)] - let iter_base = address67 + (index68 * 8); + () + } + } - let ptr66 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr66) - cleanup_list.push(ptr66) + match ((payload51).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - } - mbt_ffi_store32((iter_base) + 12, (payload65).length()) - mbt_ffi_store32((iter_base) + 8, address67) - cleanup_list.push(address67) + () + } + Some(payload63) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () - } - TupleType(payload69) => { - mbt_ffi_store8((iter_base) + 0, (18)) + let ptr64 = mbt_ffi_str2ptr(payload63) + mbt_ffi_store32((iter_base) + 72, payload63.length()) + mbt_ffi_store32((iter_base) + 68, ptr64) + cleanup_list.push(ptr64) - let address70 = mbt_ffi_malloc((payload69).length() * 4); - for index71 = 0; index71 < (payload69).length(); index71 = index71 + 1 { - let iter_elem : Int = (payload69)[(index71)] - let iter_base = address70 + (index71 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + () + } + } + () + } } - mbt_ffi_store32((iter_base) + 12, (payload69).length()) - mbt_ffi_store32((iter_base) + 8, address70) - cleanup_list.push(address70) () } - ListType(payload72) => { - mbt_ffi_store8((iter_base) + 0, (19)) - mbt_ffi_store32((iter_base) + 8, payload72) + U8Type(payload65) => { + mbt_ffi_store8((iter_base) + 0, (6)) - () - } - FixedListType(payload73) => { - mbt_ffi_store8((iter_base) + 0, (20)) - mbt_ffi_store32((iter_base) + 8, (payload73).element) - mbt_ffi_store32((iter_base) + 12, ((payload73).length).reinterpret_as_int()) + match (payload65) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - () - } - MapType(payload74) => { - mbt_ffi_store8((iter_base) + 0, (21)) - mbt_ffi_store32((iter_base) + 8, (payload74).key) - mbt_ffi_store32((iter_base) + 12, (payload74).value) + () + } + Some(payload67) => { + mbt_ffi_store8((iter_base) + 8, (1)) - () - } - OptionType(payload75) => { - mbt_ffi_store8((iter_base) + 0, (22)) - mbt_ffi_store32((iter_base) + 8, payload75) + match ((payload67).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - ResultType(payload76) => { - mbt_ffi_store8((iter_base) + 0, (23)) + () + } + Some(payload69) => { + mbt_ffi_store8((iter_base) + 16, (1)) - match ((payload76).ok) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + match payload69 { + Signed(payload70) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload70) - () - } - Some(payload78) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload78) + () + } + Unsigned(payload71) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload71).reinterpret_as_int64()) - () - } - } + () + } + FloatBits(payload72) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload72).reinterpret_as_int64()) - match ((payload76).err) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + () + } + } - () - } - Some(payload80) => { - mbt_ffi_store8((iter_base) + 16, (1)) - mbt_ffi_store32((iter_base) + 20, payload80) + () + } + } + + match ((payload67).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload74) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload74 { + Signed(payload75) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload75) + + () + } + Unsigned(payload76) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload76).reinterpret_as_int64()) + + () + } + FloatBits(payload77) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload77).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload67).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload79) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr80 = mbt_ffi_str2ptr(payload79) + mbt_ffi_store32((iter_base) + 72, payload79.length()) + mbt_ffi_store32((iter_base) + 68, ptr80) + cleanup_list.push(ptr80) + + () + } + } () } @@ -17169,10 +18218,10 @@ pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[Stri () } - TextType(payload81) => { - mbt_ffi_store8((iter_base) + 0, (24)) + U16Type(payload81) => { + mbt_ffi_store8((iter_base) + 0, (7)) - match ((payload81).languages) { + match (payload81) { None => { mbt_ffi_store8((iter_base) + 8, (0)) @@ -17181,66 +18230,91 @@ pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[Stri Some(payload83) => { mbt_ffi_store8((iter_base) + 8, (1)) - let address85 = mbt_ffi_malloc((payload83).length() * 8); - for index86 = 0; index86 < (payload83).length(); index86 = index86 + 1 { - let iter_elem : String = (payload83)[(index86)] - let iter_base = address85 + (index86 * 8); + match ((payload83).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - let ptr84 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr84) - cleanup_list.push(ptr84) + () + } + Some(payload85) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload85 { + Signed(payload86) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload86) + + () + } + Unsigned(payload87) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload87).reinterpret_as_int64()) + () + } + FloatBits(payload88) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload88).reinterpret_as_int64()) + + () + } + } + + () + } } - mbt_ffi_store32((iter_base) + 16, (payload83).length()) - mbt_ffi_store32((iter_base) + 12, address85) - cleanup_list.push(address85) - () - } - } + match ((payload83).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - match ((payload81).min_length) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + () + } + Some(payload90) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () - } - Some(payload88) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload88).reinterpret_as_int()) + match payload90 { + Signed(payload91) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload91) - () - } - } + () + } + Unsigned(payload92) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload92).reinterpret_as_int64()) - match ((payload81).max_length) { - None => { - mbt_ffi_store8((iter_base) + 28, (0)) + () + } + FloatBits(payload93) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload93).reinterpret_as_int64()) - () - } - Some(payload90) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload90).reinterpret_as_int()) + () + } + } - () - } - } + () + } + } - match ((payload81).regex) { - None => { - mbt_ffi_store8((iter_base) + 36, (0)) + match ((payload83).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - () - } - Some(payload92) => { - mbt_ffi_store8((iter_base) + 36, (1)) + () + } + Some(payload95) => { + mbt_ffi_store8((iter_base) + 64, (1)) - let ptr93 = mbt_ffi_str2ptr(payload92) - mbt_ffi_store32((iter_base) + 44, payload92.length()) - mbt_ffi_store32((iter_base) + 40, ptr93) - cleanup_list.push(ptr93) + let ptr96 = mbt_ffi_str2ptr(payload95) + mbt_ffi_store32((iter_base) + 72, payload95.length()) + mbt_ffi_store32((iter_base) + 68, ptr96) + cleanup_list.push(ptr96) + + () + } + } () } @@ -17248,123 +18322,103 @@ pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[Stri () } - BinaryType(payload94) => { - mbt_ffi_store8((iter_base) + 0, (25)) + U32Type(payload97) => { + mbt_ffi_store8((iter_base) + 0, (8)) - match ((payload94).mime_types) { + match (payload97) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload96) => { + Some(payload99) => { mbt_ffi_store8((iter_base) + 8, (1)) - let address98 = mbt_ffi_malloc((payload96).length() * 8); - for index99 = 0; index99 < (payload96).length(); index99 = index99 + 1 { - let iter_elem : String = (payload96)[(index99)] - let iter_base = address98 + (index99 * 8); - - let ptr97 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr97) - cleanup_list.push(ptr97) - - } - mbt_ffi_store32((iter_base) + 16, (payload96).length()) - mbt_ffi_store32((iter_base) + 12, address98) - cleanup_list.push(address98) + match ((payload99).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - } + () + } + Some(payload101) => { + mbt_ffi_store8((iter_base) + 16, (1)) - match ((payload94).min_bytes) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + match payload101 { + Signed(payload102) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload102) - () - } - Some(payload101) => { - mbt_ffi_store8((iter_base) + 20, (1)) - mbt_ffi_store32((iter_base) + 24, (payload101).reinterpret_as_int()) + () + } + Unsigned(payload103) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload103).reinterpret_as_int64()) - () - } - } + () + } + FloatBits(payload104) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload104).reinterpret_as_int64()) - match ((payload94).max_bytes) { - None => { - mbt_ffi_store8((iter_base) + 28, (0)) + () + } + } - () - } - Some(payload103) => { - mbt_ffi_store8((iter_base) + 28, (1)) - mbt_ffi_store32((iter_base) + 32, (payload103).reinterpret_as_int()) + () + } + } - () - } - } + match ((payload99).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - PathType(payload104) => { - mbt_ffi_store8((iter_base) + 0, (26)) - mbt_ffi_store8((iter_base) + 8, (payload104).direction.ordinal()) - mbt_ffi_store8((iter_base) + 9, (payload104).kind.ordinal()) + () + } + Some(payload106) => { + mbt_ffi_store8((iter_base) + 40, (1)) - match ((payload104).allowed_mime_types) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + match payload106 { + Signed(payload107) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload107) - () - } - Some(payload106) => { - mbt_ffi_store8((iter_base) + 12, (1)) + () + } + Unsigned(payload108) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload108).reinterpret_as_int64()) - let address108 = mbt_ffi_malloc((payload106).length() * 8); - for index109 = 0; index109 < (payload106).length(); index109 = index109 + 1 { - let iter_elem : String = (payload106)[(index109)] - let iter_base = address108 + (index109 * 8); + () + } + FloatBits(payload109) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload109).reinterpret_as_int64()) - let ptr107 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr107) - cleanup_list.push(ptr107) + () + } + } + () + } } - mbt_ffi_store32((iter_base) + 20, (payload106).length()) - mbt_ffi_store32((iter_base) + 16, address108) - cleanup_list.push(address108) - - () - } - } - - match ((payload104).allowed_extensions) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) - () - } - Some(payload111) => { - mbt_ffi_store8((iter_base) + 24, (1)) + match ((payload99).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - let address113 = mbt_ffi_malloc((payload111).length() * 8); - for index114 = 0; index114 < (payload111).length(); index114 = index114 + 1 { - let iter_elem : String = (payload111)[(index114)] - let iter_base = address113 + (index114 * 8); + () + } + Some(payload111) => { + mbt_ffi_store8((iter_base) + 64, (1)) - let ptr112 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr112) - cleanup_list.push(ptr112) + let ptr112 = mbt_ffi_str2ptr(payload111) + mbt_ffi_store32((iter_base) + 72, payload111.length()) + mbt_ffi_store32((iter_base) + 68, ptr112) + cleanup_list.push(ptr112) + () + } } - mbt_ffi_store32((iter_base) + 32, (payload111).length()) - mbt_ffi_store32((iter_base) + 28, address113) - cleanup_list.push(address113) () } @@ -17372,231 +18426,477 @@ pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[Stri () } - UrlType(payload115) => { - mbt_ffi_store8((iter_base) + 0, (27)) + U64Type(payload113) => { + mbt_ffi_store8((iter_base) + 0, (9)) - match ((payload115).allowed_schemes) { + match (payload113) { None => { mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload117) => { + Some(payload115) => { mbt_ffi_store8((iter_base) + 8, (1)) - let address119 = mbt_ffi_malloc((payload117).length() * 8); - for index120 = 0; index120 < (payload117).length(); index120 = index120 + 1 { - let iter_elem : String = (payload117)[(index120)] - let iter_base = address119 + (index120 * 8); - - let ptr118 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr118) - cleanup_list.push(ptr118) - - } - mbt_ffi_store32((iter_base) + 16, (payload117).length()) - mbt_ffi_store32((iter_base) + 12, address119) - cleanup_list.push(address119) + match ((payload115).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - } + () + } + Some(payload117) => { + mbt_ffi_store8((iter_base) + 16, (1)) - match ((payload115).allowed_hosts) { - None => { - mbt_ffi_store8((iter_base) + 20, (0)) + match payload117 { + Signed(payload118) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload118) - () - } - Some(payload122) => { - mbt_ffi_store8((iter_base) + 20, (1)) + () + } + Unsigned(payload119) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload119).reinterpret_as_int64()) - let address124 = mbt_ffi_malloc((payload122).length() * 8); - for index125 = 0; index125 < (payload122).length(); index125 = index125 + 1 { - let iter_elem : String = (payload122)[(index125)] - let iter_base = address124 + (index125 * 8); + () + } + FloatBits(payload120) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload120).reinterpret_as_int64()) - let ptr123 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr123) - cleanup_list.push(ptr123) + () + } + } + () + } } - mbt_ffi_store32((iter_base) + 28, (payload122).length()) - mbt_ffi_store32((iter_base) + 24, address124) - cleanup_list.push(address124) - () - } - } + match ((payload115).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) - () - } - DatetimeType => { - mbt_ffi_store8((iter_base) + 0, (28)) + () + } + Some(payload122) => { + mbt_ffi_store8((iter_base) + 40, (1)) - () - } - DurationType => { - mbt_ffi_store8((iter_base) + 0, (29)) + match payload122 { + Signed(payload123) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload123) - () - } - QuantityType(payload128) => { - mbt_ffi_store8((iter_base) + 0, (30)) + () + } + Unsigned(payload124) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload124).reinterpret_as_int64()) - let ptr129 = mbt_ffi_str2ptr((payload128).base_unit) - mbt_ffi_store32((iter_base) + 12, (payload128).base_unit.length()) - mbt_ffi_store32((iter_base) + 8, ptr129) + () + } + FloatBits(payload125) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload125).reinterpret_as_int64()) - let address131 = mbt_ffi_malloc(((payload128).allowed_suffixes).length() * 8); - for index132 = 0; index132 < ((payload128).allowed_suffixes).length(); index132 = index132 + 1 { - let iter_elem : String = ((payload128).allowed_suffixes)[(index132)] - let iter_base = address131 + (index132 * 8); + () + } + } - let ptr130 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr130) - cleanup_list.push(ptr130) + () + } + } - } - mbt_ffi_store32((iter_base) + 20, ((payload128).allowed_suffixes).length()) - mbt_ffi_store32((iter_base) + 16, address131) + match ((payload115).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) - match ((payload128).min) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + () + } + Some(payload127) => { + mbt_ffi_store8((iter_base) + 64, (1)) - () - } - Some(payload134) => { - mbt_ffi_store8((iter_base) + 24, (1)) - mbt_ffi_store64((iter_base) + 32, (payload134).mantissa) - mbt_ffi_store32((iter_base) + 40, (payload134).scale) + let ptr128 = mbt_ffi_str2ptr(payload127) + mbt_ffi_store32((iter_base) + 72, payload127.length()) + mbt_ffi_store32((iter_base) + 68, ptr128) + cleanup_list.push(ptr128) - let ptr135 = mbt_ffi_str2ptr((payload134).unit) - mbt_ffi_store32((iter_base) + 48, (payload134).unit.length()) - mbt_ffi_store32((iter_base) + 44, ptr135) - cleanup_list.push(ptr135) + () + } + } () } } - match ((payload128).max) { + () + } + F32Type(payload129) => { + mbt_ffi_store8((iter_base) + 0, (10)) + + match (payload129) { None => { - mbt_ffi_store8((iter_base) + 56, (0)) + mbt_ffi_store8((iter_base) + 8, (0)) () } - Some(payload137) => { - mbt_ffi_store8((iter_base) + 56, (1)) - mbt_ffi_store64((iter_base) + 64, (payload137).mantissa) - mbt_ffi_store32((iter_base) + 72, (payload137).scale) + Some(payload131) => { + mbt_ffi_store8((iter_base) + 8, (1)) - let ptr138 = mbt_ffi_str2ptr((payload137).unit) - mbt_ffi_store32((iter_base) + 80, (payload137).unit.length()) - mbt_ffi_store32((iter_base) + 76, ptr138) - cleanup_list.push(ptr138) + match ((payload131).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) - () - } - } - cleanup_list.push(ptr129) - cleanup_list.push(address131) + () + } + Some(payload133) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload133 { + Signed(payload134) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload134) + + () + } + Unsigned(payload135) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload135).reinterpret_as_int64()) + + () + } + FloatBits(payload136) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload136).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload131).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload138) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload138 { + Signed(payload139) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload139) + + () + } + Unsigned(payload140) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload140).reinterpret_as_int64()) + + () + } + FloatBits(payload141) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload141).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload131).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload143) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr144 = mbt_ffi_str2ptr(payload143) + mbt_ffi_store32((iter_base) + 72, payload143.length()) + mbt_ffi_store32((iter_base) + 68, ptr144) + cleanup_list.push(ptr144) + + () + } + } + + () + } + } () } - UnionType(payload139) => { - mbt_ffi_store8((iter_base) + 0, (31)) + F64Type(payload145) => { + mbt_ffi_store8((iter_base) + 0, (11)) - let address175 = mbt_ffi_malloc(((payload139).branches).length() * 92); - for index176 = 0; index176 < ((payload139).branches).length(); index176 = index176 + 1 { - let iter_elem : @types.UnionBranch = ((payload139).branches)[(index176)] - let iter_base = address175 + (index176 * 92); + match (payload145) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) - let ptr140 = mbt_ffi_str2ptr((iter_elem).tag) - mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) - mbt_ffi_store32((iter_base) + 0, ptr140) + () + } + Some(payload147) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload147).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload149) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload149 { + Signed(payload150) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload150) + + () + } + Unsigned(payload151) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload151).reinterpret_as_int64()) + + () + } + FloatBits(payload152) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload152).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload147).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload154) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload154 { + Signed(payload155) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload155) + + () + } + Unsigned(payload156) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload156).reinterpret_as_int64()) + + () + } + FloatBits(payload157) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload157).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload147).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload159) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr160 = mbt_ffi_str2ptr(payload159) + mbt_ffi_store32((iter_base) + 72, payload159.length()) + mbt_ffi_store32((iter_base) + 68, ptr160) + cleanup_list.push(ptr160) + + () + } + } + + () + } + } + + () + } + CharType => { + mbt_ffi_store8((iter_base) + 0, (12)) + + () + } + StringType => { + mbt_ffi_store8((iter_base) + 0, (13)) + + () + } + RecordType(payload163) => { + mbt_ffi_store8((iter_base) + 0, (14)) + + let address184 = mbt_ffi_malloc((payload163).length() * 68); + for index185 = 0; index185 < (payload163).length(); index185 = index185 + 1 { + let iter_elem : @types.NamedFieldType = (payload163)[(index185)] + let iter_base = address184 + (index185 * 68); + + let ptr164 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr164) mbt_ffi_store32((iter_base) + 8, (iter_elem).body) - match (iter_elem).discriminator { - Prefix(payload141) => { + match (((iter_elem).metadata).doc) { + None => { mbt_ffi_store8((iter_base) + 12, (0)) - let ptr142 = mbt_ffi_str2ptr(payload141) - mbt_ffi_store32((iter_base) + 20, payload141.length()) - mbt_ffi_store32((iter_base) + 16, ptr142) - cleanup_list.push(ptr142) - () } - Suffix(payload143) => { + Some(payload166) => { mbt_ffi_store8((iter_base) + 12, (1)) - let ptr144 = mbt_ffi_str2ptr(payload143) - mbt_ffi_store32((iter_base) + 20, payload143.length()) - mbt_ffi_store32((iter_base) + 16, ptr144) - cleanup_list.push(ptr144) + let ptr167 = mbt_ffi_str2ptr(payload166) + mbt_ffi_store32((iter_base) + 20, payload166.length()) + mbt_ffi_store32((iter_base) + 16, ptr167) + cleanup_list.push(ptr167) () } - Contains(payload145) => { - mbt_ffi_store8((iter_base) + 12, (2)) + } + + let address169 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index170 = 0; index170 < (((iter_elem).metadata).aliases).length(); index170 = index170 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index170)] + let iter_base = address169 + (index170 * 8); + + let ptr168 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr168) + cleanup_list.push(ptr168) - let ptr146 = mbt_ffi_str2ptr(payload145) - mbt_ffi_store32((iter_base) + 20, payload145.length()) - mbt_ffi_store32((iter_base) + 16, ptr146) - cleanup_list.push(ptr146) + } + mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 24, address169) + + let address172 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index173 = 0; index173 < (((iter_elem).metadata).examples).length(); index173 = index173 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index173)] + let iter_base = address172 + (index173 * 8); + + let ptr171 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr171) + cleanup_list.push(ptr171) + + } + mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 32, address172) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) () } - Regex(payload147) => { - mbt_ffi_store8((iter_base) + 12, (3)) + Some(payload175) => { + mbt_ffi_store8((iter_base) + 40, (1)) - let ptr148 = mbt_ffi_str2ptr(payload147) - mbt_ffi_store32((iter_base) + 20, payload147.length()) - mbt_ffi_store32((iter_base) + 16, ptr148) - cleanup_list.push(ptr148) + let ptr176 = mbt_ffi_str2ptr(payload175) + mbt_ffi_store32((iter_base) + 48, payload175.length()) + mbt_ffi_store32((iter_base) + 44, ptr176) + cleanup_list.push(ptr176) () } - FieldEquals(payload149) => { - mbt_ffi_store8((iter_base) + 12, (4)) + } - let ptr150 = mbt_ffi_str2ptr((payload149).field_name) - mbt_ffi_store32((iter_base) + 20, (payload149).field_name.length()) - mbt_ffi_store32((iter_base) + 16, ptr150) + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 52, (0)) - match ((payload149).literal) { - None => { - mbt_ffi_store8((iter_base) + 24, (0)) + () + } + Some(payload178) => { + mbt_ffi_store8((iter_base) + 52, (1)) + + match payload178 { + Multimodal => { + mbt_ffi_store8((iter_base) + 56, (0)) () } - Some(payload152) => { - mbt_ffi_store8((iter_base) + 24, (1)) + UnstructuredText => { + mbt_ffi_store8((iter_base) + 56, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 56, (2)) + + () + } + Other(payload182) => { + mbt_ffi_store8((iter_base) + 56, (3)) - let ptr153 = mbt_ffi_str2ptr(payload152) - mbt_ffi_store32((iter_base) + 32, payload152.length()) - mbt_ffi_store32((iter_base) + 28, ptr153) - cleanup_list.push(ptr153) + let ptr183 = mbt_ffi_str2ptr(payload182) + mbt_ffi_store32((iter_base) + 64, payload182.length()) + mbt_ffi_store32((iter_base) + 60, ptr183) + cleanup_list.push(ptr183) () } } - cleanup_list.push(ptr150) () } - FieldAbsent(payload154) => { - mbt_ffi_store8((iter_base) + 12, (5)) + } + cleanup_list.push(ptr164) + cleanup_list.push(address169) + cleanup_list.push(address172) + + } + mbt_ffi_store32((iter_base) + 12, (payload163).length()) + mbt_ffi_store32((iter_base) + 8, address184) + cleanup_list.push(address184) + + () + } + VariantType(payload186) => { + mbt_ffi_store8((iter_base) + 0, (15)) + + let address209 = mbt_ffi_malloc((payload186).length() * 72); + for index210 = 0; index210 < (payload186).length(); index210 = index210 + 1 { + let iter_elem : @types.VariantCaseType = (payload186)[(index210)] + let iter_base = address209 + (index210 * 72); - let ptr155 = mbt_ffi_str2ptr(payload154) - mbt_ffi_store32((iter_base) + 20, payload154.length()) - mbt_ffi_store32((iter_base) + 16, ptr155) - cleanup_list.push(ptr155) + let ptr187 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr187) + + match ((iter_elem).payload) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload189) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload189) () } @@ -17604,63 +18904,63 @@ pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[Stri match (((iter_elem).metadata).doc) { None => { - mbt_ffi_store8((iter_base) + 36, (0)) + mbt_ffi_store8((iter_base) + 16, (0)) () } - Some(payload157) => { - mbt_ffi_store8((iter_base) + 36, (1)) + Some(payload191) => { + mbt_ffi_store8((iter_base) + 16, (1)) - let ptr158 = mbt_ffi_str2ptr(payload157) - mbt_ffi_store32((iter_base) + 44, payload157.length()) - mbt_ffi_store32((iter_base) + 40, ptr158) - cleanup_list.push(ptr158) + let ptr192 = mbt_ffi_str2ptr(payload191) + mbt_ffi_store32((iter_base) + 24, payload191.length()) + mbt_ffi_store32((iter_base) + 20, ptr192) + cleanup_list.push(ptr192) () } } - let address160 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index161 = 0; index161 < (((iter_elem).metadata).aliases).length(); index161 = index161 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index161)] - let iter_base = address160 + (index161 * 8); + let address194 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index195 = 0; index195 < (((iter_elem).metadata).aliases).length(); index195 = index195 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index195)] + let iter_base = address194 + (index195 * 8); - let ptr159 = mbt_ffi_str2ptr(iter_elem) + let ptr193 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr159) - cleanup_list.push(ptr159) + mbt_ffi_store32((iter_base) + 0, ptr193) + cleanup_list.push(ptr193) } - mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 48, address160) + mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 28, address194) - let address163 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index164 = 0; index164 < (((iter_elem).metadata).examples).length(); index164 = index164 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index164)] - let iter_base = address163 + (index164 * 8); + let address197 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index198 = 0; index198 < (((iter_elem).metadata).examples).length(); index198 = index198 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index198)] + let iter_base = address197 + (index198 * 8); - let ptr162 = mbt_ffi_str2ptr(iter_elem) + let ptr196 = mbt_ffi_str2ptr(iter_elem) mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr162) - cleanup_list.push(ptr162) + mbt_ffi_store32((iter_base) + 0, ptr196) + cleanup_list.push(ptr196) } - mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 56, address163) + mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 36, address197) match (((iter_elem).metadata).deprecated) { None => { - mbt_ffi_store8((iter_base) + 64, (0)) + mbt_ffi_store8((iter_base) + 44, (0)) () } - Some(payload166) => { - mbt_ffi_store8((iter_base) + 64, (1)) + Some(payload200) => { + mbt_ffi_store8((iter_base) + 44, (1)) - let ptr167 = mbt_ffi_str2ptr(payload166) - mbt_ffi_store32((iter_base) + 72, payload166.length()) - mbt_ffi_store32((iter_base) + 68, ptr167) - cleanup_list.push(ptr167) + let ptr201 = mbt_ffi_str2ptr(payload200) + mbt_ffi_store32((iter_base) + 52, payload200.length()) + mbt_ffi_store32((iter_base) + 48, ptr201) + cleanup_list.push(ptr201) () } @@ -17668,36 +18968,36 @@ pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[Stri match (((iter_elem).metadata).role) { None => { - mbt_ffi_store8((iter_base) + 76, (0)) + mbt_ffi_store8((iter_base) + 56, (0)) () } - Some(payload169) => { - mbt_ffi_store8((iter_base) + 76, (1)) + Some(payload203) => { + mbt_ffi_store8((iter_base) + 56, (1)) - match payload169 { + match payload203 { Multimodal => { - mbt_ffi_store8((iter_base) + 80, (0)) + mbt_ffi_store8((iter_base) + 60, (0)) () } UnstructuredText => { - mbt_ffi_store8((iter_base) + 80, (1)) + mbt_ffi_store8((iter_base) + 60, (1)) () } UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 80, (2)) + mbt_ffi_store8((iter_base) + 60, (2)) () } - Other(payload173) => { - mbt_ffi_store8((iter_base) + 80, (3)) + Other(payload207) => { + mbt_ffi_store8((iter_base) + 60, (3)) - let ptr174 = mbt_ffi_str2ptr(payload173) - mbt_ffi_store32((iter_base) + 88, payload173.length()) - mbt_ffi_store32((iter_base) + 84, ptr174) - cleanup_list.push(ptr174) + let ptr208 = mbt_ffi_str2ptr(payload207) + mbt_ffi_store32((iter_base) + 68, payload207.length()) + mbt_ffi_store32((iter_base) + 64, ptr208) + cleanup_list.push(ptr208) () } @@ -17706,94 +19006,125 @@ pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[Stri () } } - cleanup_list.push(ptr140) - cleanup_list.push(address160) - cleanup_list.push(address163) + cleanup_list.push(ptr187) + cleanup_list.push(address194) + cleanup_list.push(address197) } - mbt_ffi_store32((iter_base) + 12, ((payload139).branches).length()) - mbt_ffi_store32((iter_base) + 8, address175) - cleanup_list.push(address175) + mbt_ffi_store32((iter_base) + 12, (payload186).length()) + mbt_ffi_store32((iter_base) + 8, address209) + cleanup_list.push(address209) () } - SecretType(payload177) => { - mbt_ffi_store8((iter_base) + 0, (32)) - - match ((payload177).category) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + EnumType(payload211) => { + mbt_ffi_store8((iter_base) + 0, (16)) - () - } - Some(payload179) => { - mbt_ffi_store8((iter_base) + 8, (1)) + let address213 = mbt_ffi_malloc((payload211).length() * 8); + for index214 = 0; index214 < (payload211).length(); index214 = index214 + 1 { + let iter_elem : String = (payload211)[(index214)] + let iter_base = address213 + (index214 * 8); - let ptr180 = mbt_ffi_str2ptr(payload179) - mbt_ffi_store32((iter_base) + 16, payload179.length()) - mbt_ffi_store32((iter_base) + 12, ptr180) - cleanup_list.push(ptr180) + let ptr212 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr212) + cleanup_list.push(ptr212) - () - } } + mbt_ffi_store32((iter_base) + 12, (payload211).length()) + mbt_ffi_store32((iter_base) + 8, address213) + cleanup_list.push(address213) () } - QuotaTokenType(payload181) => { - mbt_ffi_store8((iter_base) + 0, (33)) - - match ((payload181).resource_name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + FlagsType(payload215) => { + mbt_ffi_store8((iter_base) + 0, (17)) - () - } - Some(payload183) => { - mbt_ffi_store8((iter_base) + 8, (1)) + let address217 = mbt_ffi_malloc((payload215).length() * 8); + for index218 = 0; index218 < (payload215).length(); index218 = index218 + 1 { + let iter_elem : String = (payload215)[(index218)] + let iter_base = address217 + (index218 * 8); - let ptr184 = mbt_ffi_str2ptr(payload183) - mbt_ffi_store32((iter_base) + 16, payload183.length()) - mbt_ffi_store32((iter_base) + 12, ptr184) - cleanup_list.push(ptr184) + let ptr216 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr216) + cleanup_list.push(ptr216) - () - } } + mbt_ffi_store32((iter_base) + 12, (payload215).length()) + mbt_ffi_store32((iter_base) + 8, address217) + cleanup_list.push(address217) () } - FutureType(payload185) => { - mbt_ffi_store8((iter_base) + 0, (34)) - - match (payload185) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + TupleType(payload219) => { + mbt_ffi_store8((iter_base) + 0, (18)) - () - } - Some(payload187) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload187) + let address220 = mbt_ffi_malloc((payload219).length() * 4); + for index221 = 0; index221 < (payload219).length(); index221 = index221 + 1 { + let iter_elem : Int = (payload219)[(index221)] + let iter_base = address220 + (index221 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) - () - } } + mbt_ffi_store32((iter_base) + 12, (payload219).length()) + mbt_ffi_store32((iter_base) + 8, address220) + cleanup_list.push(address220) () } - StreamType(payload188) => { - mbt_ffi_store8((iter_base) + 0, (35)) - - match (payload188) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + ListType(payload222) => { + mbt_ffi_store8((iter_base) + 0, (19)) + mbt_ffi_store32((iter_base) + 8, payload222) - () - } - Some(payload190) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload190) + () + } + FixedListType(payload223) => { + mbt_ffi_store8((iter_base) + 0, (20)) + mbt_ffi_store32((iter_base) + 8, (payload223).element) + mbt_ffi_store32((iter_base) + 12, ((payload223).length).reinterpret_as_int()) + + () + } + MapType(payload224) => { + mbt_ffi_store8((iter_base) + 0, (21)) + mbt_ffi_store32((iter_base) + 8, (payload224).key) + mbt_ffi_store32((iter_base) + 12, (payload224).value) + + () + } + OptionType(payload225) => { + mbt_ffi_store8((iter_base) + 0, (22)) + mbt_ffi_store32((iter_base) + 8, payload225) + + () + } + ResultType(payload226) => { + mbt_ffi_store8((iter_base) + 0, (23)) + + match ((payload226).ok) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload228) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload228) + + () + } + } + + match ((payload226).err) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload230) => { + mbt_ffi_store8((iter_base) + 16, (1)) + mbt_ffi_store32((iter_base) + 20, payload230) () } @@ -17801,821 +19132,7179 @@ pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[Stri () } - } + TextType(payload231) => { + mbt_ffi_store8((iter_base) + 0, (24)) - match (((iter_elem).metadata).doc) { - None => { - mbt_ffi_store8((iter_base) + 88, (0)) + match ((payload231).languages) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload233) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address235 = mbt_ffi_malloc((payload233).length() * 8); + for index236 = 0; index236 < (payload233).length(); index236 = index236 + 1 { + let iter_elem : String = (payload233)[(index236)] + let iter_base = address235 + (index236 * 8); + + let ptr234 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr234) + cleanup_list.push(ptr234) + + } + mbt_ffi_store32((iter_base) + 16, (payload233).length()) + mbt_ffi_store32((iter_base) + 12, address235) + cleanup_list.push(address235) + + () + } + } + + match ((payload231).min_length) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload238) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload238).reinterpret_as_int()) + + () + } + } + + match ((payload231).max_length) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) + + () + } + Some(payload240) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload240).reinterpret_as_int()) + + () + } + } + + match ((payload231).regex) { + None => { + mbt_ffi_store8((iter_base) + 36, (0)) + + () + } + Some(payload242) => { + mbt_ffi_store8((iter_base) + 36, (1)) + + let ptr243 = mbt_ffi_str2ptr(payload242) + mbt_ffi_store32((iter_base) + 44, payload242.length()) + mbt_ffi_store32((iter_base) + 40, ptr243) + cleanup_list.push(ptr243) + + () + } + } () } - Some(payload192) => { - mbt_ffi_store8((iter_base) + 88, (1)) + BinaryType(payload244) => { + mbt_ffi_store8((iter_base) + 0, (25)) + + match ((payload244).mime_types) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload246) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address248 = mbt_ffi_malloc((payload246).length() * 8); + for index249 = 0; index249 < (payload246).length(); index249 = index249 + 1 { + let iter_elem : String = (payload246)[(index249)] + let iter_base = address248 + (index249 * 8); + + let ptr247 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr247) + cleanup_list.push(ptr247) - let ptr193 = mbt_ffi_str2ptr(payload192) - mbt_ffi_store32((iter_base) + 96, payload192.length()) - mbt_ffi_store32((iter_base) + 92, ptr193) - cleanup_list.push(ptr193) + } + mbt_ffi_store32((iter_base) + 16, (payload246).length()) + mbt_ffi_store32((iter_base) + 12, address248) + cleanup_list.push(address248) + + () + } + } + + match ((payload244).min_bytes) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload251) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload251).reinterpret_as_int()) + + () + } + } + + match ((payload244).max_bytes) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) + + () + } + Some(payload253) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload253).reinterpret_as_int()) + + () + } + } () } - } + PathType(payload254) => { + mbt_ffi_store8((iter_base) + 0, (26)) + mbt_ffi_store8((iter_base) + 8, (payload254).direction.ordinal()) + mbt_ffi_store8((iter_base) + 9, (payload254).kind.ordinal()) - let address195 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); - for index196 = 0; index196 < (((iter_elem).metadata).aliases).length(); index196 = index196 + 1 { - let iter_elem : String = (((iter_elem).metadata).aliases)[(index196)] - let iter_base = address195 + (index196 * 8); + match ((payload254).allowed_mime_types) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) - let ptr194 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr194) - cleanup_list.push(ptr194) + () + } + Some(payload256) => { + mbt_ffi_store8((iter_base) + 12, (1)) - } - mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) - mbt_ffi_store32((iter_base) + 100, address195) + let address258 = mbt_ffi_malloc((payload256).length() * 8); + for index259 = 0; index259 < (payload256).length(); index259 = index259 + 1 { + let iter_elem : String = (payload256)[(index259)] + let iter_base = address258 + (index259 * 8); - let address198 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); - for index199 = 0; index199 < (((iter_elem).metadata).examples).length(); index199 = index199 + 1 { - let iter_elem : String = (((iter_elem).metadata).examples)[(index199)] - let iter_base = address198 + (index199 * 8); + let ptr257 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr257) + cleanup_list.push(ptr257) - let ptr197 = mbt_ffi_str2ptr(iter_elem) - mbt_ffi_store32((iter_base) + 4, iter_elem.length()) - mbt_ffi_store32((iter_base) + 0, ptr197) - cleanup_list.push(ptr197) + } + mbt_ffi_store32((iter_base) + 20, (payload256).length()) + mbt_ffi_store32((iter_base) + 16, address258) + cleanup_list.push(address258) - } - mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) - mbt_ffi_store32((iter_base) + 108, address198) + () + } + } - match (((iter_elem).metadata).deprecated) { - None => { - mbt_ffi_store8((iter_base) + 116, (0)) + match ((payload254).allowed_extensions) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload261) => { + mbt_ffi_store8((iter_base) + 24, (1)) + + let address263 = mbt_ffi_malloc((payload261).length() * 8); + for index264 = 0; index264 < (payload261).length(); index264 = index264 + 1 { + let iter_elem : String = (payload261)[(index264)] + let iter_base = address263 + (index264 * 8); + + let ptr262 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr262) + cleanup_list.push(ptr262) + + } + mbt_ffi_store32((iter_base) + 32, (payload261).length()) + mbt_ffi_store32((iter_base) + 28, address263) + cleanup_list.push(address263) + + () + } + } () } - Some(payload201) => { - mbt_ffi_store8((iter_base) + 116, (1)) + UrlType(payload265) => { + mbt_ffi_store8((iter_base) + 0, (27)) + + match ((payload265).allowed_schemes) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload267) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address269 = mbt_ffi_malloc((payload267).length() * 8); + for index270 = 0; index270 < (payload267).length(); index270 = index270 + 1 { + let iter_elem : String = (payload267)[(index270)] + let iter_base = address269 + (index270 * 8); + + let ptr268 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr268) + cleanup_list.push(ptr268) + + } + mbt_ffi_store32((iter_base) + 16, (payload267).length()) + mbt_ffi_store32((iter_base) + 12, address269) + cleanup_list.push(address269) + + () + } + } + + match ((payload265).allowed_hosts) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload272) => { + mbt_ffi_store8((iter_base) + 20, (1)) + + let address274 = mbt_ffi_malloc((payload272).length() * 8); + for index275 = 0; index275 < (payload272).length(); index275 = index275 + 1 { + let iter_elem : String = (payload272)[(index275)] + let iter_base = address274 + (index275 * 8); + + let ptr273 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr273) + cleanup_list.push(ptr273) + + } + mbt_ffi_store32((iter_base) + 28, (payload272).length()) + mbt_ffi_store32((iter_base) + 24, address274) + cleanup_list.push(address274) - let ptr202 = mbt_ffi_str2ptr(payload201) - mbt_ffi_store32((iter_base) + 124, payload201.length()) - mbt_ffi_store32((iter_base) + 120, ptr202) - cleanup_list.push(ptr202) + () + } + } () } - } + DatetimeType => { + mbt_ffi_store8((iter_base) + 0, (28)) - match (((iter_elem).metadata).role) { - None => { - mbt_ffi_store8((iter_base) + 128, (0)) + () + } + DurationType => { + mbt_ffi_store8((iter_base) + 0, (29)) () } - Some(payload204) => { - mbt_ffi_store8((iter_base) + 128, (1)) + QuantityType(payload278) => { + mbt_ffi_store8((iter_base) + 0, (30)) - match payload204 { - Multimodal => { - mbt_ffi_store8((iter_base) + 132, (0)) + let ptr279 = mbt_ffi_str2ptr((payload278).base_unit) + mbt_ffi_store32((iter_base) + 12, (payload278).base_unit.length()) + mbt_ffi_store32((iter_base) + 8, ptr279) + + let address281 = mbt_ffi_malloc(((payload278).allowed_suffixes).length() * 8); + for index282 = 0; index282 < ((payload278).allowed_suffixes).length(); index282 = index282 + 1 { + let iter_elem : String = ((payload278).allowed_suffixes)[(index282)] + let iter_base = address281 + (index282 * 8); + + let ptr280 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr280) + cleanup_list.push(ptr280) + + } + mbt_ffi_store32((iter_base) + 20, ((payload278).allowed_suffixes).length()) + mbt_ffi_store32((iter_base) + 16, address281) + + match ((payload278).min) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) () } - UnstructuredText => { - mbt_ffi_store8((iter_base) + 132, (1)) + Some(payload284) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload284).mantissa) + mbt_ffi_store32((iter_base) + 40, (payload284).scale) + + let ptr285 = mbt_ffi_str2ptr((payload284).unit) + mbt_ffi_store32((iter_base) + 48, (payload284).unit.length()) + mbt_ffi_store32((iter_base) + 44, ptr285) + cleanup_list.push(ptr285) () } - UnstructuredBinary => { - mbt_ffi_store8((iter_base) + 132, (2)) + } + + match ((payload278).max) { + None => { + mbt_ffi_store8((iter_base) + 56, (0)) () } - Other(payload208) => { - mbt_ffi_store8((iter_base) + 132, (3)) + Some(payload287) => { + mbt_ffi_store8((iter_base) + 56, (1)) + mbt_ffi_store64((iter_base) + 64, (payload287).mantissa) + mbt_ffi_store32((iter_base) + 72, (payload287).scale) - let ptr209 = mbt_ffi_str2ptr(payload208) - mbt_ffi_store32((iter_base) + 140, payload208.length()) - mbt_ffi_store32((iter_base) + 136, ptr209) - cleanup_list.push(ptr209) + let ptr288 = mbt_ffi_str2ptr((payload287).unit) + mbt_ffi_store32((iter_base) + 80, (payload287).unit.length()) + mbt_ffi_store32((iter_base) + 76, ptr288) + cleanup_list.push(ptr288) () } } + cleanup_list.push(ptr279) + cleanup_list.push(address281) () } - } - cleanup_list.push(address195) - cleanup_list.push(address198) + UnionType(payload289) => { + mbt_ffi_store8((iter_base) + 0, (31)) + + let address325 = mbt_ffi_malloc(((payload289).branches).length() * 92); + for index326 = 0; index326 < ((payload289).branches).length(); index326 = index326 + 1 { + let iter_elem : @types.UnionBranch = ((payload289).branches)[(index326)] + let iter_base = address325 + (index326 * 92); + + let ptr290 = mbt_ffi_str2ptr((iter_elem).tag) + mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) + mbt_ffi_store32((iter_base) + 0, ptr290) + mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + + match (iter_elem).discriminator { + Prefix(payload291) => { + mbt_ffi_store8((iter_base) + 12, (0)) + + let ptr292 = mbt_ffi_str2ptr(payload291) + mbt_ffi_store32((iter_base) + 20, payload291.length()) + mbt_ffi_store32((iter_base) + 16, ptr292) + cleanup_list.push(ptr292) + + () + } + Suffix(payload293) => { + mbt_ffi_store8((iter_base) + 12, (1)) + + let ptr294 = mbt_ffi_str2ptr(payload293) + mbt_ffi_store32((iter_base) + 20, payload293.length()) + mbt_ffi_store32((iter_base) + 16, ptr294) + cleanup_list.push(ptr294) + + () + } + Contains(payload295) => { + mbt_ffi_store8((iter_base) + 12, (2)) + + let ptr296 = mbt_ffi_str2ptr(payload295) + mbt_ffi_store32((iter_base) + 20, payload295.length()) + mbt_ffi_store32((iter_base) + 16, ptr296) + cleanup_list.push(ptr296) + + () + } + Regex(payload297) => { + mbt_ffi_store8((iter_base) + 12, (3)) + + let ptr298 = mbt_ffi_str2ptr(payload297) + mbt_ffi_store32((iter_base) + 20, payload297.length()) + mbt_ffi_store32((iter_base) + 16, ptr298) + cleanup_list.push(ptr298) + + () + } + FieldEquals(payload299) => { + mbt_ffi_store8((iter_base) + 12, (4)) + + let ptr300 = mbt_ffi_str2ptr((payload299).field_name) + mbt_ffi_store32((iter_base) + 20, (payload299).field_name.length()) + mbt_ffi_store32((iter_base) + 16, ptr300) + + match ((payload299).literal) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload302) => { + mbt_ffi_store8((iter_base) + 24, (1)) + + let ptr303 = mbt_ffi_str2ptr(payload302) + mbt_ffi_store32((iter_base) + 32, payload302.length()) + mbt_ffi_store32((iter_base) + 28, ptr303) + cleanup_list.push(ptr303) + + () + } + } + cleanup_list.push(ptr300) + + () + } + FieldAbsent(payload304) => { + mbt_ffi_store8((iter_base) + 12, (5)) + + let ptr305 = mbt_ffi_str2ptr(payload304) + mbt_ffi_store32((iter_base) + 20, payload304.length()) + mbt_ffi_store32((iter_base) + 16, ptr305) + cleanup_list.push(ptr305) + + () + } + } + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 36, (0)) + + () + } + Some(payload307) => { + mbt_ffi_store8((iter_base) + 36, (1)) + + let ptr308 = mbt_ffi_str2ptr(payload307) + mbt_ffi_store32((iter_base) + 44, payload307.length()) + mbt_ffi_store32((iter_base) + 40, ptr308) + cleanup_list.push(ptr308) + + () + } + } + + let address310 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index311 = 0; index311 < (((iter_elem).metadata).aliases).length(); index311 = index311 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index311)] + let iter_base = address310 + (index311 * 8); + + let ptr309 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr309) + cleanup_list.push(ptr309) + + } + mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 48, address310) + + let address313 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index314 = 0; index314 < (((iter_elem).metadata).examples).length(); index314 = index314 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index314)] + let iter_base = address313 + (index314 * 8); + + let ptr312 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr312) + cleanup_list.push(ptr312) + + } + mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 56, address313) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload316) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr317 = mbt_ffi_str2ptr(payload316) + mbt_ffi_store32((iter_base) + 72, payload316.length()) + mbt_ffi_store32((iter_base) + 68, ptr317) + cleanup_list.push(ptr317) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 76, (0)) + + () + } + Some(payload319) => { + mbt_ffi_store8((iter_base) + 76, (1)) + + match payload319 { + Multimodal => { + mbt_ffi_store8((iter_base) + 80, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 80, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 80, (2)) + + () + } + Other(payload323) => { + mbt_ffi_store8((iter_base) + 80, (3)) + + let ptr324 = mbt_ffi_str2ptr(payload323) + mbt_ffi_store32((iter_base) + 88, payload323.length()) + mbt_ffi_store32((iter_base) + 84, ptr324) + cleanup_list.push(ptr324) + + () + } + } + + () + } + } + cleanup_list.push(ptr290) + cleanup_list.push(address310) + cleanup_list.push(address313) + + } + mbt_ffi_store32((iter_base) + 12, ((payload289).branches).length()) + mbt_ffi_store32((iter_base) + 8, address325) + cleanup_list.push(address325) + + () + } + SecretType(payload327) => { + mbt_ffi_store8((iter_base) + 0, (32)) + + match ((payload327).category) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload329) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr330 = mbt_ffi_str2ptr(payload329) + mbt_ffi_store32((iter_base) + 16, payload329.length()) + mbt_ffi_store32((iter_base) + 12, ptr330) + cleanup_list.push(ptr330) + + () + } + } + + () + } + QuotaTokenType(payload331) => { + mbt_ffi_store8((iter_base) + 0, (33)) + + match ((payload331).resource_name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload333) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr334 = mbt_ffi_str2ptr(payload333) + mbt_ffi_store32((iter_base) + 16, payload333.length()) + mbt_ffi_store32((iter_base) + 12, ptr334) + cleanup_list.push(ptr334) + + () + } + } + + () + } + FutureType(payload335) => { + mbt_ffi_store8((iter_base) + 0, (34)) + + match (payload335) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload337) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload337) + + () + } + } + + () + } + StreamType(payload338) => { + mbt_ffi_store8((iter_base) + 0, (35)) + + match (payload338) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload340) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload340) + + () + } + } + + () + } + } + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 88, (0)) + + () + } + Some(payload342) => { + mbt_ffi_store8((iter_base) + 88, (1)) + + let ptr343 = mbt_ffi_str2ptr(payload342) + mbt_ffi_store32((iter_base) + 96, payload342.length()) + mbt_ffi_store32((iter_base) + 92, ptr343) + cleanup_list.push(ptr343) + + () + } + } + + let address345 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index346 = 0; index346 < (((iter_elem).metadata).aliases).length(); index346 = index346 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index346)] + let iter_base = address345 + (index346 * 8); + + let ptr344 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr344) + cleanup_list.push(ptr344) + + } + mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 100, address345) + + let address348 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index349 = 0; index349 < (((iter_elem).metadata).examples).length(); index349 = index349 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index349)] + let iter_base = address348 + (index349 * 8); + + let ptr347 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr347) + cleanup_list.push(ptr347) + + } + mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 108, address348) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 116, (0)) + + () + } + Some(payload351) => { + mbt_ffi_store8((iter_base) + 116, (1)) + + let ptr352 = mbt_ffi_str2ptr(payload351) + mbt_ffi_store32((iter_base) + 124, payload351.length()) + mbt_ffi_store32((iter_base) + 120, ptr352) + cleanup_list.push(ptr352) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 128, (0)) + + () + } + Some(payload354) => { + mbt_ffi_store8((iter_base) + 128, (1)) + + match payload354 { + Multimodal => { + mbt_ffi_store8((iter_base) + 132, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 132, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 132, (2)) + + () + } + Other(payload358) => { + mbt_ffi_store8((iter_base) + 132, (3)) + + let ptr359 = mbt_ffi_str2ptr(payload358) + mbt_ffi_store32((iter_base) + 140, payload358.length()) + mbt_ffi_store32((iter_base) + 136, ptr359) + cleanup_list.push(ptr359) + + () + } + } + + () + } + } + cleanup_list.push(address345) + cleanup_list.push(address348) + + } + + let address366 = mbt_ffi_malloc((((input).graph).defs).length() * 24); + for index367 = 0; index367 < (((input).graph).defs).length(); index367 = index367 + 1 { + let iter_elem : @types.SchemaTypeDef = (((input).graph).defs)[(index367)] + let iter_base = address366 + (index367 * 24); + + let ptr362 = mbt_ffi_str2ptr((iter_elem).id) + mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) + mbt_ffi_store32((iter_base) + 0, ptr362) + + match ((iter_elem).name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload364) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr365 = mbt_ffi_str2ptr(payload364) + mbt_ffi_store32((iter_base) + 16, payload364.length()) + mbt_ffi_store32((iter_base) + 12, ptr365) + cleanup_list.push(ptr365) + + () + } + } + mbt_ffi_store32((iter_base) + 20, (iter_elem).body) + cleanup_list.push(ptr362) + + } + + let address438 = mbt_ffi_malloc((((input).value).value_nodes).length() * 32); + for index439 = 0; index439 < (((input).value).value_nodes).length(); index439 = index439 + 1 { + let iter_elem : @types.SchemaValueNode = (((input).value).value_nodes)[(index439)] + let iter_base = address438 + (index439 * 32); + + match iter_elem { + BoolValue(payload368) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload368 { 1 } else { 0 })) + + () + } + S8Value(payload369) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload369)) + + () + } + S16Value(payload370) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload370)) + + () + } + S32Value(payload371) => { + mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload371) + + () + } + S64Value(payload372) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload372) + + () + } + U8Value(payload373) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload373).to_int()) + + () + } + U16Value(payload374) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload374).reinterpret_as_int()) + + () + } + U32Value(payload375) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload375).reinterpret_as_int()) + + () + } + U64Value(payload376) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload376).reinterpret_as_int64()) + + () + } + F32Value(payload377) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload377) + + () + } + F64Value(payload378) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload378) + + () + } + CharValue(payload379) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload379).to_int()) + + () + } + StringValue(payload380) => { + mbt_ffi_store8((iter_base) + 0, (12)) + + let ptr381 = mbt_ffi_str2ptr(payload380) + mbt_ffi_store32((iter_base) + 12, payload380.length()) + mbt_ffi_store32((iter_base) + 8, ptr381) + cleanup_list.push(ptr381) + + () + } + RecordValue(payload382) => { + mbt_ffi_store8((iter_base) + 0, (13)) + + let address383 = mbt_ffi_malloc((payload382).length() * 4); + for index384 = 0; index384 < (payload382).length(); index384 = index384 + 1 { + let iter_elem : Int = (payload382)[(index384)] + let iter_base = address383 + (index384 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload382).length()) + mbt_ffi_store32((iter_base) + 8, address383) + cleanup_list.push(address383) + + () + } + VariantValue(payload385) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload385).case).reinterpret_as_int()) + + match ((payload385).payload) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload387) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload387) + + () + } + } + + () + } + EnumValue(payload388) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload388).reinterpret_as_int()) + + () + } + FlagsValue(payload389) => { + mbt_ffi_store8((iter_base) + 0, (16)) + + let address390 = mbt_ffi_malloc((payload389).length() * 1); + for index391 = 0; index391 < (payload389).length(); index391 = index391 + 1 { + let iter_elem : Bool = (payload389)[(index391)] + let iter_base = address390 + (index391 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + + } + mbt_ffi_store32((iter_base) + 12, (payload389).length()) + mbt_ffi_store32((iter_base) + 8, address390) + cleanup_list.push(address390) + + () + } + TupleValue(payload392) => { + mbt_ffi_store8((iter_base) + 0, (17)) + + let address393 = mbt_ffi_malloc((payload392).length() * 4); + for index394 = 0; index394 < (payload392).length(); index394 = index394 + 1 { + let iter_elem : Int = (payload392)[(index394)] + let iter_base = address393 + (index394 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload392).length()) + mbt_ffi_store32((iter_base) + 8, address393) + cleanup_list.push(address393) + + () + } + ListValue(payload395) => { + mbt_ffi_store8((iter_base) + 0, (18)) + + let address396 = mbt_ffi_malloc((payload395).length() * 4); + for index397 = 0; index397 < (payload395).length(); index397 = index397 + 1 { + let iter_elem : Int = (payload395)[(index397)] + let iter_base = address396 + (index397 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload395).length()) + mbt_ffi_store32((iter_base) + 8, address396) + cleanup_list.push(address396) + + () + } + FixedListValue(payload398) => { + mbt_ffi_store8((iter_base) + 0, (19)) + + let address399 = mbt_ffi_malloc((payload398).length() * 4); + for index400 = 0; index400 < (payload398).length(); index400 = index400 + 1 { + let iter_elem : Int = (payload398)[(index400)] + let iter_base = address399 + (index400 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload398).length()) + mbt_ffi_store32((iter_base) + 8, address399) + cleanup_list.push(address399) + + () + } + MapValue(payload401) => { + mbt_ffi_store8((iter_base) + 0, (20)) + + let address402 = mbt_ffi_malloc((payload401).length() * 8); + for index403 = 0; index403 < (payload401).length(); index403 = index403 + 1 { + let iter_elem : @types.MapEntry = (payload401)[(index403)] + let iter_base = address402 + (index403 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + + } + mbt_ffi_store32((iter_base) + 12, (payload401).length()) + mbt_ffi_store32((iter_base) + 8, address402) + cleanup_list.push(address402) + + () + } + OptionValue(payload404) => { + mbt_ffi_store8((iter_base) + 0, (21)) + + match (payload404) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload406) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload406) + + () + } + } + + () + } + ResultValue(payload407) => { + mbt_ffi_store8((iter_base) + 0, (22)) + + match payload407 { + OkValue(payload408) => { + mbt_ffi_store8((iter_base) + 8, (0)) + + match (payload408) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload410) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload410) + + () + } + } + + () + } + ErrValue(payload411) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match (payload411) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload413) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload413) + + () + } + } + + () + } + } + + () + } + TextValue(payload414) => { + mbt_ffi_store8((iter_base) + 0, (23)) + + let ptr415 = mbt_ffi_str2ptr((payload414).text) + mbt_ffi_store32((iter_base) + 12, (payload414).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr415) + + match ((payload414).language) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload417) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr418 = mbt_ffi_str2ptr(payload417) + mbt_ffi_store32((iter_base) + 24, payload417.length()) + mbt_ffi_store32((iter_base) + 20, ptr418) + cleanup_list.push(ptr418) + + () + } + } + cleanup_list.push(ptr415) + + () + } + BinaryValue(payload419) => { + mbt_ffi_store8((iter_base) + 0, (24)) + + let ptr420 = mbt_ffi_bytes2ptr((payload419).bytes) + + mbt_ffi_store32((iter_base) + 12, (payload419).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr420) + + match ((payload419).mime_type) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload422) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr423 = mbt_ffi_str2ptr(payload422) + mbt_ffi_store32((iter_base) + 24, payload422.length()) + mbt_ffi_store32((iter_base) + 20, ptr423) + cleanup_list.push(ptr423) + + () + } + } + cleanup_list.push(ptr420) + + () + } + PathValue(payload424) => { + mbt_ffi_store8((iter_base) + 0, (25)) + + let ptr425 = mbt_ffi_str2ptr(payload424) + mbt_ffi_store32((iter_base) + 12, payload424.length()) + mbt_ffi_store32((iter_base) + 8, ptr425) + cleanup_list.push(ptr425) + + () + } + UrlValue(payload426) => { + mbt_ffi_store8((iter_base) + 0, (26)) + + let ptr427 = mbt_ffi_str2ptr(payload426) + mbt_ffi_store32((iter_base) + 12, payload426.length()) + mbt_ffi_store32((iter_base) + 8, ptr427) + cleanup_list.push(ptr427) + + () + } + DatetimeValue(payload428) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload428).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload428).nanoseconds).reinterpret_as_int()) + + () + } + DurationValue(payload429) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload429).nanoseconds) + + () + } + QuantityValueNode(payload430) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload430).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload430).scale) + + let ptr431 = mbt_ffi_str2ptr((payload430).unit) + mbt_ffi_store32((iter_base) + 24, (payload430).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr431) + cleanup_list.push(ptr431) + + () + } + UnionValue(payload432) => { + mbt_ffi_store8((iter_base) + 0, (30)) + + let ptr433 = mbt_ffi_str2ptr((payload432).tag) + mbt_ffi_store32((iter_base) + 12, (payload432).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr433) + mbt_ffi_store32((iter_base) + 16, (payload432).body) + cleanup_list.push(ptr433) + + () + } + SecretValue(payload434) => { + mbt_ffi_store8((iter_base) + 0, (31)) + + let ptr435 = mbt_ffi_str2ptr((payload434).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload434).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr435) + cleanup_list.push(ptr435) + + () + } + QuotaTokenHandle(payload436) => { + mbt_ffi_store8((iter_base) + 0, (32)) + + let @types.QuotaToken(handle437) = payload436 + mbt_ffi_store32((iter_base) + 8, handle437) + + () + } + } + + } + + let (lowered, lowered443) = match (stdin) { + None => { + + ((0), 0) + } + Some(payload441) => { + + let @streams.InputStream(handle442) = payload441 + + ((1), handle442) + } + } + let return_area = mbt_ffi_malloc(44) + wasmImportMethodToolRpcInvoke(handle, address, (command_path).length(), address360, (((input).graph).type_nodes).length(), address366, (((input).graph).defs).length(), ((input).graph).root, address438, (((input).value).value_nodes).length(), ((input).value).root, lowered, lowered443, return_area); + + let lifted689 = match (mbt_ffi_load8_u((return_area) + 0)) { + 0 => { + + Result::Ok(()) + } + 1 => { + + let lifted688 = match (mbt_ffi_load8_u((return_area) + 4)) { + 0 => { + + let result = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + + RpcError::ProtocolError(result) + } + 1 => { + + let result444 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + + RpcError::Denied(result444) + } + 2 => { + + let result445 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + + RpcError::NotFound(result445) + } + 3 => { + + let result446 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 8), mbt_ffi_load32((return_area) + 12)) + + RpcError::RemoteInternalError(result446) + } + 4 => { + + let lifted687 = match (mbt_ffi_load8_u((return_area) + 8)) { + 0 => { + + let result447 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.ToolError::InvalidToolName(result447) + } + 1 => { + + let array : Array[String] = []; + for index449 = 0; index449 < (mbt_ffi_load32((return_area) + 16)); index449 = index449 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index449 * 8) + + let result448 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array.push(result448) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) + + @common.ToolError::InvalidCommandPath(array) + } + 2 => { + + let result450 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.ToolError::InvalidInput(result450) + } + 3 => { + + let result451 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.ToolError::ConstraintViolation(result451) + } + 4 => { + + let result452 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + + @common.ToolError::InvalidResult(result452) + } + 5 => { + + let array648 : Array[@types.SchemaTypeNode] = []; + for index649 = 0; index649 < (mbt_ffi_load32((return_area) + 16)); index649 = index649 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index649 * 144) + + let lifted634 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { + + @types.SchemaTypeBody::BoolType + } + 2 => { + + let lifted458 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted453 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted) + } + _ => panic() + } + + let lifted455 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted454 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted454) + } + _ => panic() + } + + let lifted457 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result456 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result456) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted453, max : lifted455, unit : lifted457}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted458) + } + 3 => { + + let lifted465 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted460 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted459 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted459) + } + _ => panic() + } + + let lifted462 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted461 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted461) + } + _ => panic() + } + + let lifted464 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result463 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result463) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted460, max : lifted462, unit : lifted464}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted465) + } + 4 => { + + let lifted472 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted467 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted466 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted466) + } + _ => panic() + } + + let lifted469 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted468 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted468) + } + _ => panic() + } + + let lifted471 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result470 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result470) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted467, max : lifted469, unit : lifted471}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted472) + } + 5 => { + + let lifted479 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted474 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted473 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted473) + } + _ => panic() + } + + let lifted476 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted475 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted475) + } + _ => panic() + } + + let lifted478 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result477 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result477) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted474, max : lifted476, unit : lifted478}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted479) + } + 6 => { + + let lifted486 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted481 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted480 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted480) + } + _ => panic() + } + + let lifted483 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted482 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted482) + } + _ => panic() + } + + let lifted485 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result484 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result484) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted481, max : lifted483, unit : lifted485}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted486) + } + 7 => { + + let lifted493 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted488 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted487 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted487) + } + _ => panic() + } + + let lifted490 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted489 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted489) + } + _ => panic() + } + + let lifted492 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result491 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result491) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted488, max : lifted490, unit : lifted492}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted493) + } + 8 => { + + let lifted500 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted495 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted494 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted494) + } + _ => panic() + } + + let lifted497 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted496 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted496) + } + _ => panic() + } + + let lifted499 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result498 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result498) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted495, max : lifted497, unit : lifted499}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted500) + } + 9 => { + + let lifted507 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted502 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted501 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted501) + } + _ => panic() + } + + let lifted504 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted503 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted503) + } + _ => panic() + } + + let lifted506 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result505 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result505) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted502, max : lifted504, unit : lifted506}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted507) + } + 10 => { + + let lifted514 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted509 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted508 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted508) + } + _ => panic() + } + + let lifted511 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted510 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted510) + } + _ => panic() + } + + let lifted513 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result512 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result512) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted509, max : lifted511, unit : lifted513}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted514) + } + 11 => { + + let lifted521 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted516 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted515 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted515) + } + _ => panic() + } + + let lifted518 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted517 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted517) + } + _ => panic() + } + + let lifted520 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result519 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result519) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted516, max : lifted518, unit : lifted520}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted521) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { + + @types.SchemaTypeBody::StringType + } + 14 => { + + let array536 : Array[@types.NamedFieldType] = []; + for index537 = 0; index537 < (mbt_ffi_load32((iter_base) + 12)); index537 = index537 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index537 * 68) + + let result522 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted524 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let result523 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + Option::Some(result523) + } + _ => panic() + } + + let array526 : Array[String] = []; + for index527 = 0; index527 < (mbt_ffi_load32((iter_base) + 28)); index527 = index527 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index527 * 8) + + let result525 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array526.push(result525) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + let array529 : Array[String] = []; + for index530 = 0; index530 < (mbt_ffi_load32((iter_base) + 36)); index530 = index530 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index530 * 8) + + let result528 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array529.push(result528) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + + let lifted532 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let result531 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(result531) + } + _ => panic() + } + + let lifted535 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { + + let lifted534 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result533 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + + @types.Role::Other(result533) + } + _ => panic() + } + + Option::Some(lifted534) + } + _ => panic() + } + + array536.push(@types.NamedFieldType::{name : result522, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted524, aliases : array526, examples : array529, deprecated : lifted532, role : lifted535}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::RecordType(array536) + } + 15 => { + + let array553 : Array[@types.VariantCaseType] = []; + for index554 = 0; index554 < (mbt_ffi_load32((iter_base) + 12)); index554 = index554 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index554 * 72) + + let result538 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted539 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + let lifted541 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result540 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result540) + } + _ => panic() + } + + let array543 : Array[String] = []; + for index544 = 0; index544 < (mbt_ffi_load32((iter_base) + 32)); index544 = index544 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index544 * 8) + + let result542 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array543.push(result542) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + let array546 : Array[String] = []; + for index547 = 0; index547 < (mbt_ffi_load32((iter_base) + 40)); index547 = index547 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index547 * 8) + + let result545 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array546.push(result545) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + + let lifted549 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { + + let result548 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + + Option::Some(result548) + } + _ => panic() + } + + let lifted552 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let lifted551 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result550 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + + @types.Role::Other(result550) + } + _ => panic() + } + + Option::Some(lifted551) + } + _ => panic() + } + + array553.push(@types.VariantCaseType::{name : result538, payload : lifted539, metadata : @types.MetadataEnvelope::{doc : lifted541, aliases : array543, examples : array546, deprecated : lifted549, role : lifted552}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::VariantType(array553) + } + 16 => { + + let array556 : Array[String] = []; + for index557 = 0; index557 < (mbt_ffi_load32((iter_base) + 12)); index557 = index557 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index557 * 8) + + let result555 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array556.push(result555) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::EnumType(array556) + } + 17 => { + + let array559 : Array[String] = []; + for index560 = 0; index560 < (mbt_ffi_load32((iter_base) + 12)); index560 = index560 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index560 * 8) + + let result558 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array559.push(result558) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::FlagsType(array559) + } + 18 => { + + let array561 : Array[Int] = []; + for index562 = 0; index562 < (mbt_ffi_load32((iter_base) + 12)); index562 = index562 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index562 * 4) + + array561.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::TupleType(array561) + } + 19 => { + + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { + + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { + + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { + + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { + + let lifted563 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + let lifted564 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } + + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted563, err : lifted564}) + } + 24 => { + + let lifted568 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array566 : Array[String] = []; + for index567 = 0; index567 < (mbt_ffi_load32((iter_base) + 16)); index567 = index567 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index567 * 8) + + let result565 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array566.push(result565) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array566) + } + _ => panic() + } + + let lifted569 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted570 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted572 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result571 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result571) + } + _ => panic() + } + + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted568, min_length : lifted569, max_length : lifted570, regex : lifted572}) + } + 25 => { + + let lifted576 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array574 : Array[String] = []; + for index575 = 0; index575 < (mbt_ffi_load32((iter_base) + 16)); index575 = index575 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index575 * 8) + + let result573 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array574.push(result573) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array574) + } + _ => panic() + } + + let lifted577 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } + + let lifted578 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { + + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } + + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted576, min_bytes : lifted577, max_bytes : lifted578}) + } + 26 => { + + let lifted582 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + let array580 : Array[String] = []; + for index581 = 0; index581 < (mbt_ffi_load32((iter_base) + 20)); index581 = index581 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index581 * 8) + + let result579 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array580.push(result579) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + Option::Some(array580) + } + _ => panic() + } + + let lifted586 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let array584 : Array[String] = []; + for index585 = 0; index585 < (mbt_ffi_load32((iter_base) + 32)); index585 = index585 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index585 * 8) + + let result583 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array584.push(result583) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + + Option::Some(array584) + } + _ => panic() + } + + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted582, allowed_extensions : lifted586}) + } + 27 => { + + let lifted590 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let array588 : Array[String] = []; + for index589 = 0; index589 < (mbt_ffi_load32((iter_base) + 16)); index589 = index589 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index589 * 8) + + let result587 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array588.push(result587) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + + Option::Some(array588) + } + _ => panic() + } + + let lifted594 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { + + let array592 : Array[String] = []; + for index593 = 0; index593 < (mbt_ffi_load32((iter_base) + 28)); index593 = index593 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index593 * 8) + + let result591 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array592.push(result591) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + + Option::Some(array592) + } + _ => panic() + } + + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted590, allowed_hosts : lifted594}) + } + 28 => { + + @types.SchemaTypeBody::DatetimeType + } + 29 => { + + @types.SchemaTypeBody::DurationType + } + 30 => { + + let result595 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let array597 : Array[String] = []; + for index598 = 0; index598 < (mbt_ffi_load32((iter_base) + 20)); index598 = index598 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index598 * 8) + + let result596 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array597.push(result596) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + + let lifted600 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result599 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result599}) + } + _ => panic() + } + + let lifted602 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { + + let result601 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result601}) + } + _ => panic() + } + + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result595, allowed_suffixes : array597, min : lifted600, max : lifted602}) + } + 31 => { + + let array626 : Array[@types.UnionBranch] = []; + for index627 = 0; index627 < (mbt_ffi_load32((iter_base) + 12)); index627 = index627 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index627 * 92) + + let result603 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted612 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { + + let result604 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Prefix(result604) + } + 1 => { + + let result605 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Suffix(result605) + } + 2 => { + + let result606 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Contains(result606) + } + 3 => { + + let result607 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::Regex(result607) + } + 4 => { + + let result608 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + let lifted610 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { + + let result609 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + + Option::Some(result609) + } + _ => panic() + } + + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result608, literal : lifted610}) + } + 5 => { + + let result611 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + + @types.DiscriminatorRule::FieldAbsent(result611) + } + _ => panic() + } + + let lifted614 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { + + let result613 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + + Option::Some(result613) + } + _ => panic() + } + + let array616 : Array[String] = []; + for index617 = 0; index617 < (mbt_ffi_load32((iter_base) + 52)); index617 = index617 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index617 * 8) + + let result615 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array616.push(result615) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) + + let array619 : Array[String] = []; + for index620 = 0; index620 < (mbt_ffi_load32((iter_base) + 60)); index620 = index620 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index620 * 8) + + let result618 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array619.push(result618) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + + let lifted622 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result621 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result621) + } + _ => panic() + } + + let lifted625 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + 0 => Option::None + 1 => { + + let lifted624 = match (mbt_ffi_load8_u((iter_base) + 80)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result623 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + + @types.Role::Other(result623) + } + _ => panic() + } + + Option::Some(lifted624) + } + _ => panic() + } + + array626.push(@types.UnionBranch::{tag : result603, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted612, metadata : @types.MetadataEnvelope::{doc : lifted614, aliases : array616, examples : array619, deprecated : lifted622, role : lifted625}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array626}) + } + 32 => { + + let lifted629 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result628 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result628) + } + _ => panic() + } + + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted629}) + } + 33 => { + + let lifted631 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result630 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result630) + } + _ => panic() + } + + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted631}) + } + 34 => { + + let lifted632 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::FutureType(lifted632) + } + 35 => { + + let lifted633 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::StreamType(lifted633) + } + _ => panic() + } + + let lifted636 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + 0 => Option::None + 1 => { + + let result635 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + + Option::Some(result635) + } + _ => panic() + } + + let array638 : Array[String] = []; + for index639 = 0; index639 < (mbt_ffi_load32((iter_base) + 104)); index639 = index639 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index639 * 8) + + let result637 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array638.push(result637) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + + let array641 : Array[String] = []; + for index642 = 0; index642 < (mbt_ffi_load32((iter_base) + 112)); index642 = index642 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index642 * 8) + + let result640 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array641.push(result640) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + + let lifted644 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { + + let result643 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + + Option::Some(result643) + } + _ => panic() + } + + let lifted647 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { + + let lifted646 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { + + @types.Role::Multimodal + } + 1 => { + + @types.Role::UnstructuredText + } + 2 => { + + @types.Role::UnstructuredBinary + } + 3 => { + + let result645 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + + @types.Role::Other(result645) + } + _ => panic() + } + + Option::Some(lifted646) + } + _ => panic() + } + + array648.push(@types.SchemaTypeNode::{body : lifted634, metadata : @types.MetadataEnvelope::{doc : lifted636, aliases : array638, examples : array641, deprecated : lifted644, role : lifted647}}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) + + let array653 : Array[@types.SchemaTypeDef] = []; + for index654 = 0; index654 < (mbt_ffi_load32((return_area) + 24)); index654 = index654 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index654 * 24) + + let result650 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + let lifted652 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let result651 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result651) + } + _ => panic() + } + + array653.push(@types.SchemaTypeDef::{id : result650, name : lifted652, body : mbt_ffi_load32((iter_base) + 20)}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 20)) + + let array685 : Array[@types.SchemaValueNode] = []; + for index686 = 0; index686 < (mbt_ffi_load32((return_area) + 36)); index686 = index686 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index686 * 32) + + let lifted684 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) + } + 1 => { + + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { + + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { + + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { + + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { + + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { + + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { + + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { + + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { + + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { + + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { + + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { + + let result655 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::StringValue(result655) + } + 13 => { + + let array656 : Array[Int] = []; + for index657 = 0; index657 < (mbt_ffi_load32((iter_base) + 12)); index657 = index657 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index657 * 4) + + array656.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::RecordValue(array656) + } + 14 => { + + let lifted658 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted658}) + } + 15 => { + + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { + + let array659 : Array[Bool] = []; + for index660 = 0; index660 < (mbt_ffi_load32((iter_base) + 12)); index660 = index660 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index660 * 1) + + array659.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FlagsValue(array659) + } + 17 => { + + let array661 : Array[Int] = []; + for index662 = 0; index662 < (mbt_ffi_load32((iter_base) + 12)); index662 = index662 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index662 * 4) + + array661.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::TupleValue(array661) + } + 18 => { + + let array663 : Array[Int] = []; + for index664 = 0; index664 < (mbt_ffi_load32((iter_base) + 12)); index664 = index664 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index664 * 4) + + array663.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::ListValue(array663) + } + 19 => { + + let array665 : Array[Int] = []; + for index666 = 0; index666 < (mbt_ffi_load32((iter_base) + 12)); index666 = index666 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index666 * 4) + + array665.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::FixedListValue(array665) + } + 20 => { + + let array667 : Array[@types.MapEntry] = []; + for index668 = 0; index668 < (mbt_ffi_load32((iter_base) + 12)); index668 = index668 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index668 * 8) + + array667.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::MapValue(array667) + } + 21 => { + + let lifted669 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaValueNode::OptionValue(lifted669) + } + 22 => { + + let lifted672 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { + + let lifted670 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::OkValue(lifted670) + } + 1 => { + + let lifted671 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } + + @types.ResultValuePayload::ErrValue(lifted671) + } + _ => panic() + } + + @types.SchemaValueNode::ResultValue(lifted672) + } + 23 => { + + let result673 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted675 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result674 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result674) + } + _ => panic() + } + + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result673, language : lifted675}) + } + 24 => { + + let result676 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted678 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let result677 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + Option::Some(result677) + } + _ => panic() + } + + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result676, mime_type : lifted678}) + } + 25 => { + + let result679 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::PathValue(result679) + } + 26 => { + + let result680 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UrlValue(result680) + } + 27 => { + + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) + } + 28 => { + + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) + } + 29 => { + + let result681 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result681}) + } + 30 => { + + let result682 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result682, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { + + let result683 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result683}) + } + 32 => { + + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) + } + _ => panic() + } + + array685.push(lifted684) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) + + @common.ToolError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array648, defs : array653, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array685, root : mbt_ffi_load32((return_area) + 40)}}) + } + _ => panic() + } + + RpcError::RemoteToolError(lifted687) + } + _ => panic() + } + + Result::Err(lifted688) + } + _ => panic() + } + let ret = lifted689 + mbt_ffi_free(address) + mbt_ffi_free(address360) + mbt_ffi_free(address366) + mbt_ffi_free(address438) + mbt_ffi_free(return_area) + + cleanup_list.each(mbt_ffi_free) + return ret + +} +///| +pub fn ToolRpc::async_invoke_and_await(self : ToolRpc, command_path : Array[String], input : @types.TypedSchemaValue, stdin : @streams.InputStream?) -> FutureInvokeResult { + let cleanup_list : Array[Int] = [] + + let ToolRpc(handle) = self + + let address = mbt_ffi_malloc((command_path).length() * 8); + for index = 0; index < (command_path).length(); index = index + 1 { + let iter_elem : String = (command_path)[(index)] + let iter_base = address + (index * 8); + + let ptr = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr) + cleanup_list.push(ptr) + + } + + let address360 = mbt_ffi_malloc((((input).graph).type_nodes).length() * 144); + for index361 = 0; index361 < (((input).graph).type_nodes).length(); index361 = index361 + 1 { + let iter_elem : @types.SchemaTypeNode = (((input).graph).type_nodes)[(index361)] + let iter_base = address360 + (index361 * 144); + + match (iter_elem).body { + RefType(payload) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store32((iter_base) + 8, payload) + + () + } + BoolType => { + mbt_ffi_store8((iter_base) + 0, (1)) + + () + } + S8Type(payload1) => { + mbt_ffi_store8((iter_base) + 0, (2)) + + match (payload1) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload3) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload3).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload5) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload5 { + Signed(payload6) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload6) + + () + } + Unsigned(payload7) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload7).reinterpret_as_int64()) + + () + } + FloatBits(payload8) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload8).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload3).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload10) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload10 { + Signed(payload11) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload11) + + () + } + Unsigned(payload12) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload12).reinterpret_as_int64()) + + () + } + FloatBits(payload13) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload13).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload3).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload15) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr16 = mbt_ffi_str2ptr(payload15) + mbt_ffi_store32((iter_base) + 72, payload15.length()) + mbt_ffi_store32((iter_base) + 68, ptr16) + cleanup_list.push(ptr16) + + () + } + } + + () + } + } + + () + } + S16Type(payload17) => { + mbt_ffi_store8((iter_base) + 0, (3)) + + match (payload17) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload19) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload19).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload21) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload21 { + Signed(payload22) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload22) + + () + } + Unsigned(payload23) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload23).reinterpret_as_int64()) + + () + } + FloatBits(payload24) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload24).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload19).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload26) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload26 { + Signed(payload27) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload27) + + () + } + Unsigned(payload28) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload28).reinterpret_as_int64()) + + () + } + FloatBits(payload29) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload29).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload19).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload31) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr32 = mbt_ffi_str2ptr(payload31) + mbt_ffi_store32((iter_base) + 72, payload31.length()) + mbt_ffi_store32((iter_base) + 68, ptr32) + cleanup_list.push(ptr32) + + () + } + } + + () + } + } + + () + } + S32Type(payload33) => { + mbt_ffi_store8((iter_base) + 0, (4)) + + match (payload33) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload35) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload35).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload37) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload37 { + Signed(payload38) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload38) + + () + } + Unsigned(payload39) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload39).reinterpret_as_int64()) + + () + } + FloatBits(payload40) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload40).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload35).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload42) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload42 { + Signed(payload43) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload43) + + () + } + Unsigned(payload44) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload44).reinterpret_as_int64()) + + () + } + FloatBits(payload45) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload45).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload35).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload47) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr48 = mbt_ffi_str2ptr(payload47) + mbt_ffi_store32((iter_base) + 72, payload47.length()) + mbt_ffi_store32((iter_base) + 68, ptr48) + cleanup_list.push(ptr48) + + () + } + } + + () + } + } + + () + } + S64Type(payload49) => { + mbt_ffi_store8((iter_base) + 0, (5)) + + match (payload49) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload51) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload51).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload53) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload53 { + Signed(payload54) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload54) + + () + } + Unsigned(payload55) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload55).reinterpret_as_int64()) + + () + } + FloatBits(payload56) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload56).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload51).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload58) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload58 { + Signed(payload59) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload59) + + () + } + Unsigned(payload60) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload60).reinterpret_as_int64()) + + () + } + FloatBits(payload61) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload61).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload51).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload63) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr64 = mbt_ffi_str2ptr(payload63) + mbt_ffi_store32((iter_base) + 72, payload63.length()) + mbt_ffi_store32((iter_base) + 68, ptr64) + cleanup_list.push(ptr64) + + () + } + } + + () + } + } + + () + } + U8Type(payload65) => { + mbt_ffi_store8((iter_base) + 0, (6)) + + match (payload65) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload67) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload67).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload69) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload69 { + Signed(payload70) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload70) + + () + } + Unsigned(payload71) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload71).reinterpret_as_int64()) + + () + } + FloatBits(payload72) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload72).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload67).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload74) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload74 { + Signed(payload75) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload75) + + () + } + Unsigned(payload76) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload76).reinterpret_as_int64()) + + () + } + FloatBits(payload77) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload77).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload67).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload79) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr80 = mbt_ffi_str2ptr(payload79) + mbt_ffi_store32((iter_base) + 72, payload79.length()) + mbt_ffi_store32((iter_base) + 68, ptr80) + cleanup_list.push(ptr80) + + () + } + } + + () + } + } + + () + } + U16Type(payload81) => { + mbt_ffi_store8((iter_base) + 0, (7)) + + match (payload81) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload83) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload83).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload85) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload85 { + Signed(payload86) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload86) + + () + } + Unsigned(payload87) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload87).reinterpret_as_int64()) + + () + } + FloatBits(payload88) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload88).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload83).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload90) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload90 { + Signed(payload91) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload91) + + () + } + Unsigned(payload92) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload92).reinterpret_as_int64()) + + () + } + FloatBits(payload93) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload93).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload83).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload95) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr96 = mbt_ffi_str2ptr(payload95) + mbt_ffi_store32((iter_base) + 72, payload95.length()) + mbt_ffi_store32((iter_base) + 68, ptr96) + cleanup_list.push(ptr96) + + () + } + } + + () + } + } + + () + } + U32Type(payload97) => { + mbt_ffi_store8((iter_base) + 0, (8)) + + match (payload97) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload99) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload99).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload101) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload101 { + Signed(payload102) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload102) + + () + } + Unsigned(payload103) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload103).reinterpret_as_int64()) + + () + } + FloatBits(payload104) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload104).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload99).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload106) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload106 { + Signed(payload107) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload107) + + () + } + Unsigned(payload108) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload108).reinterpret_as_int64()) + + () + } + FloatBits(payload109) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload109).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload99).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload111) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr112 = mbt_ffi_str2ptr(payload111) + mbt_ffi_store32((iter_base) + 72, payload111.length()) + mbt_ffi_store32((iter_base) + 68, ptr112) + cleanup_list.push(ptr112) + + () + } + } + + () + } + } + + () + } + U64Type(payload113) => { + mbt_ffi_store8((iter_base) + 0, (9)) + + match (payload113) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload115) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload115).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload117) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload117 { + Signed(payload118) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload118) + + () + } + Unsigned(payload119) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload119).reinterpret_as_int64()) + + () + } + FloatBits(payload120) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload120).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload115).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload122) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload122 { + Signed(payload123) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload123) + + () + } + Unsigned(payload124) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload124).reinterpret_as_int64()) + + () + } + FloatBits(payload125) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload125).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload115).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload127) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr128 = mbt_ffi_str2ptr(payload127) + mbt_ffi_store32((iter_base) + 72, payload127.length()) + mbt_ffi_store32((iter_base) + 68, ptr128) + cleanup_list.push(ptr128) + + () + } + } + + () + } + } + + () + } + F32Type(payload129) => { + mbt_ffi_store8((iter_base) + 0, (10)) + + match (payload129) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload131) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload131).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload133) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload133 { + Signed(payload134) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload134) + + () + } + Unsigned(payload135) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload135).reinterpret_as_int64()) + + () + } + FloatBits(payload136) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload136).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload131).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload138) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload138 { + Signed(payload139) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload139) + + () + } + Unsigned(payload140) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload140).reinterpret_as_int64()) + + () + } + FloatBits(payload141) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload141).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload131).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload143) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr144 = mbt_ffi_str2ptr(payload143) + mbt_ffi_store32((iter_base) + 72, payload143.length()) + mbt_ffi_store32((iter_base) + 68, ptr144) + cleanup_list.push(ptr144) + + () + } + } + + () + } + } + + () + } + F64Type(payload145) => { + mbt_ffi_store8((iter_base) + 0, (11)) + + match (payload145) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload147) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match ((payload147).min) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload149) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + match payload149 { + Signed(payload150) => { + mbt_ffi_store8((iter_base) + 24, (0)) + mbt_ffi_store64((iter_base) + 32, payload150) + + () + } + Unsigned(payload151) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload151).reinterpret_as_int64()) + + () + } + FloatBits(payload152) => { + mbt_ffi_store8((iter_base) + 24, (2)) + mbt_ffi_store64((iter_base) + 32, (payload152).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload147).max) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload154) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + match payload154 { + Signed(payload155) => { + mbt_ffi_store8((iter_base) + 48, (0)) + mbt_ffi_store64((iter_base) + 56, payload155) + + () + } + Unsigned(payload156) => { + mbt_ffi_store8((iter_base) + 48, (1)) + mbt_ffi_store64((iter_base) + 56, (payload156).reinterpret_as_int64()) + + () + } + FloatBits(payload157) => { + mbt_ffi_store8((iter_base) + 48, (2)) + mbt_ffi_store64((iter_base) + 56, (payload157).reinterpret_as_int64()) + + () + } + } + + () + } + } + + match ((payload147).unit) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload159) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr160 = mbt_ffi_str2ptr(payload159) + mbt_ffi_store32((iter_base) + 72, payload159.length()) + mbt_ffi_store32((iter_base) + 68, ptr160) + cleanup_list.push(ptr160) + + () + } + } + + () + } + } + + () + } + CharType => { + mbt_ffi_store8((iter_base) + 0, (12)) + + () + } + StringType => { + mbt_ffi_store8((iter_base) + 0, (13)) + + () + } + RecordType(payload163) => { + mbt_ffi_store8((iter_base) + 0, (14)) + + let address184 = mbt_ffi_malloc((payload163).length() * 68); + for index185 = 0; index185 < (payload163).length(); index185 = index185 + 1 { + let iter_elem : @types.NamedFieldType = (payload163)[(index185)] + let iter_base = address184 + (index185 * 68); + + let ptr164 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr164) + mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload166) => { + mbt_ffi_store8((iter_base) + 12, (1)) + + let ptr167 = mbt_ffi_str2ptr(payload166) + mbt_ffi_store32((iter_base) + 20, payload166.length()) + mbt_ffi_store32((iter_base) + 16, ptr167) + cleanup_list.push(ptr167) + + () + } + } + + let address169 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index170 = 0; index170 < (((iter_elem).metadata).aliases).length(); index170 = index170 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index170)] + let iter_base = address169 + (index170 * 8); + + let ptr168 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr168) + cleanup_list.push(ptr168) + + } + mbt_ffi_store32((iter_base) + 28, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 24, address169) + + let address172 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index173 = 0; index173 < (((iter_elem).metadata).examples).length(); index173 = index173 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index173)] + let iter_base = address172 + (index173 * 8); + + let ptr171 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr171) + cleanup_list.push(ptr171) + + } + mbt_ffi_store32((iter_base) + 36, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 32, address172) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 40, (0)) + + () + } + Some(payload175) => { + mbt_ffi_store8((iter_base) + 40, (1)) + + let ptr176 = mbt_ffi_str2ptr(payload175) + mbt_ffi_store32((iter_base) + 48, payload175.length()) + mbt_ffi_store32((iter_base) + 44, ptr176) + cleanup_list.push(ptr176) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 52, (0)) + + () + } + Some(payload178) => { + mbt_ffi_store8((iter_base) + 52, (1)) + + match payload178 { + Multimodal => { + mbt_ffi_store8((iter_base) + 56, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 56, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 56, (2)) + + () + } + Other(payload182) => { + mbt_ffi_store8((iter_base) + 56, (3)) + + let ptr183 = mbt_ffi_str2ptr(payload182) + mbt_ffi_store32((iter_base) + 64, payload182.length()) + mbt_ffi_store32((iter_base) + 60, ptr183) + cleanup_list.push(ptr183) + + () + } + } + + () + } + } + cleanup_list.push(ptr164) + cleanup_list.push(address169) + cleanup_list.push(address172) + + } + mbt_ffi_store32((iter_base) + 12, (payload163).length()) + mbt_ffi_store32((iter_base) + 8, address184) + cleanup_list.push(address184) + + () + } + VariantType(payload186) => { + mbt_ffi_store8((iter_base) + 0, (15)) + + let address209 = mbt_ffi_malloc((payload186).length() * 72); + for index210 = 0; index210 < (payload186).length(); index210 = index210 + 1 { + let iter_elem : @types.VariantCaseType = (payload186)[(index210)] + let iter_base = address209 + (index210 * 72); + + let ptr187 = mbt_ffi_str2ptr((iter_elem).name) + mbt_ffi_store32((iter_base) + 4, (iter_elem).name.length()) + mbt_ffi_store32((iter_base) + 0, ptr187) + + match ((iter_elem).payload) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload189) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload189) + + () + } + } + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload191) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr192 = mbt_ffi_str2ptr(payload191) + mbt_ffi_store32((iter_base) + 24, payload191.length()) + mbt_ffi_store32((iter_base) + 20, ptr192) + cleanup_list.push(ptr192) + + () + } + } + + let address194 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index195 = 0; index195 < (((iter_elem).metadata).aliases).length(); index195 = index195 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index195)] + let iter_base = address194 + (index195 * 8); + + let ptr193 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr193) + cleanup_list.push(ptr193) + + } + mbt_ffi_store32((iter_base) + 32, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 28, address194) + + let address197 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index198 = 0; index198 < (((iter_elem).metadata).examples).length(); index198 = index198 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index198)] + let iter_base = address197 + (index198 * 8); + + let ptr196 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr196) + cleanup_list.push(ptr196) + + } + mbt_ffi_store32((iter_base) + 40, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 36, address197) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 44, (0)) + + () + } + Some(payload200) => { + mbt_ffi_store8((iter_base) + 44, (1)) + + let ptr201 = mbt_ffi_str2ptr(payload200) + mbt_ffi_store32((iter_base) + 52, payload200.length()) + mbt_ffi_store32((iter_base) + 48, ptr201) + cleanup_list.push(ptr201) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 56, (0)) + + () + } + Some(payload203) => { + mbt_ffi_store8((iter_base) + 56, (1)) + + match payload203 { + Multimodal => { + mbt_ffi_store8((iter_base) + 60, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 60, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 60, (2)) + + () + } + Other(payload207) => { + mbt_ffi_store8((iter_base) + 60, (3)) + + let ptr208 = mbt_ffi_str2ptr(payload207) + mbt_ffi_store32((iter_base) + 68, payload207.length()) + mbt_ffi_store32((iter_base) + 64, ptr208) + cleanup_list.push(ptr208) + + () + } + } + + () + } + } + cleanup_list.push(ptr187) + cleanup_list.push(address194) + cleanup_list.push(address197) + + } + mbt_ffi_store32((iter_base) + 12, (payload186).length()) + mbt_ffi_store32((iter_base) + 8, address209) + cleanup_list.push(address209) + + () + } + EnumType(payload211) => { + mbt_ffi_store8((iter_base) + 0, (16)) + + let address213 = mbt_ffi_malloc((payload211).length() * 8); + for index214 = 0; index214 < (payload211).length(); index214 = index214 + 1 { + let iter_elem : String = (payload211)[(index214)] + let iter_base = address213 + (index214 * 8); + + let ptr212 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr212) + cleanup_list.push(ptr212) + + } + mbt_ffi_store32((iter_base) + 12, (payload211).length()) + mbt_ffi_store32((iter_base) + 8, address213) + cleanup_list.push(address213) + + () + } + FlagsType(payload215) => { + mbt_ffi_store8((iter_base) + 0, (17)) + + let address217 = mbt_ffi_malloc((payload215).length() * 8); + for index218 = 0; index218 < (payload215).length(); index218 = index218 + 1 { + let iter_elem : String = (payload215)[(index218)] + let iter_base = address217 + (index218 * 8); + + let ptr216 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr216) + cleanup_list.push(ptr216) + + } + mbt_ffi_store32((iter_base) + 12, (payload215).length()) + mbt_ffi_store32((iter_base) + 8, address217) + cleanup_list.push(address217) + + () + } + TupleType(payload219) => { + mbt_ffi_store8((iter_base) + 0, (18)) + + let address220 = mbt_ffi_malloc((payload219).length() * 4); + for index221 = 0; index221 < (payload219).length(); index221 = index221 + 1 { + let iter_elem : Int = (payload219)[(index221)] + let iter_base = address220 + (index221 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload219).length()) + mbt_ffi_store32((iter_base) + 8, address220) + cleanup_list.push(address220) + + () + } + ListType(payload222) => { + mbt_ffi_store8((iter_base) + 0, (19)) + mbt_ffi_store32((iter_base) + 8, payload222) + + () + } + FixedListType(payload223) => { + mbt_ffi_store8((iter_base) + 0, (20)) + mbt_ffi_store32((iter_base) + 8, (payload223).element) + mbt_ffi_store32((iter_base) + 12, ((payload223).length).reinterpret_as_int()) + + () + } + MapType(payload224) => { + mbt_ffi_store8((iter_base) + 0, (21)) + mbt_ffi_store32((iter_base) + 8, (payload224).key) + mbt_ffi_store32((iter_base) + 12, (payload224).value) + + () + } + OptionType(payload225) => { + mbt_ffi_store8((iter_base) + 0, (22)) + mbt_ffi_store32((iter_base) + 8, payload225) + + () + } + ResultType(payload226) => { + mbt_ffi_store8((iter_base) + 0, (23)) + + match ((payload226).ok) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload228) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload228) + + () + } + } + + match ((payload226).err) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload230) => { + mbt_ffi_store8((iter_base) + 16, (1)) + mbt_ffi_store32((iter_base) + 20, payload230) + + () + } + } + + () + } + TextType(payload231) => { + mbt_ffi_store8((iter_base) + 0, (24)) + + match ((payload231).languages) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload233) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address235 = mbt_ffi_malloc((payload233).length() * 8); + for index236 = 0; index236 < (payload233).length(); index236 = index236 + 1 { + let iter_elem : String = (payload233)[(index236)] + let iter_base = address235 + (index236 * 8); + + let ptr234 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr234) + cleanup_list.push(ptr234) + + } + mbt_ffi_store32((iter_base) + 16, (payload233).length()) + mbt_ffi_store32((iter_base) + 12, address235) + cleanup_list.push(address235) + + () + } + } + + match ((payload231).min_length) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload238) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload238).reinterpret_as_int()) + + () + } + } + + match ((payload231).max_length) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) + + () + } + Some(payload240) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload240).reinterpret_as_int()) + + () + } + } + + match ((payload231).regex) { + None => { + mbt_ffi_store8((iter_base) + 36, (0)) + + () + } + Some(payload242) => { + mbt_ffi_store8((iter_base) + 36, (1)) + + let ptr243 = mbt_ffi_str2ptr(payload242) + mbt_ffi_store32((iter_base) + 44, payload242.length()) + mbt_ffi_store32((iter_base) + 40, ptr243) + cleanup_list.push(ptr243) + + () + } + } + + () + } + BinaryType(payload244) => { + mbt_ffi_store8((iter_base) + 0, (25)) + + match ((payload244).mime_types) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload246) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address248 = mbt_ffi_malloc((payload246).length() * 8); + for index249 = 0; index249 < (payload246).length(); index249 = index249 + 1 { + let iter_elem : String = (payload246)[(index249)] + let iter_base = address248 + (index249 * 8); + + let ptr247 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr247) + cleanup_list.push(ptr247) + + } + mbt_ffi_store32((iter_base) + 16, (payload246).length()) + mbt_ffi_store32((iter_base) + 12, address248) + cleanup_list.push(address248) + + () + } + } + + match ((payload244).min_bytes) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload251) => { + mbt_ffi_store8((iter_base) + 20, (1)) + mbt_ffi_store32((iter_base) + 24, (payload251).reinterpret_as_int()) + + () + } + } + + match ((payload244).max_bytes) { + None => { + mbt_ffi_store8((iter_base) + 28, (0)) + + () + } + Some(payload253) => { + mbt_ffi_store8((iter_base) + 28, (1)) + mbt_ffi_store32((iter_base) + 32, (payload253).reinterpret_as_int()) + + () + } + } + + () + } + PathType(payload254) => { + mbt_ffi_store8((iter_base) + 0, (26)) + mbt_ffi_store8((iter_base) + 8, (payload254).direction.ordinal()) + mbt_ffi_store8((iter_base) + 9, (payload254).kind.ordinal()) + + match ((payload254).allowed_mime_types) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload256) => { + mbt_ffi_store8((iter_base) + 12, (1)) + + let address258 = mbt_ffi_malloc((payload256).length() * 8); + for index259 = 0; index259 < (payload256).length(); index259 = index259 + 1 { + let iter_elem : String = (payload256)[(index259)] + let iter_base = address258 + (index259 * 8); + + let ptr257 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr257) + cleanup_list.push(ptr257) + + } + mbt_ffi_store32((iter_base) + 20, (payload256).length()) + mbt_ffi_store32((iter_base) + 16, address258) + cleanup_list.push(address258) + + () + } + } + + match ((payload254).allowed_extensions) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload261) => { + mbt_ffi_store8((iter_base) + 24, (1)) + + let address263 = mbt_ffi_malloc((payload261).length() * 8); + for index264 = 0; index264 < (payload261).length(); index264 = index264 + 1 { + let iter_elem : String = (payload261)[(index264)] + let iter_base = address263 + (index264 * 8); + + let ptr262 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr262) + cleanup_list.push(ptr262) + + } + mbt_ffi_store32((iter_base) + 32, (payload261).length()) + mbt_ffi_store32((iter_base) + 28, address263) + cleanup_list.push(address263) + + () + } + } + + () + } + UrlType(payload265) => { + mbt_ffi_store8((iter_base) + 0, (27)) + + match ((payload265).allowed_schemes) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload267) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let address269 = mbt_ffi_malloc((payload267).length() * 8); + for index270 = 0; index270 < (payload267).length(); index270 = index270 + 1 { + let iter_elem : String = (payload267)[(index270)] + let iter_base = address269 + (index270 * 8); + + let ptr268 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr268) + cleanup_list.push(ptr268) + + } + mbt_ffi_store32((iter_base) + 16, (payload267).length()) + mbt_ffi_store32((iter_base) + 12, address269) + cleanup_list.push(address269) + + () + } + } + + match ((payload265).allowed_hosts) { + None => { + mbt_ffi_store8((iter_base) + 20, (0)) + + () + } + Some(payload272) => { + mbt_ffi_store8((iter_base) + 20, (1)) + + let address274 = mbt_ffi_malloc((payload272).length() * 8); + for index275 = 0; index275 < (payload272).length(); index275 = index275 + 1 { + let iter_elem : String = (payload272)[(index275)] + let iter_base = address274 + (index275 * 8); + + let ptr273 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr273) + cleanup_list.push(ptr273) + + } + mbt_ffi_store32((iter_base) + 28, (payload272).length()) + mbt_ffi_store32((iter_base) + 24, address274) + cleanup_list.push(address274) + + () + } + } + + () + } + DatetimeType => { + mbt_ffi_store8((iter_base) + 0, (28)) + + () + } + DurationType => { + mbt_ffi_store8((iter_base) + 0, (29)) + + () + } + QuantityType(payload278) => { + mbt_ffi_store8((iter_base) + 0, (30)) + + let ptr279 = mbt_ffi_str2ptr((payload278).base_unit) + mbt_ffi_store32((iter_base) + 12, (payload278).base_unit.length()) + mbt_ffi_store32((iter_base) + 8, ptr279) + + let address281 = mbt_ffi_malloc(((payload278).allowed_suffixes).length() * 8); + for index282 = 0; index282 < ((payload278).allowed_suffixes).length(); index282 = index282 + 1 { + let iter_elem : String = ((payload278).allowed_suffixes)[(index282)] + let iter_base = address281 + (index282 * 8); + + let ptr280 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr280) + cleanup_list.push(ptr280) + + } + mbt_ffi_store32((iter_base) + 20, ((payload278).allowed_suffixes).length()) + mbt_ffi_store32((iter_base) + 16, address281) + + match ((payload278).min) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload284) => { + mbt_ffi_store8((iter_base) + 24, (1)) + mbt_ffi_store64((iter_base) + 32, (payload284).mantissa) + mbt_ffi_store32((iter_base) + 40, (payload284).scale) + + let ptr285 = mbt_ffi_str2ptr((payload284).unit) + mbt_ffi_store32((iter_base) + 48, (payload284).unit.length()) + mbt_ffi_store32((iter_base) + 44, ptr285) + cleanup_list.push(ptr285) + + () + } + } + + match ((payload278).max) { + None => { + mbt_ffi_store8((iter_base) + 56, (0)) + + () + } + Some(payload287) => { + mbt_ffi_store8((iter_base) + 56, (1)) + mbt_ffi_store64((iter_base) + 64, (payload287).mantissa) + mbt_ffi_store32((iter_base) + 72, (payload287).scale) + + let ptr288 = mbt_ffi_str2ptr((payload287).unit) + mbt_ffi_store32((iter_base) + 80, (payload287).unit.length()) + mbt_ffi_store32((iter_base) + 76, ptr288) + cleanup_list.push(ptr288) + + () + } + } + cleanup_list.push(ptr279) + cleanup_list.push(address281) + + () + } + UnionType(payload289) => { + mbt_ffi_store8((iter_base) + 0, (31)) + + let address325 = mbt_ffi_malloc(((payload289).branches).length() * 92); + for index326 = 0; index326 < ((payload289).branches).length(); index326 = index326 + 1 { + let iter_elem : @types.UnionBranch = ((payload289).branches)[(index326)] + let iter_base = address325 + (index326 * 92); + + let ptr290 = mbt_ffi_str2ptr((iter_elem).tag) + mbt_ffi_store32((iter_base) + 4, (iter_elem).tag.length()) + mbt_ffi_store32((iter_base) + 0, ptr290) + mbt_ffi_store32((iter_base) + 8, (iter_elem).body) + + match (iter_elem).discriminator { + Prefix(payload291) => { + mbt_ffi_store8((iter_base) + 12, (0)) + + let ptr292 = mbt_ffi_str2ptr(payload291) + mbt_ffi_store32((iter_base) + 20, payload291.length()) + mbt_ffi_store32((iter_base) + 16, ptr292) + cleanup_list.push(ptr292) + + () + } + Suffix(payload293) => { + mbt_ffi_store8((iter_base) + 12, (1)) + + let ptr294 = mbt_ffi_str2ptr(payload293) + mbt_ffi_store32((iter_base) + 20, payload293.length()) + mbt_ffi_store32((iter_base) + 16, ptr294) + cleanup_list.push(ptr294) + + () + } + Contains(payload295) => { + mbt_ffi_store8((iter_base) + 12, (2)) + + let ptr296 = mbt_ffi_str2ptr(payload295) + mbt_ffi_store32((iter_base) + 20, payload295.length()) + mbt_ffi_store32((iter_base) + 16, ptr296) + cleanup_list.push(ptr296) + + () + } + Regex(payload297) => { + mbt_ffi_store8((iter_base) + 12, (3)) + + let ptr298 = mbt_ffi_str2ptr(payload297) + mbt_ffi_store32((iter_base) + 20, payload297.length()) + mbt_ffi_store32((iter_base) + 16, ptr298) + cleanup_list.push(ptr298) + + () + } + FieldEquals(payload299) => { + mbt_ffi_store8((iter_base) + 12, (4)) + + let ptr300 = mbt_ffi_str2ptr((payload299).field_name) + mbt_ffi_store32((iter_base) + 20, (payload299).field_name.length()) + mbt_ffi_store32((iter_base) + 16, ptr300) + + match ((payload299).literal) { + None => { + mbt_ffi_store8((iter_base) + 24, (0)) + + () + } + Some(payload302) => { + mbt_ffi_store8((iter_base) + 24, (1)) + + let ptr303 = mbt_ffi_str2ptr(payload302) + mbt_ffi_store32((iter_base) + 32, payload302.length()) + mbt_ffi_store32((iter_base) + 28, ptr303) + cleanup_list.push(ptr303) + + () + } + } + cleanup_list.push(ptr300) + + () + } + FieldAbsent(payload304) => { + mbt_ffi_store8((iter_base) + 12, (5)) + + let ptr305 = mbt_ffi_str2ptr(payload304) + mbt_ffi_store32((iter_base) + 20, payload304.length()) + mbt_ffi_store32((iter_base) + 16, ptr305) + cleanup_list.push(ptr305) + + () + } + } + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 36, (0)) + + () + } + Some(payload307) => { + mbt_ffi_store8((iter_base) + 36, (1)) + + let ptr308 = mbt_ffi_str2ptr(payload307) + mbt_ffi_store32((iter_base) + 44, payload307.length()) + mbt_ffi_store32((iter_base) + 40, ptr308) + cleanup_list.push(ptr308) + + () + } + } + + let address310 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index311 = 0; index311 < (((iter_elem).metadata).aliases).length(); index311 = index311 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index311)] + let iter_base = address310 + (index311 * 8); + + let ptr309 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr309) + cleanup_list.push(ptr309) + + } + mbt_ffi_store32((iter_base) + 52, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 48, address310) + + let address313 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index314 = 0; index314 < (((iter_elem).metadata).examples).length(); index314 = index314 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index314)] + let iter_base = address313 + (index314 * 8); + + let ptr312 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr312) + cleanup_list.push(ptr312) + + } + mbt_ffi_store32((iter_base) + 60, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 56, address313) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 64, (0)) + + () + } + Some(payload316) => { + mbt_ffi_store8((iter_base) + 64, (1)) + + let ptr317 = mbt_ffi_str2ptr(payload316) + mbt_ffi_store32((iter_base) + 72, payload316.length()) + mbt_ffi_store32((iter_base) + 68, ptr317) + cleanup_list.push(ptr317) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 76, (0)) + + () + } + Some(payload319) => { + mbt_ffi_store8((iter_base) + 76, (1)) + + match payload319 { + Multimodal => { + mbt_ffi_store8((iter_base) + 80, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 80, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 80, (2)) + + () + } + Other(payload323) => { + mbt_ffi_store8((iter_base) + 80, (3)) + + let ptr324 = mbt_ffi_str2ptr(payload323) + mbt_ffi_store32((iter_base) + 88, payload323.length()) + mbt_ffi_store32((iter_base) + 84, ptr324) + cleanup_list.push(ptr324) + + () + } + } + + () + } + } + cleanup_list.push(ptr290) + cleanup_list.push(address310) + cleanup_list.push(address313) + + } + mbt_ffi_store32((iter_base) + 12, ((payload289).branches).length()) + mbt_ffi_store32((iter_base) + 8, address325) + cleanup_list.push(address325) + + () + } + SecretType(payload327) => { + mbt_ffi_store8((iter_base) + 0, (32)) + + match ((payload327).category) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload329) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr330 = mbt_ffi_str2ptr(payload329) + mbt_ffi_store32((iter_base) + 16, payload329.length()) + mbt_ffi_store32((iter_base) + 12, ptr330) + cleanup_list.push(ptr330) + + () + } + } + + () + } + QuotaTokenType(payload331) => { + mbt_ffi_store8((iter_base) + 0, (33)) + + match ((payload331).resource_name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload333) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr334 = mbt_ffi_str2ptr(payload333) + mbt_ffi_store32((iter_base) + 16, payload333.length()) + mbt_ffi_store32((iter_base) + 12, ptr334) + cleanup_list.push(ptr334) + + () + } + } + + () + } + FutureType(payload335) => { + mbt_ffi_store8((iter_base) + 0, (34)) + + match (payload335) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload337) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload337) + + () + } + } + + () + } + StreamType(payload338) => { + mbt_ffi_store8((iter_base) + 0, (35)) + + match (payload338) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload340) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload340) + + () + } + } + + () + } + } + + match (((iter_elem).metadata).doc) { + None => { + mbt_ffi_store8((iter_base) + 88, (0)) + + () + } + Some(payload342) => { + mbt_ffi_store8((iter_base) + 88, (1)) + + let ptr343 = mbt_ffi_str2ptr(payload342) + mbt_ffi_store32((iter_base) + 96, payload342.length()) + mbt_ffi_store32((iter_base) + 92, ptr343) + cleanup_list.push(ptr343) + + () + } + } + + let address345 = mbt_ffi_malloc((((iter_elem).metadata).aliases).length() * 8); + for index346 = 0; index346 < (((iter_elem).metadata).aliases).length(); index346 = index346 + 1 { + let iter_elem : String = (((iter_elem).metadata).aliases)[(index346)] + let iter_base = address345 + (index346 * 8); + + let ptr344 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr344) + cleanup_list.push(ptr344) + + } + mbt_ffi_store32((iter_base) + 104, (((iter_elem).metadata).aliases).length()) + mbt_ffi_store32((iter_base) + 100, address345) + + let address348 = mbt_ffi_malloc((((iter_elem).metadata).examples).length() * 8); + for index349 = 0; index349 < (((iter_elem).metadata).examples).length(); index349 = index349 + 1 { + let iter_elem : String = (((iter_elem).metadata).examples)[(index349)] + let iter_base = address348 + (index349 * 8); + + let ptr347 = mbt_ffi_str2ptr(iter_elem) + mbt_ffi_store32((iter_base) + 4, iter_elem.length()) + mbt_ffi_store32((iter_base) + 0, ptr347) + cleanup_list.push(ptr347) + + } + mbt_ffi_store32((iter_base) + 112, (((iter_elem).metadata).examples).length()) + mbt_ffi_store32((iter_base) + 108, address348) + + match (((iter_elem).metadata).deprecated) { + None => { + mbt_ffi_store8((iter_base) + 116, (0)) + + () + } + Some(payload351) => { + mbt_ffi_store8((iter_base) + 116, (1)) + + let ptr352 = mbt_ffi_str2ptr(payload351) + mbt_ffi_store32((iter_base) + 124, payload351.length()) + mbt_ffi_store32((iter_base) + 120, ptr352) + cleanup_list.push(ptr352) + + () + } + } + + match (((iter_elem).metadata).role) { + None => { + mbt_ffi_store8((iter_base) + 128, (0)) + + () + } + Some(payload354) => { + mbt_ffi_store8((iter_base) + 128, (1)) + + match payload354 { + Multimodal => { + mbt_ffi_store8((iter_base) + 132, (0)) + + () + } + UnstructuredText => { + mbt_ffi_store8((iter_base) + 132, (1)) + + () + } + UnstructuredBinary => { + mbt_ffi_store8((iter_base) + 132, (2)) + + () + } + Other(payload358) => { + mbt_ffi_store8((iter_base) + 132, (3)) + + let ptr359 = mbt_ffi_str2ptr(payload358) + mbt_ffi_store32((iter_base) + 140, payload358.length()) + mbt_ffi_store32((iter_base) + 136, ptr359) + cleanup_list.push(ptr359) + + () + } + } + + () + } + } + cleanup_list.push(address345) + cleanup_list.push(address348) + + } + + let address366 = mbt_ffi_malloc((((input).graph).defs).length() * 24); + for index367 = 0; index367 < (((input).graph).defs).length(); index367 = index367 + 1 { + let iter_elem : @types.SchemaTypeDef = (((input).graph).defs)[(index367)] + let iter_base = address366 + (index367 * 24); + + let ptr362 = mbt_ffi_str2ptr((iter_elem).id) + mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) + mbt_ffi_store32((iter_base) + 0, ptr362) + + match ((iter_elem).name) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload364) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + let ptr365 = mbt_ffi_str2ptr(payload364) + mbt_ffi_store32((iter_base) + 16, payload364.length()) + mbt_ffi_store32((iter_base) + 12, ptr365) + cleanup_list.push(ptr365) + + () + } + } + mbt_ffi_store32((iter_base) + 20, (iter_elem).body) + cleanup_list.push(ptr362) + + } + + let address438 = mbt_ffi_malloc((((input).value).value_nodes).length() * 32); + for index439 = 0; index439 < (((input).value).value_nodes).length(); index439 = index439 + 1 { + let iter_elem : @types.SchemaValueNode = (((input).value).value_nodes)[(index439)] + let iter_base = address438 + (index439 * 32); + + match iter_elem { + BoolValue(payload368) => { + mbt_ffi_store8((iter_base) + 0, (0)) + mbt_ffi_store8((iter_base) + 8, (if payload368 { 1 } else { 0 })) + + () + } + S8Value(payload369) => { + mbt_ffi_store8((iter_base) + 0, (1)) + mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload369)) + + () + } + S16Value(payload370) => { + mbt_ffi_store8((iter_base) + 0, (2)) + mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload370)) + + () + } + S32Value(payload371) => { + mbt_ffi_store8((iter_base) + 0, (3)) + mbt_ffi_store32((iter_base) + 8, payload371) + + () + } + S64Value(payload372) => { + mbt_ffi_store8((iter_base) + 0, (4)) + mbt_ffi_store64((iter_base) + 8, payload372) + + () + } + U8Value(payload373) => { + mbt_ffi_store8((iter_base) + 0, (5)) + mbt_ffi_store8((iter_base) + 8, (payload373).to_int()) + + () + } + U16Value(payload374) => { + mbt_ffi_store8((iter_base) + 0, (6)) + mbt_ffi_store16((iter_base) + 8, (payload374).reinterpret_as_int()) + + () + } + U32Value(payload375) => { + mbt_ffi_store8((iter_base) + 0, (7)) + mbt_ffi_store32((iter_base) + 8, (payload375).reinterpret_as_int()) + + () + } + U64Value(payload376) => { + mbt_ffi_store8((iter_base) + 0, (8)) + mbt_ffi_store64((iter_base) + 8, (payload376).reinterpret_as_int64()) + + () + } + F32Value(payload377) => { + mbt_ffi_store8((iter_base) + 0, (9)) + mbt_ffi_storef32((iter_base) + 8, payload377) + + () + } + F64Value(payload378) => { + mbt_ffi_store8((iter_base) + 0, (10)) + mbt_ffi_storef64((iter_base) + 8, payload378) + + () + } + CharValue(payload379) => { + mbt_ffi_store8((iter_base) + 0, (11)) + mbt_ffi_store32((iter_base) + 8, (payload379).to_int()) + + () + } + StringValue(payload380) => { + mbt_ffi_store8((iter_base) + 0, (12)) + + let ptr381 = mbt_ffi_str2ptr(payload380) + mbt_ffi_store32((iter_base) + 12, payload380.length()) + mbt_ffi_store32((iter_base) + 8, ptr381) + cleanup_list.push(ptr381) + + () + } + RecordValue(payload382) => { + mbt_ffi_store8((iter_base) + 0, (13)) + + let address383 = mbt_ffi_malloc((payload382).length() * 4); + for index384 = 0; index384 < (payload382).length(); index384 = index384 + 1 { + let iter_elem : Int = (payload382)[(index384)] + let iter_base = address383 + (index384 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload382).length()) + mbt_ffi_store32((iter_base) + 8, address383) + cleanup_list.push(address383) + + () + } + VariantValue(payload385) => { + mbt_ffi_store8((iter_base) + 0, (14)) + mbt_ffi_store32((iter_base) + 8, ((payload385).case).reinterpret_as_int()) + + match ((payload385).payload) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload387) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload387) + + () + } + } + + () + } + EnumValue(payload388) => { + mbt_ffi_store8((iter_base) + 0, (15)) + mbt_ffi_store32((iter_base) + 8, (payload388).reinterpret_as_int()) + + () + } + FlagsValue(payload389) => { + mbt_ffi_store8((iter_base) + 0, (16)) + + let address390 = mbt_ffi_malloc((payload389).length() * 1); + for index391 = 0; index391 < (payload389).length(); index391 = index391 + 1 { + let iter_elem : Bool = (payload389)[(index391)] + let iter_base = address390 + (index391 * 1); + mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + + } + mbt_ffi_store32((iter_base) + 12, (payload389).length()) + mbt_ffi_store32((iter_base) + 8, address390) + cleanup_list.push(address390) + + () + } + TupleValue(payload392) => { + mbt_ffi_store8((iter_base) + 0, (17)) + + let address393 = mbt_ffi_malloc((payload392).length() * 4); + for index394 = 0; index394 < (payload392).length(); index394 = index394 + 1 { + let iter_elem : Int = (payload392)[(index394)] + let iter_base = address393 + (index394 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload392).length()) + mbt_ffi_store32((iter_base) + 8, address393) + cleanup_list.push(address393) + + () + } + ListValue(payload395) => { + mbt_ffi_store8((iter_base) + 0, (18)) + + let address396 = mbt_ffi_malloc((payload395).length() * 4); + for index397 = 0; index397 < (payload395).length(); index397 = index397 + 1 { + let iter_elem : Int = (payload395)[(index397)] + let iter_base = address396 + (index397 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload395).length()) + mbt_ffi_store32((iter_base) + 8, address396) + cleanup_list.push(address396) + + () + } + FixedListValue(payload398) => { + mbt_ffi_store8((iter_base) + 0, (19)) + + let address399 = mbt_ffi_malloc((payload398).length() * 4); + for index400 = 0; index400 < (payload398).length(); index400 = index400 + 1 { + let iter_elem : Int = (payload398)[(index400)] + let iter_base = address399 + (index400 * 4); + mbt_ffi_store32((iter_base) + 0, iter_elem) + + } + mbt_ffi_store32((iter_base) + 12, (payload398).length()) + mbt_ffi_store32((iter_base) + 8, address399) + cleanup_list.push(address399) + + () + } + MapValue(payload401) => { + mbt_ffi_store8((iter_base) + 0, (20)) + + let address402 = mbt_ffi_malloc((payload401).length() * 8); + for index403 = 0; index403 < (payload401).length(); index403 = index403 + 1 { + let iter_elem : @types.MapEntry = (payload401)[(index403)] + let iter_base = address402 + (index403 * 8); + mbt_ffi_store32((iter_base) + 0, (iter_elem).key) + mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + + } + mbt_ffi_store32((iter_base) + 12, (payload401).length()) + mbt_ffi_store32((iter_base) + 8, address402) + cleanup_list.push(address402) + + () + } + OptionValue(payload404) => { + mbt_ffi_store8((iter_base) + 0, (21)) + + match (payload404) { + None => { + mbt_ffi_store8((iter_base) + 8, (0)) + + () + } + Some(payload406) => { + mbt_ffi_store8((iter_base) + 8, (1)) + mbt_ffi_store32((iter_base) + 12, payload406) + + () + } + } + + () + } + ResultValue(payload407) => { + mbt_ffi_store8((iter_base) + 0, (22)) + + match payload407 { + OkValue(payload408) => { + mbt_ffi_store8((iter_base) + 8, (0)) + + match (payload408) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload410) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload410) + + () + } + } + + () + } + ErrValue(payload411) => { + mbt_ffi_store8((iter_base) + 8, (1)) + + match (payload411) { + None => { + mbt_ffi_store8((iter_base) + 12, (0)) + + () + } + Some(payload413) => { + mbt_ffi_store8((iter_base) + 12, (1)) + mbt_ffi_store32((iter_base) + 16, payload413) + + () + } + } + + () + } + } + + () + } + TextValue(payload414) => { + mbt_ffi_store8((iter_base) + 0, (23)) + + let ptr415 = mbt_ffi_str2ptr((payload414).text) + mbt_ffi_store32((iter_base) + 12, (payload414).text.length()) + mbt_ffi_store32((iter_base) + 8, ptr415) + + match ((payload414).language) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload417) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr418 = mbt_ffi_str2ptr(payload417) + mbt_ffi_store32((iter_base) + 24, payload417.length()) + mbt_ffi_store32((iter_base) + 20, ptr418) + cleanup_list.push(ptr418) + + () + } + } + cleanup_list.push(ptr415) + + () + } + BinaryValue(payload419) => { + mbt_ffi_store8((iter_base) + 0, (24)) + + let ptr420 = mbt_ffi_bytes2ptr((payload419).bytes) + + mbt_ffi_store32((iter_base) + 12, (payload419).bytes.length()) + mbt_ffi_store32((iter_base) + 8, ptr420) + + match ((payload419).mime_type) { + None => { + mbt_ffi_store8((iter_base) + 16, (0)) + + () + } + Some(payload422) => { + mbt_ffi_store8((iter_base) + 16, (1)) + + let ptr423 = mbt_ffi_str2ptr(payload422) + mbt_ffi_store32((iter_base) + 24, payload422.length()) + mbt_ffi_store32((iter_base) + 20, ptr423) + cleanup_list.push(ptr423) + + () + } + } + cleanup_list.push(ptr420) + + () + } + PathValue(payload424) => { + mbt_ffi_store8((iter_base) + 0, (25)) + + let ptr425 = mbt_ffi_str2ptr(payload424) + mbt_ffi_store32((iter_base) + 12, payload424.length()) + mbt_ffi_store32((iter_base) + 8, ptr425) + cleanup_list.push(ptr425) + + () + } + UrlValue(payload426) => { + mbt_ffi_store8((iter_base) + 0, (26)) + + let ptr427 = mbt_ffi_str2ptr(payload426) + mbt_ffi_store32((iter_base) + 12, payload426.length()) + mbt_ffi_store32((iter_base) + 8, ptr427) + cleanup_list.push(ptr427) + + () + } + DatetimeValue(payload428) => { + mbt_ffi_store8((iter_base) + 0, (27)) + mbt_ffi_store64((iter_base) + 8, (payload428).seconds) + mbt_ffi_store32((iter_base) + 16, ((payload428).nanoseconds).reinterpret_as_int()) + + () + } + DurationValue(payload429) => { + mbt_ffi_store8((iter_base) + 0, (28)) + mbt_ffi_store64((iter_base) + 8, (payload429).nanoseconds) + + () + } + QuantityValueNode(payload430) => { + mbt_ffi_store8((iter_base) + 0, (29)) + mbt_ffi_store64((iter_base) + 8, (payload430).mantissa) + mbt_ffi_store32((iter_base) + 16, (payload430).scale) + + let ptr431 = mbt_ffi_str2ptr((payload430).unit) + mbt_ffi_store32((iter_base) + 24, (payload430).unit.length()) + mbt_ffi_store32((iter_base) + 20, ptr431) + cleanup_list.push(ptr431) + + () + } + UnionValue(payload432) => { + mbt_ffi_store8((iter_base) + 0, (30)) + + let ptr433 = mbt_ffi_str2ptr((payload432).tag) + mbt_ffi_store32((iter_base) + 12, (payload432).tag.length()) + mbt_ffi_store32((iter_base) + 8, ptr433) + mbt_ffi_store32((iter_base) + 16, (payload432).body) + cleanup_list.push(ptr433) + + () + } + SecretValue(payload434) => { + mbt_ffi_store8((iter_base) + 0, (31)) + + let ptr435 = mbt_ffi_str2ptr((payload434).secret_ref) + mbt_ffi_store32((iter_base) + 12, (payload434).secret_ref.length()) + mbt_ffi_store32((iter_base) + 8, ptr435) + cleanup_list.push(ptr435) + + () + } + QuotaTokenHandle(payload436) => { + mbt_ffi_store8((iter_base) + 0, (32)) + + let @types.QuotaToken(handle437) = payload436 + mbt_ffi_store32((iter_base) + 8, handle437) + + () + } + } + + } + + let (lowered, lowered443) = match (stdin) { + None => { + + ((0), 0) + } + Some(payload441) => { + + let @streams.InputStream(handle442) = payload441 + + ((1), handle442) + } + } + let result : Int = wasmImportMethodToolRpcAsyncInvokeAndAwait(handle, address, (command_path).length(), address360, (((input).graph).type_nodes).length(), address366, (((input).graph).defs).length(), ((input).graph).root, address438, (((input).value).value_nodes).length(), ((input).value).root, lowered, lowered443); + let ret = FutureInvokeResult::FutureInvokeResult(result) + mbt_ffi_free(address) + mbt_ffi_free(address360) + mbt_ffi_free(address366) + mbt_ffi_free(address438) + + cleanup_list.each(mbt_ffi_free) + return ret + +} +///| +pub fn FutureInvokeResult::subscribe(self : FutureInvokeResult) -> @poll.Pollable { + + let FutureInvokeResult(handle) = self + let result : Int = wasmImportMethodFutureInvokeResultSubscribe(handle); + let ret = @poll.Pollable::Pollable(result) + return ret + +} +///| +pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.InvocationResult, RpcError]? { + + let FutureInvokeResult(handle) = self + let return_area = mbt_ffi_malloc(52) + wasmImportMethodFutureInvokeResultGet(handle, return_area); + + let lifted482 : Result[@common.InvocationResult, RpcError]? = match mbt_ffi_load8_u((return_area) + 0) { + 0 => Option::None + 1 => { + + let lifted481 = match (mbt_ffi_load8_u((return_area) + 4)) { + 0 => { + + let lifted231 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((return_area) + 8) { + 0 => Option::None + 1 => { + + let array192 : Array[@types.SchemaTypeNode] = []; + for index193 = 0; index193 < (mbt_ffi_load32((return_area) + 16)); index193 = index193 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index193 * 144) + + let lifted178 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + } + 1 => { + + @types.SchemaTypeBody::BoolType + } + 2 => { + + let lifted4 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted0 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted) + } + _ => panic() + } + + let lifted2 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted1 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted1) + } + _ => panic() + } + + let lifted3 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted0, max : lifted2, unit : lifted3}) + } + _ => panic() + } + + @types.SchemaTypeBody::S8Type(lifted4) + } + 3 => { + + let lifted11 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted6 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted5 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted5) + } + _ => panic() + } + + let lifted8 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted7 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted7) + } + _ => panic() + } + + let lifted10 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result9 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result9) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted6, max : lifted8, unit : lifted10}) + } + _ => panic() + } + + @types.SchemaTypeBody::S16Type(lifted11) + } + 4 => { + + let lifted18 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted13 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted12 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted12) + } + _ => panic() + } + + let lifted15 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted14 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted14) + } + _ => panic() + } + + let lifted17 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result16 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result16) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted13, max : lifted15, unit : lifted17}) + } + _ => panic() + } + + @types.SchemaTypeBody::S32Type(lifted18) + } + 5 => { + + let lifted25 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted20 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted19 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted19) + } + _ => panic() + } + + let lifted22 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted21 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted21) + } + _ => panic() + } + + let lifted24 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result23 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result23) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted20, max : lifted22, unit : lifted24}) + } + _ => panic() + } + + @types.SchemaTypeBody::S64Type(lifted25) + } + 6 => { + + let lifted32 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted27 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted26 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted26) + } + _ => panic() + } + + let lifted29 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted28 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted28) + } + _ => panic() + } + + let lifted31 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result30 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result30) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted27, max : lifted29, unit : lifted31}) + } + _ => panic() + } + + @types.SchemaTypeBody::U8Type(lifted32) + } + 7 => { + + let lifted39 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted34 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted33 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted33) + } + _ => panic() + } + + let lifted36 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted35 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted35) + } + _ => panic() + } + + let lifted38 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result37 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result37) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted34, max : lifted36, unit : lifted38}) + } + _ => panic() + } + + @types.SchemaTypeBody::U16Type(lifted39) + } + 8 => { + + let lifted46 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted41 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted40 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted40) + } + _ => panic() + } + + let lifted43 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted42 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted42) + } + _ => panic() + } + + let lifted45 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result44 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result44) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted41, max : lifted43, unit : lifted45}) + } + _ => panic() + } + + @types.SchemaTypeBody::U32Type(lifted46) + } + 9 => { + + let lifted53 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted48 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted47 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted47) + } + _ => panic() + } + + let lifted50 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted49 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted49) + } + _ => panic() + } + + let lifted52 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result51 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result51) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted48, max : lifted50, unit : lifted52}) + } + _ => panic() + } + + @types.SchemaTypeBody::U64Type(lifted53) + } + 10 => { + + let lifted60 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted55 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted54 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted54) + } + _ => panic() + } + + let lifted57 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted56 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted56) + } + _ => panic() + } + + let lifted59 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result58 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result58) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted55, max : lifted57, unit : lifted59}) + } + _ => panic() + } + + @types.SchemaTypeBody::F32Type(lifted60) + } + 11 => { + + let lifted67 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted62 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { + + let lifted61 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted61) + } + _ => panic() + } + + let lifted64 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { + + let lifted63 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted63) + } + _ => panic() + } + + let lifted66 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result65 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result65) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted62, max : lifted64, unit : lifted66}) + } + _ => panic() + } + + @types.SchemaTypeBody::F64Type(lifted67) + } + 12 => { + + @types.SchemaTypeBody::CharType + } + 13 => { - } + @types.SchemaTypeBody::StringType + } + 14 => { - let address216 = mbt_ffi_malloc((((input).graph).defs).length() * 24); - for index217 = 0; index217 < (((input).graph).defs).length(); index217 = index217 + 1 { - let iter_elem : @types.SchemaTypeDef = (((input).graph).defs)[(index217)] - let iter_base = address216 + (index217 * 24); + let array80 : Array[@types.NamedFieldType] = []; + for index81 = 0; index81 < (mbt_ffi_load32((iter_base) + 12)); index81 = index81 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index81 * 68) - let ptr212 = mbt_ffi_str2ptr((iter_elem).id) - mbt_ffi_store32((iter_base) + 4, (iter_elem).id.length()) - mbt_ffi_store32((iter_base) + 0, ptr212) + let result68 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - match ((iter_elem).name) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + let lifted70 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - () - } - Some(payload214) => { - mbt_ffi_store8((iter_base) + 8, (1)) + let result69 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let ptr215 = mbt_ffi_str2ptr(payload214) - mbt_ffi_store32((iter_base) + 16, payload214.length()) - mbt_ffi_store32((iter_base) + 12, ptr215) - cleanup_list.push(ptr215) + Option::Some(result69) + } + _ => panic() + } - () - } - } - mbt_ffi_store32((iter_base) + 20, (iter_elem).body) - cleanup_list.push(ptr212) + let array : Array[String] = []; + for index = 0; index < (mbt_ffi_load32((iter_base) + 28)); index = index + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index * 8) - } + let result71 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let address288 = mbt_ffi_malloc((((input).value).value_nodes).length() * 32); - for index289 = 0; index289 < (((input).value).value_nodes).length(); index289 = index289 + 1 { - let iter_elem : @types.SchemaValueNode = (((input).value).value_nodes)[(index289)] - let iter_base = address288 + (index289 * 32); + array.push(result71) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - match iter_elem { - BoolValue(payload218) => { - mbt_ffi_store8((iter_base) + 0, (0)) - mbt_ffi_store8((iter_base) + 8, (if payload218 { 1 } else { 0 })) + let array73 : Array[String] = []; + for index74 = 0; index74 < (mbt_ffi_load32((iter_base) + 36)); index74 = index74 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index74 * 8) - () - } - S8Value(payload219) => { - mbt_ffi_store8((iter_base) + 0, (1)) - mbt_ffi_store8((iter_base) + 8, mbt_ffi_extend8(payload219)) + let result72 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - S16Value(payload220) => { - mbt_ffi_store8((iter_base) + 0, (2)) - mbt_ffi_store16((iter_base) + 8, mbt_ffi_extend16(payload220)) + array73.push(result72) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - () - } - S32Value(payload221) => { - mbt_ffi_store8((iter_base) + 0, (3)) - mbt_ffi_store32((iter_base) + 8, payload221) + let lifted76 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - () - } - S64Value(payload222) => { - mbt_ffi_store8((iter_base) + 0, (4)) - mbt_ffi_store64((iter_base) + 8, payload222) + let result75 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - () - } - U8Value(payload223) => { - mbt_ffi_store8((iter_base) + 0, (5)) - mbt_ffi_store8((iter_base) + 8, (payload223).to_int()) + Option::Some(result75) + } + _ => panic() + } - () - } - U16Value(payload224) => { - mbt_ffi_store8((iter_base) + 0, (6)) - mbt_ffi_store16((iter_base) + 8, (payload224).reinterpret_as_int()) + let lifted79 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + 0 => Option::None + 1 => { - () - } - U32Value(payload225) => { - mbt_ffi_store8((iter_base) + 0, (7)) - mbt_ffi_store32((iter_base) + 8, (payload225).reinterpret_as_int()) + let lifted78 = match (mbt_ffi_load8_u((iter_base) + 56)) { + 0 => { - () - } - U64Value(payload226) => { - mbt_ffi_store8((iter_base) + 0, (8)) - mbt_ffi_store64((iter_base) + 8, (payload226).reinterpret_as_int64()) + @types.Role::Multimodal + } + 1 => { - () - } - F32Value(payload227) => { - mbt_ffi_store8((iter_base) + 0, (9)) - mbt_ffi_storef32((iter_base) + 8, payload227) + @types.Role::UnstructuredText + } + 2 => { - () - } - F64Value(payload228) => { - mbt_ffi_store8((iter_base) + 0, (10)) - mbt_ffi_storef64((iter_base) + 8, payload228) + @types.Role::UnstructuredBinary + } + 3 => { - () - } - CharValue(payload229) => { - mbt_ffi_store8((iter_base) + 0, (11)) - mbt_ffi_store32((iter_base) + 8, (payload229).to_int()) + let result77 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - () - } - StringValue(payload230) => { - mbt_ffi_store8((iter_base) + 0, (12)) + @types.Role::Other(result77) + } + _ => panic() + } - let ptr231 = mbt_ffi_str2ptr(payload230) - mbt_ffi_store32((iter_base) + 12, payload230.length()) - mbt_ffi_store32((iter_base) + 8, ptr231) - cleanup_list.push(ptr231) + Option::Some(lifted78) + } + _ => panic() + } - () - } - RecordValue(payload232) => { - mbt_ffi_store8((iter_base) + 0, (13)) + array80.push(@types.NamedFieldType::{name : result68, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted70, aliases : array, examples : array73, deprecated : lifted76, role : lifted79}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let address233 = mbt_ffi_malloc((payload232).length() * 4); - for index234 = 0; index234 < (payload232).length(); index234 = index234 + 1 { - let iter_elem : Int = (payload232)[(index234)] - let iter_base = address233 + (index234 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + @types.SchemaTypeBody::RecordType(array80) + } + 15 => { - } - mbt_ffi_store32((iter_base) + 12, (payload232).length()) - mbt_ffi_store32((iter_base) + 8, address233) - cleanup_list.push(address233) + let array97 : Array[@types.VariantCaseType] = []; + for index98 = 0; index98 < (mbt_ffi_load32((iter_base) + 12)); index98 = index98 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index98 * 72) - () - } - VariantValue(payload235) => { - mbt_ffi_store8((iter_base) + 0, (14)) - mbt_ffi_store32((iter_base) + 8, ((payload235).case).reinterpret_as_int()) + let result82 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - match ((payload235).payload) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let lifted83 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - Some(payload237) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload237) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - () - } - } + let lifted85 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - () - } - EnumValue(payload238) => { - mbt_ffi_store8((iter_base) + 0, (15)) - mbt_ffi_store32((iter_base) + 8, (payload238).reinterpret_as_int()) + let result84 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - () - } - FlagsValue(payload239) => { - mbt_ffi_store8((iter_base) + 0, (16)) + Option::Some(result84) + } + _ => panic() + } - let address240 = mbt_ffi_malloc((payload239).length() * 1); - for index241 = 0; index241 < (payload239).length(); index241 = index241 + 1 { - let iter_elem : Bool = (payload239)[(index241)] - let iter_base = address240 + (index241 * 1); - mbt_ffi_store8((iter_base) + 0, (if iter_elem { 1 } else { 0 })) + let array87 : Array[String] = []; + for index88 = 0; index88 < (mbt_ffi_load32((iter_base) + 32)); index88 = index88 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index88 * 8) - } - mbt_ffi_store32((iter_base) + 12, (payload239).length()) - mbt_ffi_store32((iter_base) + 8, address240) - cleanup_list.push(address240) + let result86 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - TupleValue(payload242) => { - mbt_ffi_store8((iter_base) + 0, (17)) + array87.push(result86) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let address243 = mbt_ffi_malloc((payload242).length() * 4); - for index244 = 0; index244 < (payload242).length(); index244 = index244 + 1 { - let iter_elem : Int = (payload242)[(index244)] - let iter_base = address243 + (index244 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let array90 : Array[String] = []; + for index91 = 0; index91 < (mbt_ffi_load32((iter_base) + 40)); index91 = index91 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index91 * 8) - } - mbt_ffi_store32((iter_base) + 12, (payload242).length()) - mbt_ffi_store32((iter_base) + 8, address243) - cleanup_list.push(address243) + let result89 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - ListValue(payload245) => { - mbt_ffi_store8((iter_base) + 0, (18)) + array90.push(result89) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let address246 = mbt_ffi_malloc((payload245).length() * 4); - for index247 = 0; index247 < (payload245).length(); index247 = index247 + 1 { - let iter_elem : Int = (payload245)[(index247)] - let iter_base = address246 + (index247 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted93 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload245).length()) - mbt_ffi_store32((iter_base) + 8, address246) - cleanup_list.push(address246) + let result92 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - () - } - FixedListValue(payload248) => { - mbt_ffi_store8((iter_base) + 0, (19)) + Option::Some(result92) + } + _ => panic() + } - let address249 = mbt_ffi_malloc((payload248).length() * 4); - for index250 = 0; index250 < (payload248).length(); index250 = index250 + 1 { - let iter_elem : Int = (payload248)[(index250)] - let iter_base = address249 + (index250 * 4); - mbt_ffi_store32((iter_base) + 0, iter_elem) + let lifted96 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - } - mbt_ffi_store32((iter_base) + 12, (payload248).length()) - mbt_ffi_store32((iter_base) + 8, address249) - cleanup_list.push(address249) + let lifted95 = match (mbt_ffi_load8_u((iter_base) + 60)) { + 0 => { - () - } - MapValue(payload251) => { - mbt_ffi_store8((iter_base) + 0, (20)) + @types.Role::Multimodal + } + 1 => { - let address252 = mbt_ffi_malloc((payload251).length() * 8); - for index253 = 0; index253 < (payload251).length(); index253 = index253 + 1 { - let iter_elem : @types.MapEntry = (payload251)[(index253)] - let iter_base = address252 + (index253 * 8); - mbt_ffi_store32((iter_base) + 0, (iter_elem).key) - mbt_ffi_store32((iter_base) + 4, (iter_elem).value) + @types.Role::UnstructuredText + } + 2 => { - } - mbt_ffi_store32((iter_base) + 12, (payload251).length()) - mbt_ffi_store32((iter_base) + 8, address252) - cleanup_list.push(address252) + @types.Role::UnstructuredBinary + } + 3 => { - () - } - OptionValue(payload254) => { - mbt_ffi_store8((iter_base) + 0, (21)) + let result94 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - match (payload254) { - None => { - mbt_ffi_store8((iter_base) + 8, (0)) + @types.Role::Other(result94) + } + _ => panic() + } - () - } - Some(payload256) => { - mbt_ffi_store8((iter_base) + 8, (1)) - mbt_ffi_store32((iter_base) + 12, payload256) + Option::Some(lifted95) + } + _ => panic() + } - () - } - } + array97.push(@types.VariantCaseType::{name : result82, payload : lifted83, metadata : @types.MetadataEnvelope::{doc : lifted85, aliases : array87, examples : array90, deprecated : lifted93, role : lifted96}}) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - ResultValue(payload257) => { - mbt_ffi_store8((iter_base) + 0, (22)) + @types.SchemaTypeBody::VariantType(array97) + } + 16 => { - match payload257 { - OkValue(payload258) => { - mbt_ffi_store8((iter_base) + 8, (0)) + let array100 : Array[String] = []; + for index101 = 0; index101 < (mbt_ffi_load32((iter_base) + 12)); index101 = index101 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index101 * 8) - match (payload258) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let result99 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - Some(payload260) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload260) + array100.push(result99) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - } + @types.SchemaTypeBody::EnumType(array100) + } + 17 => { - () - } - ErrValue(payload261) => { - mbt_ffi_store8((iter_base) + 8, (1)) + let array103 : Array[String] = []; + for index104 = 0; index104 < (mbt_ffi_load32((iter_base) + 12)); index104 = index104 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index104 * 8) - match (payload261) { - None => { - mbt_ffi_store8((iter_base) + 12, (0)) + let result102 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - Some(payload263) => { - mbt_ffi_store8((iter_base) + 12, (1)) - mbt_ffi_store32((iter_base) + 16, payload263) + array103.push(result102) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - () - } - } + @types.SchemaTypeBody::FlagsType(array103) + } + 18 => { - () - } - } + let array105 : Array[Int] = []; + for index106 = 0; index106 < (mbt_ffi_load32((iter_base) + 12)); index106 = index106 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index106 * 4) - () - } - TextValue(payload264) => { - mbt_ffi_store8((iter_base) + 0, (23)) + array105.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let ptr265 = mbt_ffi_str2ptr((payload264).text) - mbt_ffi_store32((iter_base) + 12, (payload264).text.length()) - mbt_ffi_store32((iter_base) + 8, ptr265) + @types.SchemaTypeBody::TupleType(array105) + } + 19 => { - match ((payload264).language) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) + } + 20 => { - () - } - Some(payload267) => { - mbt_ffi_store8((iter_base) + 16, (1)) + @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + } + 21 => { + + @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + } + 22 => { - let ptr268 = mbt_ffi_str2ptr(payload267) - mbt_ffi_store32((iter_base) + 24, payload267.length()) - mbt_ffi_store32((iter_base) + 20, ptr268) - cleanup_list.push(ptr268) + @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + } + 23 => { - () - } - } - cleanup_list.push(ptr265) + let lifted107 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - () - } - BinaryValue(payload269) => { - mbt_ffi_store8((iter_base) + 0, (24)) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } - let ptr270 = mbt_ffi_bytes2ptr((payload269).bytes) + let lifted108 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - mbt_ffi_store32((iter_base) + 12, (payload269).bytes.length()) - mbt_ffi_store32((iter_base) + 8, ptr270) + Option::Some(mbt_ffi_load32((iter_base) + 20)) + } + _ => panic() + } - match ((payload269).mime_type) { - None => { - mbt_ffi_store8((iter_base) + 16, (0)) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted107, err : lifted108}) + } + 24 => { - () - } - Some(payload272) => { - mbt_ffi_store8((iter_base) + 16, (1)) + let lifted112 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr273 = mbt_ffi_str2ptr(payload272) - mbt_ffi_store32((iter_base) + 24, payload272.length()) - mbt_ffi_store32((iter_base) + 20, ptr273) - cleanup_list.push(ptr273) + let array110 : Array[String] = []; + for index111 = 0; index111 < (mbt_ffi_load32((iter_base) + 16)); index111 = index111 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index111 * 8) - () - } - } - cleanup_list.push(ptr270) + let result109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - () - } - PathValue(payload274) => { - mbt_ffi_store8((iter_base) + 0, (25)) + array110.push(result109) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - let ptr275 = mbt_ffi_str2ptr(payload274) - mbt_ffi_store32((iter_base) + 12, payload274.length()) - mbt_ffi_store32((iter_base) + 8, ptr275) - cleanup_list.push(ptr275) + Option::Some(array110) + } + _ => panic() + } - () - } - UrlValue(payload276) => { - mbt_ffi_store8((iter_base) + 0, (26)) + let lifted113 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - let ptr277 = mbt_ffi_str2ptr(payload276) - mbt_ffi_store32((iter_base) + 12, payload276.length()) - mbt_ffi_store32((iter_base) + 8, ptr277) - cleanup_list.push(ptr277) + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } - () - } - DatetimeValue(payload278) => { - mbt_ffi_store8((iter_base) + 0, (27)) - mbt_ffi_store64((iter_base) + 8, (payload278).seconds) - mbt_ffi_store32((iter_base) + 16, ((payload278).nanoseconds).reinterpret_as_int()) + let lifted114 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - () - } - DurationValue(payload279) => { - mbt_ffi_store8((iter_base) + 0, (28)) - mbt_ffi_store64((iter_base) + 8, (payload279).nanoseconds) + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } - () - } - QuantityValueNode(payload280) => { - mbt_ffi_store8((iter_base) + 0, (29)) - mbt_ffi_store64((iter_base) + 8, (payload280).mantissa) - mbt_ffi_store32((iter_base) + 16, (payload280).scale) + let lifted116 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + 0 => Option::None + 1 => { - let ptr281 = mbt_ffi_str2ptr((payload280).unit) - mbt_ffi_store32((iter_base) + 24, (payload280).unit.length()) - mbt_ffi_store32((iter_base) + 20, ptr281) - cleanup_list.push(ptr281) + let result115 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - () - } - UnionValue(payload282) => { - mbt_ffi_store8((iter_base) + 0, (30)) + Option::Some(result115) + } + _ => panic() + } - let ptr283 = mbt_ffi_str2ptr((payload282).tag) - mbt_ffi_store32((iter_base) + 12, (payload282).tag.length()) - mbt_ffi_store32((iter_base) + 8, ptr283) - mbt_ffi_store32((iter_base) + 16, (payload282).body) - cleanup_list.push(ptr283) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted112, min_length : lifted113, max_length : lifted114, regex : lifted116}) + } + 25 => { - () - } - SecretValue(payload284) => { - mbt_ffi_store8((iter_base) + 0, (31)) + let lifted120 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let ptr285 = mbt_ffi_str2ptr((payload284).secret_ref) - mbt_ffi_store32((iter_base) + 12, (payload284).secret_ref.length()) - mbt_ffi_store32((iter_base) + 8, ptr285) - cleanup_list.push(ptr285) + let array118 : Array[String] = []; + for index119 = 0; index119 < (mbt_ffi_load32((iter_base) + 16)); index119 = index119 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index119 * 8) - () - } - QuotaTokenHandle(payload286) => { - mbt_ffi_store8((iter_base) + 0, (32)) + let result117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let @types.QuotaToken(handle287) = payload286 - mbt_ffi_store32((iter_base) + 8, handle287) + array118.push(result117) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - () - } - } + Option::Some(array118) + } + _ => panic() + } - } + let lifted121 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - let (lowered, lowered293) = match (stdin) { - None => { + Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + } + _ => panic() + } - ((0), 0) - } - Some(payload291) => { + let lifted122 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + 0 => Option::None + 1 => { - let @streams.InputStream(handle292) = payload291 + Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + } + _ => panic() + } - ((1), handle292) - } - } - let result : Int = wasmImportMethodToolRpcAsyncInvokeAndAwait(handle, address, (command_path).length(), address210, (((input).graph).type_nodes).length(), address216, (((input).graph).defs).length(), ((input).graph).root, address288, (((input).value).value_nodes).length(), ((input).value).root, lowered, lowered293); - let ret = FutureInvokeResult::FutureInvokeResult(result) - mbt_ffi_free(address) - mbt_ffi_free(address210) - mbt_ffi_free(address216) - mbt_ffi_free(address288) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted120, min_bytes : lifted121, max_bytes : lifted122}) + } + 26 => { - cleanup_list.each(mbt_ffi_free) - return ret + let lifted126 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { -} -///| -pub fn FutureInvokeResult::subscribe(self : FutureInvokeResult) -> @poll.Pollable { + let array124 : Array[String] = []; + for index125 = 0; index125 < (mbt_ffi_load32((iter_base) + 20)); index125 = index125 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index125 * 8) - let FutureInvokeResult(handle) = self - let result : Int = wasmImportMethodFutureInvokeResultSubscribe(handle); - let ret = @poll.Pollable::Pollable(result) - return ret + let result123 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) -} -///| -pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.InvocationResult, RpcError]? { + array124.push(result123) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let FutureInvokeResult(handle) = self - let return_area = mbt_ffi_malloc(52) - wasmImportMethodFutureInvokeResultGet(handle, return_area); + Option::Some(array124) + } + _ => panic() + } - let lifted342 : Result[@common.InvocationResult, RpcError]? = match mbt_ffi_load8_u((return_area) + 0) { - 0 => Option::None - 1 => { + let lifted130 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - let lifted341 = match (mbt_ffi_load8_u((return_area) + 4)) { - 0 => { + let array128 : Array[String] = []; + for index129 = 0; index129 < (mbt_ffi_load32((iter_base) + 32)); index129 = index129 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index129 * 8) - let lifted161 : @types.TypedSchemaValue? = match mbt_ffi_load8_u((return_area) + 8) { - 0 => Option::None - 1 => { + let result127 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let array122 : Array[@types.SchemaTypeNode] = []; - for index123 = 0; index123 < (mbt_ffi_load32((return_area) + 16)); index123 = index123 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 12)) + (index123 * 144) + array128.push(result127) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let lifted108 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + Option::Some(array128) + } + _ => panic() + } - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted126, allowed_extensions : lifted130}) } - 1 => { + 27 => { - @types.SchemaTypeBody::BoolType - } - 2 => { + let lifted134 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S8Type - } - 3 => { + let array132 : Array[String] = []; + for index133 = 0; index133 < (mbt_ffi_load32((iter_base) + 16)); index133 = index133 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index133 * 8) - @types.SchemaTypeBody::S16Type - } - 4 => { + let result131 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaTypeBody::S32Type - } - 5 => { + array132.push(result131) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - @types.SchemaTypeBody::S64Type - } - 6 => { + Option::Some(array132) + } + _ => panic() + } - @types.SchemaTypeBody::U8Type - } - 7 => { + let lifted138 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + let array136 : Array[String] = []; + for index137 = 0; index137 < (mbt_ffi_load32((iter_base) + 28)); index137 = index137 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index137 * 8) - @types.SchemaTypeBody::U32Type - } - 9 => { + let result135 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - @types.SchemaTypeBody::U64Type - } - 10 => { + array136.push(result135) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - @types.SchemaTypeBody::F32Type - } - 11 => { + Option::Some(array136) + } + _ => panic() + } - @types.SchemaTypeBody::F64Type + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted134, allowed_hosts : lifted138}) } - 12 => { + 28 => { - @types.SchemaTypeBody::CharType + @types.SchemaTypeBody::DatetimeType } - 13 => { + 29 => { - @types.SchemaTypeBody::StringType + @types.SchemaTypeBody::DurationType } - 14 => { + 30 => { - let array10 : Array[@types.NamedFieldType] = []; - for index11 = 0; index11 < (mbt_ffi_load32((iter_base) + 12)); index11 = index11 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index11 * 68) + let result139 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array141 : Array[String] = []; + for index142 = 0; index142 < (mbt_ffi_load32((iter_base) + 20)); index142 = index142 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index142 * 8) - let lifted : String? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let result140 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array141.push(result140) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let result0 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let lifted144 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - Option::Some(result0) - } - _ => panic() + let result143 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result143}) } + _ => panic() + } - let array : Array[String] = []; - for index = 0; index < (mbt_ffi_load32((iter_base) + 28)); index = index + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index * 8) + let lifted146 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + 0 => Option::None + 1 => { - let result1 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result145 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - array.push(result1) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result145}) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + _ => panic() + } - let array3 : Array[String] = []; - for index4 = 0; index4 < (mbt_ffi_load32((iter_base) + 36)); index4 = index4 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index4 * 8) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result139, allowed_suffixes : array141, min : lifted144, max : lifted146}) + } + 31 => { - let result2 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let array170 : Array[@types.UnionBranch] = []; + for index171 = 0; index171 < (mbt_ffi_load32((iter_base) + 12)); index171 = index171 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index171 * 92) - array3.push(result2) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) + let result147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted6 : String? = match mbt_ffi_load8_u((iter_base) + 40) { - 0 => Option::None - 1 => { + let lifted156 = match (mbt_ffi_load8_u((iter_base) + 12)) { + 0 => { - let result5 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result5) + @types.DiscriminatorRule::Prefix(result148) } - _ => panic() - } - - let lifted9 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { - 0 => Option::None 1 => { - let lifted8 = match (mbt_ffi_load8_u((iter_base) + 56)) { - 0 => { - - @types.Role::Multimodal - } - 1 => { + let result149 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.Role::UnstructuredText - } - 2 => { + @types.DiscriminatorRule::Suffix(result149) + } + 2 => { - @types.Role::UnstructuredBinary - } - 3 => { + let result150 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let result7 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + @types.DiscriminatorRule::Contains(result150) + } + 3 => { - @types.Role::Other(result7) - } - _ => panic() - } + let result151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(lifted8) + @types.DiscriminatorRule::Regex(result151) } - _ => panic() - } + 4 => { - array10.push(@types.NamedFieldType::{name : result, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted, aliases : array, examples : array3, deprecated : lifted6, role : lifted9}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let result152 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.SchemaTypeBody::RecordType(array10) - } - 15 => { + let lifted154 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + 0 => Option::None + 1 => { - let array27 : Array[@types.VariantCaseType] = []; - for index28 = 0; index28 < (mbt_ffi_load32((iter_base) + 12)); index28 = index28 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index28 * 72) + let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + + Option::Some(result153) + } + _ => panic() + } - let result12 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result152, literal : lifted154}) + } + 5 => { - let lifted13 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) + @types.DiscriminatorRule::FieldAbsent(result155) } _ => panic() } - let lifted15 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted158 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result14 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result14) + Option::Some(result157) } _ => panic() } - let array17 : Array[String] = []; - for index18 = 0; index18 < (mbt_ffi_load32((iter_base) + 32)); index18 = index18 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index18 * 8) + let array160 : Array[String] = []; + for index161 = 0; index161 < (mbt_ffi_load32((iter_base) + 52)); index161 = index161 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index161 * 8) - let result16 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result159 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array17.push(result16) + array160.push(result159) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array20 : Array[String] = []; - for index21 = 0; index21 < (mbt_ffi_load32((iter_base) + 40)); index21 = index21 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index21 * 8) + let array163 : Array[String] = []; + for index164 = 0; index164 < (mbt_ffi_load32((iter_base) + 60)); index164 = index164 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index164 * 8) - let result19 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result162 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array20.push(result19) + array163.push(result162) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) + mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted23 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted166 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result22 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result22) + Option::Some(result165) } _ => panic() } - let lifted26 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted169 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted25 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted168 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -18630,1036 +26319,1297 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo } 3 => { - let result24 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result167 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result24) + @types.Role::Other(result167) } _ => panic() } - Option::Some(lifted25) + Option::Some(lifted168) } _ => panic() } - array27.push(@types.VariantCaseType::{name : result12, payload : lifted13, metadata : @types.MetadataEnvelope::{doc : lifted15, aliases : array17, examples : array20, deprecated : lifted23, role : lifted26}}) + array170.push(@types.UnionBranch::{tag : result147, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted156, metadata : @types.MetadataEnvelope::{doc : lifted158, aliases : array160, examples : array163, deprecated : lifted166, role : lifted169}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array27) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array170}) } - 16 => { + 32 => { - let array30 : Array[String] = []; - for index31 = 0; index31 < (mbt_ffi_load32((iter_base) + 12)); index31 = index31 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index31 * 8) + let lifted173 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result29 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result172 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - array30.push(result29) + Option::Some(result172) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array30) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted173}) } - 17 => { + 33 => { - let array33 : Array[String] = []; - for index34 = 0; index34 < (mbt_ffi_load32((iter_base) + 12)); index34 = index34 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index34 * 8) + let lifted175 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let result32 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result174 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - array33.push(result32) + Option::Some(result174) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array33) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted175}) } - 18 => { + 34 => { - let array35 : Array[Int] = []; - for index36 = 0; index36 < (mbt_ffi_load32((iter_base) + 12)); index36 = index36 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index36 * 4) + let lifted176 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array35.push(mbt_ffi_load32((iter_base) + 0)) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array35) + @types.SchemaTypeBody::FutureType(lifted176) } - 19 => { + 35 => { - @types.SchemaTypeBody::ListType(mbt_ffi_load32((iter_base) + 8)) - } - 20 => { + let lifted177 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::FixedListType(@types.FixedListSpec::{element : mbt_ffi_load32((iter_base) + 8), length : (mbt_ffi_load32((iter_base) + 12)).reinterpret_as_uint()}) + Option::Some(mbt_ffi_load32((iter_base) + 12)) + } + _ => panic() + } + + @types.SchemaTypeBody::StreamType(lifted177) } - 21 => { + _ => panic() + } - @types.SchemaTypeBody::MapType(@types.MapSpec::{key : mbt_ffi_load32((iter_base) + 8), value : mbt_ffi_load32((iter_base) + 12)}) + let lifted180 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + 0 => Option::None + 1 => { + + let result179 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + + Option::Some(result179) } - 22 => { + _ => panic() + } - @types.SchemaTypeBody::OptionType(mbt_ffi_load32((iter_base) + 8)) + let array182 : Array[String] = []; + for index183 = 0; index183 < (mbt_ffi_load32((iter_base) + 104)); index183 = index183 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index183 * 8) + + let result181 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array182.push(result181) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + + let array185 : Array[String] = []; + for index186 = 0; index186 < (mbt_ffi_load32((iter_base) + 112)); index186 = index186 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index186 * 8) + + let result184 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + + array185.push(result184) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + + let lifted188 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + 0 => Option::None + 1 => { + + let result187 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + + Option::Some(result187) } - 23 => { + _ => panic() + } - let lifted37 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None + let lifted191 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + 0 => Option::None + 1 => { + + let lifted190 = match (mbt_ffi_load8_u((iter_base) + 132)) { + 0 => { + + @types.Role::Multimodal + } 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) + @types.Role::UnstructuredText } - _ => panic() - } + 2 => { - let lifted38 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.Role::UnstructuredBinary + } + 3 => { - Option::Some(mbt_ffi_load32((iter_base) + 20)) + let result189 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + + @types.Role::Other(result189) } _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted37, err : lifted38}) + Option::Some(lifted190) } - 24 => { + _ => panic() + } - let lifted42 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + array192.push(@types.SchemaTypeNode::{body : lifted178, metadata : @types.MetadataEnvelope::{doc : lifted180, aliases : array182, examples : array185, deprecated : lifted188, role : lifted191}}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) - let array40 : Array[String] = []; - for index41 = 0; index41 < (mbt_ffi_load32((iter_base) + 16)); index41 = index41 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index41 * 8) + let array197 : Array[@types.SchemaTypeDef] = []; + for index198 = 0; index198 < (mbt_ffi_load32((return_area) + 24)); index198 = index198 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index198 * 24) - let result39 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array40.push(result39) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + let lifted196 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - Option::Some(array40) - } - _ => panic() + let result195 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + + Option::Some(result195) + } + _ => panic() + } + + array197.push(@types.SchemaTypeDef::{id : result194, name : lifted196, body : mbt_ffi_load32((iter_base) + 20)}) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 20)) + + let array229 : Array[@types.SchemaValueNode] = []; + for index230 = 0; index230 < (mbt_ffi_load32((return_area) + 36)); index230 = index230 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index230 * 32) + + let lifted228 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { + + @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) + } + 1 => { + + @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) + } + 2 => { + + @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) + } + 3 => { + + @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) + } + 4 => { + + @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) + } + 5 => { + + @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) + } + 6 => { + + @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) + } + 7 => { + + @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 8 => { + + @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) + } + 9 => { + + @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) + } + 10 => { + + @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) + } + 11 => { + + @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) + } + 12 => { + + let result199 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + @types.SchemaValueNode::StringValue(result199) + } + 13 => { + + let array200 : Array[Int] = []; + for index201 = 0; index201 < (mbt_ffi_load32((iter_base) + 12)); index201 = index201 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index201 * 4) + + array200.push(mbt_ffi_load32((iter_base) + 0)) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::RecordValue(array200) + } + 14 => { - let lifted43 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted202 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) + Option::Some(mbt_ffi_load32((iter_base) + 16)) } _ => panic() } - let lifted44 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted202}) + } + 15 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) - } - _ => panic() + @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) + } + 16 => { + + let array203 : Array[Bool] = []; + for index204 = 0; index204 < (mbt_ffi_load32((iter_base) + 12)); index204 = index204 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index204 * 1) + + array203.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let lifted46 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::FlagsValue(array203) + } + 17 => { - let result45 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let array205 : Array[Int] = []; + for index206 = 0; index206 < (mbt_ffi_load32((iter_base) + 12)); index206 = index206 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index206 * 4) - Option::Some(result45) - } - _ => panic() + array205.push(mbt_ffi_load32((iter_base) + 0)) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted42, min_length : lifted43, max_length : lifted44, regex : lifted46}) + @types.SchemaValueNode::TupleValue(array205) } - 25 => { + 18 => { - let lifted50 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let array207 : Array[Int] = []; + for index208 = 0; index208 < (mbt_ffi_load32((iter_base) + 12)); index208 = index208 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index208 * 4) - let array48 : Array[String] = []; - for index49 = 0; index49 < (mbt_ffi_load32((iter_base) + 16)); index49 = index49 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index49 * 8) + array207.push(mbt_ffi_load32((iter_base) + 0)) + } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let result47 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaValueNode::ListValue(array207) + } + 19 => { - array48.push(result47) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) + let array209 : Array[Int] = []; + for index210 = 0; index210 < (mbt_ffi_load32((iter_base) + 12)); index210 = index210 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index210 * 4) - Option::Some(array48) - } - _ => panic() + array209.push(mbt_ffi_load32((iter_base) + 0)) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - let lifted51 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::FixedListValue(array209) + } + 20 => { - Option::Some((mbt_ffi_load32((iter_base) + 24)).reinterpret_as_uint()) - } - _ => panic() + let array211 : Array[@types.MapEntry] = []; + for index212 = 0; index212 < (mbt_ffi_load32((iter_base) + 12)); index212 = index212 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index212 * 8) + + array211.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } + mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + + @types.SchemaValueNode::MapValue(array211) + } + 21 => { - let lifted52 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted213 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some((mbt_ffi_load32((iter_base) + 32)).reinterpret_as_uint()) + Option::Some(mbt_ffi_load32((iter_base) + 12)) } _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted50, min_bytes : lifted51, max_bytes : lifted52}) + @types.SchemaValueNode::OptionValue(lifted213) } - 26 => { + 22 => { - let lifted56 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + let lifted216 = match (mbt_ffi_load8_u((iter_base) + 8)) { + 0 => { + + let lifted214 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { + + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() + } - let array54 : Array[String] = []; - for index55 = 0; index55 < (mbt_ffi_load32((iter_base) + 20)); index55 = index55 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index55 * 8) + @types.ResultValuePayload::OkValue(lifted214) + } + 1 => { - let result53 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted215 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + 0 => Option::None + 1 => { - array54.push(result53) + Option::Some(mbt_ffi_load32((iter_base) + 16)) + } + _ => panic() } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array54) + @types.ResultValuePayload::ErrValue(lifted215) } _ => panic() } - let lifted60 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + @types.SchemaValueNode::ResultValue(lifted216) + } + 23 => { + + let result217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted219 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let array58 : Array[String] = []; - for index59 = 0; index59 < (mbt_ffi_load32((iter_base) + 32)); index59 = index59 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index59 * 8) + let result218 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - let result57 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - - array58.push(result57) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - - Option::Some(array58) + Option::Some(result218) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted56, allowed_extensions : lifted60}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result217, language : lifted219}) } - 27 => { + 24 => { - let lifted64 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let result220 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + + let lifted222 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let array62 : Array[String] = []; - for index63 = 0; index63 < (mbt_ffi_load32((iter_base) + 16)); index63 = index63 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index63 * 8) - - let result61 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result221 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - array62.push(result61) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - - Option::Some(array62) + Option::Some(result221) } _ => panic() } - let lifted68 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result220, mime_type : lifted222}) + } + 25 => { - let array66 : Array[String] = []; - for index67 = 0; index67 < (mbt_ffi_load32((iter_base) + 28)); index67 = index67 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index67 * 8) + let result223 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let result65 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.SchemaValueNode::PathValue(result223) + } + 26 => { - array66.push(result65) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) + let result224 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - Option::Some(array66) - } - _ => panic() - } + @types.SchemaValueNode::UrlValue(result224) + } + 27 => { - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted64, allowed_hosts : lifted68}) + @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) } 28 => { - @types.SchemaTypeBody::DatetimeType + @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) } 29 => { - @types.SchemaTypeBody::DurationType + let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result225}) } 30 => { - let result69 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result226 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array71 : Array[String] = []; - for index72 = 0; index72 < (mbt_ffi_load32((iter_base) + 20)); index72 = index72 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index72 * 8) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result226, body : mbt_ffi_load32((iter_base) + 16)}) + } + 31 => { - let result70 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result227 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - array71.push(result70) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result227}) + } + 32 => { - let lifted74 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) + } + _ => panic() + } - let result73 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + array229.push(lifted228) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result73}) - } - _ => panic() - } + Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array192, defs : array197, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array229, root : mbt_ffi_load32((return_area) + 40)}}) + } + _ => panic() + } - let lifted76 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { - 0 => Option::None - 1 => { + let lifted232 : @streams.OutputStream? = match mbt_ffi_load8_u((return_area) + 44) { + 0 => Option::None + 1 => { - let result75 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + Option::Some(@streams.OutputStream::OutputStream(mbt_ffi_load32((return_area) + 48))) + } + _ => panic() + } - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result75}) - } - _ => panic() - } + Result::Ok(@common.InvocationResult::{result : lifted231, stdout : lifted232}) + } + 1 => { - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result69, allowed_suffixes : array71, min : lifted74, max : lifted76}) - } - 31 => { + let lifted480 = match (mbt_ffi_load8_u((return_area) + 8)) { + 0 => { - let array100 : Array[@types.UnionBranch] = []; - for index101 = 0; index101 < (mbt_ffi_load32((iter_base) + 12)); index101 = index101 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index101 * 92) + let result233 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - let result77 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + RpcError::ProtocolError(result233) + } + 1 => { - let lifted86 = match (mbt_ffi_load8_u((iter_base) + 12)) { - 0 => { + let result234 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - let result78 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + RpcError::Denied(result234) + } + 2 => { - @types.DiscriminatorRule::Prefix(result78) - } - 1 => { + let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - let result79 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + RpcError::NotFound(result235) + } + 3 => { - @types.DiscriminatorRule::Suffix(result79) - } - 2 => { + let result236 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) - let result80 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + RpcError::RemoteInternalError(result236) + } + 4 => { - @types.DiscriminatorRule::Contains(result80) - } - 3 => { + let lifted479 = match (mbt_ffi_load8_u((return_area) + 12)) { + 0 => { - let result81 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result237 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) - @types.DiscriminatorRule::Regex(result81) - } - 4 => { + @common.ToolError::InvalidToolName(result237) + } + 1 => { - let result82 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let array239 : Array[String] = []; + for index240 = 0; index240 < (mbt_ffi_load32((return_area) + 20)); index240 = index240 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index240 * 8) - let lifted84 : String? = match mbt_ffi_load8_u((iter_base) + 24) { - 0 => Option::None - 1 => { + let result238 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let result83 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + array239.push(result238) + } + mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) - Option::Some(result83) - } - _ => panic() - } + @common.ToolError::InvalidCommandPath(array239) + } + 2 => { - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result82, literal : lifted84}) - } - 5 => { + let result241 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) - let result85 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + @common.ToolError::InvalidInput(result241) + } + 3 => { - @types.DiscriminatorRule::FieldAbsent(result85) - } - _ => panic() - } + let result242 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) - let lifted88 : String? = match mbt_ffi_load8_u((iter_base) + 36) { - 0 => Option::None - 1 => { + @common.ToolError::ConstraintViolation(result242) + } + 4 => { - let result87 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) - Option::Some(result87) - } - _ => panic() - } + @common.ToolError::InvalidResult(result243) + } + 5 => { - let array90 : Array[String] = []; - for index91 = 0; index91 < (mbt_ffi_load32((iter_base) + 52)); index91 = index91 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index91 * 8) + let array440 : Array[@types.SchemaTypeNode] = []; + for index441 = 0; index441 < (mbt_ffi_load32((return_area) + 20)); index441 = index441 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index441 * 144) - let result89 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let lifted426 = match (mbt_ffi_load8_u((iter_base) + 0)) { + 0 => { - array90.push(result89) + @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - - let array93 : Array[String] = []; - for index94 = 0; index94 < (mbt_ffi_load32((iter_base) + 60)); index94 = index94 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index94 * 8) - - let result92 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + 1 => { - array93.push(result92) + @types.SchemaTypeBody::BoolType } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) + 2 => { - let lifted96 : String? = match mbt_ffi_load8_u((iter_base) + 64) { - 0 => Option::None - 1 => { + let lifted250 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { + + let lifted245 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result95 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let lifted244 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - Option::Some(result95) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted99 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted98 = match (mbt_ffi_load8_u((iter_base) + 80)) { - 0 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.Role::Multimodal + Option::Some(lifted244) + } + _ => panic() } - 1 => { - @types.Role::UnstructuredText - } - 2 => { + let lifted247 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredBinary + let lifted246 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { + + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { + + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } + + Option::Some(lifted246) + } + _ => panic() } - 3 => { - let result97 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let lifted249 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result248 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.Role::Other(result97) + Option::Some(result248) + } + _ => panic() } - _ => panic() - } - Option::Some(lifted98) + Option::Some(@types.NumericRestrictions::{min : lifted245, max : lifted247, unit : lifted249}) + } + _ => panic() } - _ => panic() + + @types.SchemaTypeBody::S8Type(lifted250) } + 3 => { - array100.push(@types.UnionBranch::{tag : result77, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted86, metadata : @types.MetadataEnvelope::{doc : lifted88, aliases : array90, examples : array93, deprecated : lifted96, role : lifted99}}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted257 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array100}) - } - 32 => { + let lifted252 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted103 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted251 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { + + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result102 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(result102) - } - _ => panic() - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted103}) - } - 33 => { + Option::Some(lifted251) + } + _ => panic() + } - let lifted105 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let lifted254 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let result104 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let lifted253 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - Option::Some(result104) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted105}) - } - 34 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted106 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + Option::Some(lifted253) + } + _ => panic() + } - @types.SchemaTypeBody::FutureType(lifted106) - } - 35 => { + let lifted256 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let lifted107 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + let result255 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + Option::Some(result255) + } + _ => panic() + } - @types.SchemaTypeBody::StreamType(lifted107) - } - _ => panic() - } + Option::Some(@types.NumericRestrictions::{min : lifted252, max : lifted254, unit : lifted256}) + } + _ => panic() + } - let lifted110 : String? = match mbt_ffi_load8_u((iter_base) + 88) { - 0 => Option::None - 1 => { + @types.SchemaTypeBody::S16Type(lifted257) + } + 4 => { - let result109 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let lifted264 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - Option::Some(result109) - } - _ => panic() - } + let lifted259 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let array112 : Array[String] = []; - for index113 = 0; index113 < (mbt_ffi_load32((iter_base) + 104)); index113 = index113 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index113 * 8) + let lifted258 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result111 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - array112.push(result111) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let array115 : Array[String] = []; - for index116 = 0; index116 < (mbt_ffi_load32((iter_base) + 112)); index116 = index116 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index116 * 8) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let result114 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + Option::Some(lifted258) + } + _ => panic() + } - array115.push(result114) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) + let lifted261 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let lifted118 : String? = match mbt_ffi_load8_u((iter_base) + 116) { - 0 => Option::None - 1 => { + let lifted260 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result117 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - Option::Some(result117) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let lifted121 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted120 = match (mbt_ffi_load8_u((iter_base) + 132)) { - 0 => { + Option::Some(lifted260) + } + _ => panic() + } - @types.Role::Multimodal - } - 1 => { + let lifted263 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.Role::UnstructuredText - } - 2 => { + let result262 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.Role::UnstructuredBinary - } - 3 => { + Option::Some(result262) + } + _ => panic() + } - let result119 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + Option::Some(@types.NumericRestrictions::{min : lifted259, max : lifted261, unit : lifted263}) + } + _ => panic() + } - @types.Role::Other(result119) + @types.SchemaTypeBody::S32Type(lifted264) } - _ => panic() - } + 5 => { - Option::Some(lifted120) - } - _ => panic() - } + let lifted271 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - array122.push(@types.SchemaTypeNode::{body : lifted108, metadata : @types.MetadataEnvelope::{doc : lifted110, aliases : array112, examples : array115, deprecated : lifted118, role : lifted121}}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 12)) + let lifted266 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let array127 : Array[@types.SchemaTypeDef] = []; - for index128 = 0; index128 < (mbt_ffi_load32((return_area) + 24)); index128 = index128 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 20)) + (index128 * 24) + let lifted265 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result124 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let lifted126 : String? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result125 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result125) - } - _ => panic() - } + Option::Some(lifted265) + } + _ => panic() + } - array127.push(@types.SchemaTypeDef::{id : result124, name : lifted126, body : mbt_ffi_load32((iter_base) + 20)}) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 20)) + let lifted268 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - let array159 : Array[@types.SchemaValueNode] = []; - for index160 = 0; index160 < (mbt_ffi_load32((return_area) + 36)); index160 = index160 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 32)) + (index160 * 32) + let lifted267 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted158 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) - } - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::S8Value((mbt_ffi_load8((iter_base) + 8))) - } - 2 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::S16Value((mbt_ffi_load16((iter_base) + 8))) - } - 3 => { + Option::Some(lifted267) + } + _ => panic() + } - @types.SchemaValueNode::S32Value(mbt_ffi_load32((iter_base) + 8)) - } - 4 => { + let lifted270 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::S64Value(mbt_ffi_load64((iter_base) + 8)) - } - 5 => { + let result269 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaValueNode::U8Value((mbt_ffi_load8_u((iter_base) + 8)).to_byte()) - } - 6 => { + Option::Some(result269) + } + _ => panic() + } - @types.SchemaValueNode::U16Value((mbt_ffi_load16_u((iter_base) + 8).land(0xFFFF).reinterpret_as_uint())) - } - 7 => { + Option::Some(@types.NumericRestrictions::{min : lifted266, max : lifted268, unit : lifted270}) + } + _ => panic() + } - @types.SchemaValueNode::U32Value((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 8 => { + @types.SchemaTypeBody::S64Type(lifted271) + } + 6 => { - @types.SchemaValueNode::U64Value((mbt_ffi_load64((iter_base) + 8)).reinterpret_as_uint64()) - } - 9 => { + let lifted278 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::F32Value(mbt_ffi_loadf32((iter_base) + 8)) - } - 10 => { + let lifted273 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::F64Value(mbt_ffi_loadf64((iter_base) + 8)) - } - 11 => { + let lifted272 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaValueNode::CharValue(Int::unsafe_to_char(mbt_ffi_load32((iter_base) + 8))) - } - 12 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result129 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::StringValue(result129) - } - 13 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let array130 : Array[Int] = []; - for index131 = 0; index131 < (mbt_ffi_load32((iter_base) + 12)); index131 = index131 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index131 * 4) + Option::Some(lifted272) + } + _ => panic() + } - array130.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted275 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::RecordValue(array130) - } - 14 => { + let lifted274 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let lifted132 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted132}) - } - 15 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::EnumValue((mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint()) - } - 16 => { + Option::Some(lifted274) + } + _ => panic() + } - let array133 : Array[Bool] = []; - for index134 = 0; index134 < (mbt_ffi_load32((iter_base) + 12)); index134 = index134 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index134 * 1) + let lifted277 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - array133.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let result276 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaValueNode::FlagsValue(array133) - } - 17 => { + Option::Some(result276) + } + _ => panic() + } - let array135 : Array[Int] = []; - for index136 = 0; index136 < (mbt_ffi_load32((iter_base) + 12)); index136 = index136 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index136 * 4) + Option::Some(@types.NumericRestrictions::{min : lifted273, max : lifted275, unit : lifted277}) + } + _ => panic() + } - array135.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.SchemaTypeBody::U8Type(lifted278) + } + 7 => { - @types.SchemaValueNode::TupleValue(array135) - } - 18 => { + let lifted285 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array137 : Array[Int] = []; - for index138 = 0; index138 < (mbt_ffi_load32((iter_base) + 12)); index138 = index138 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index138 * 4) + let lifted280 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - array137.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted279 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaValueNode::ListValue(array137) - } - 19 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let array139 : Array[Int] = []; - for index140 = 0; index140 < (mbt_ffi_load32((iter_base) + 12)); index140 = index140 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index140 * 4) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - array139.push(mbt_ffi_load32((iter_base) + 0)) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::FixedListValue(array139) - } - 20 => { + Option::Some(lifted279) + } + _ => panic() + } - let array141 : Array[@types.MapEntry] = []; - for index142 = 0; index142 < (mbt_ffi_load32((iter_base) + 12)); index142 = index142 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index142 * 8) + let lifted282 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - array141.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) - } - mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) + let lifted281 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaValueNode::MapValue(array141) - } - 21 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted143 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(mbt_ffi_load32((iter_base) + 12)) - } - _ => panic() - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::OptionValue(lifted143) - } - 22 => { + Option::Some(lifted281) + } + _ => panic() + } - let lifted146 = match (mbt_ffi_load8_u((iter_base) + 8)) { - 0 => { + let lifted284 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result283 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted144 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { - 0 => Option::None - 1 => { + Option::Some(result283) + } + _ => panic() + } - Option::Some(mbt_ffi_load32((iter_base) + 16)) + Option::Some(@types.NumericRestrictions::{min : lifted280, max : lifted282, unit : lifted284}) } _ => panic() } - @types.ResultValuePayload::OkValue(lifted144) + @types.SchemaTypeBody::U16Type(lifted285) } - 1 => { + 8 => { - let lifted145 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted292 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - Option::Some(mbt_ffi_load32((iter_base) + 16)) - } - _ => panic() - } + let lifted287 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.ResultValuePayload::ErrValue(lifted145) - } - _ => panic() - } + let lifted286 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaValueNode::ResultValue(lifted146) - } - 23 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result147 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let lifted149 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let result148 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + Option::Some(lifted286) + } + _ => panic() + } - Option::Some(result148) - } - _ => panic() - } + let lifted289 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result147, language : lifted149}) - } - 24 => { + let lifted288 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let result150 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let lifted152 : String? = match mbt_ffi_load8_u((iter_base) + 16) { - 0 => Option::None - 1 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - let result151 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - Option::Some(result151) - } - _ => panic() - } + Option::Some(lifted288) + } + _ => panic() + } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result150, mime_type : lifted152}) - } - 25 => { + let lifted291 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - let result153 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result290 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - @types.SchemaValueNode::PathValue(result153) - } - 26 => { + Option::Some(result290) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted287, max : lifted289, unit : lifted291}) + } + _ => panic() + } - let result154 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.SchemaTypeBody::U32Type(lifted292) + } + 9 => { - @types.SchemaValueNode::UrlValue(result154) - } - 27 => { + let lifted299 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::DatetimeValue(@types.Datetime::{seconds : mbt_ffi_load64((iter_base) + 8), nanoseconds : (mbt_ffi_load32((iter_base) + 16)).reinterpret_as_uint()}) - } - 28 => { + let lifted294 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::DurationValue(@types.DurationValuePayload::{nanoseconds : mbt_ffi_load64((iter_base) + 8)}) - } - 29 => { + let lifted293 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - let result155 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result155}) - } - 30 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - let result156 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result156, body : mbt_ffi_load32((iter_base) + 16)}) - } - 31 => { + Option::Some(lifted293) + } + _ => panic() + } - let result157 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let lifted296 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result157}) - } - 32 => { + let lifted295 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaValueNode::QuotaTokenHandle(@types.QuotaToken::QuotaToken(mbt_ffi_load32((iter_base) + 8))) - } - _ => panic() - } + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - array159.push(lifted158) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 32)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - Option::Some(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array122, defs : array127, root : mbt_ffi_load32((return_area) + 28)}, value : @types.SchemaValueTree::{value_nodes : array159, root : mbt_ffi_load32((return_area) + 40)}}) - } - _ => panic() - } + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted162 : @streams.OutputStream? = match mbt_ffi_load8_u((return_area) + 44) { - 0 => Option::None - 1 => { + Option::Some(lifted295) + } + _ => panic() + } - Option::Some(@streams.OutputStream::OutputStream(mbt_ffi_load32((return_area) + 48))) - } - _ => panic() - } + let lifted298 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - Result::Ok(@common.InvocationResult::{result : lifted161, stdout : lifted162}) - } - 1 => { + let result297 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let lifted340 = match (mbt_ffi_load8_u((return_area) + 8)) { - 0 => { + Option::Some(result297) + } + _ => panic() + } - let result163 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + Option::Some(@types.NumericRestrictions::{min : lifted294, max : lifted296, unit : lifted298}) + } + _ => panic() + } - RpcError::ProtocolError(result163) - } - 1 => { + @types.SchemaTypeBody::U64Type(lifted299) + } + 10 => { - let result164 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + let lifted306 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - RpcError::Denied(result164) - } - 2 => { + let lifted301 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let result165 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + let lifted300 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - RpcError::NotFound(result165) - } - 3 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - let result166 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 12), mbt_ffi_load32((return_area) + 16)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - RpcError::RemoteInternalError(result166) - } - 4 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - let lifted339 = match (mbt_ffi_load8_u((return_area) + 12)) { - 0 => { + Option::Some(lifted300) + } + _ => panic() + } - let result167 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + let lifted303 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @common.ToolError::InvalidToolName(result167) - } - 1 => { + let lifted302 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - let array169 : Array[String] = []; - for index170 = 0; index170 < (mbt_ffi_load32((return_area) + 20)); index170 = index170 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index170 * 8) + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - let result168 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - array169.push(result168) - } - mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @common.ToolError::InvalidCommandPath(array169) - } - 2 => { + Option::Some(lifted302) + } + _ => panic() + } - let result171 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + let lifted305 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { - @common.ToolError::InvalidInput(result171) - } - 3 => { + let result304 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - let result172 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + Option::Some(result304) + } + _ => panic() + } - @common.ToolError::ConstraintViolation(result172) - } - 4 => { + Option::Some(@types.NumericRestrictions::{min : lifted301, max : lifted303, unit : lifted305}) + } + _ => panic() + } - let result173 = mbt_ffi_ptr2str(mbt_ffi_load32((return_area) + 16), mbt_ffi_load32((return_area) + 20)) + @types.SchemaTypeBody::F32Type(lifted306) + } + 11 => { - @common.ToolError::InvalidResult(result173) - } - 5 => { + let lifted313 : @types.NumericRestrictions? = match mbt_ffi_load8_u((iter_base) + 8) { + 0 => Option::None + 1 => { - let array300 : Array[@types.SchemaTypeNode] = []; - for index301 = 0; index301 < (mbt_ffi_load32((return_area) + 20)); index301 = index301 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 16)) + (index301 * 144) + let lifted308 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 16) { + 0 => Option::None + 1 => { - let lifted286 = match (mbt_ffi_load8_u((iter_base) + 0)) { - 0 => { + let lifted307 = match (mbt_ffi_load8_u((iter_base) + 24)) { + 0 => { - @types.SchemaTypeBody::RefType(mbt_ffi_load32((iter_base) + 8)) - } - 1 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 32)) + } + 1 => { - @types.SchemaTypeBody::BoolType - } - 2 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::S8Type - } - 3 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 32)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::S16Type - } - 4 => { + Option::Some(lifted307) + } + _ => panic() + } - @types.SchemaTypeBody::S32Type - } - 5 => { + let lifted310 : @types.NumericBound? = match mbt_ffi_load8_u((iter_base) + 40) { + 0 => Option::None + 1 => { - @types.SchemaTypeBody::S64Type - } - 6 => { + let lifted309 = match (mbt_ffi_load8_u((iter_base) + 48)) { + 0 => { - @types.SchemaTypeBody::U8Type - } - 7 => { + @types.NumericBound::Signed(mbt_ffi_load64((iter_base) + 56)) + } + 1 => { - @types.SchemaTypeBody::U16Type - } - 8 => { + @types.NumericBound::Unsigned((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + 2 => { - @types.SchemaTypeBody::U32Type - } - 9 => { + @types.NumericBound::FloatBits((mbt_ffi_load64((iter_base) + 56)).reinterpret_as_uint64()) + } + _ => panic() + } - @types.SchemaTypeBody::U64Type - } - 10 => { + Option::Some(lifted309) + } + _ => panic() + } - @types.SchemaTypeBody::F32Type - } - 11 => { + let lifted312 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + 0 => Option::None + 1 => { + + let result311 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + + Option::Some(result311) + } + _ => panic() + } + + Option::Some(@types.NumericRestrictions::{min : lifted308, max : lifted310, unit : lifted312}) + } + _ => panic() + } - @types.SchemaTypeBody::F64Type + @types.SchemaTypeBody::F64Type(lifted313) } 12 => { @@ -19671,59 +27621,59 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo } 14 => { - let array188 : Array[@types.NamedFieldType] = []; - for index189 = 0; index189 < (mbt_ffi_load32((iter_base) + 12)); index189 = index189 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index189 * 68) + let array328 : Array[@types.NamedFieldType] = []; + for index329 = 0; index329 < (mbt_ffi_load32((iter_base) + 12)); index329 = index329 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index329 * 68) - let result174 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result314 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted176 : String? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted316 : String? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let result175 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result315 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - Option::Some(result175) + Option::Some(result315) } _ => panic() } - let array178 : Array[String] = []; - for index179 = 0; index179 < (mbt_ffi_load32((iter_base) + 28)); index179 = index179 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index179 * 8) + let array318 : Array[String] = []; + for index319 = 0; index319 < (mbt_ffi_load32((iter_base) + 28)); index319 = index319 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index319 * 8) - let result177 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result317 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array178.push(result177) + array318.push(result317) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - let array181 : Array[String] = []; - for index182 = 0; index182 < (mbt_ffi_load32((iter_base) + 36)); index182 = index182 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index182 * 8) + let array321 : Array[String] = []; + for index322 = 0; index322 < (mbt_ffi_load32((iter_base) + 36)); index322 = index322 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 32)) + (index322 * 8) - let result180 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result320 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array181.push(result180) + array321.push(result320) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 32)) - let lifted184 : String? = match mbt_ffi_load8_u((iter_base) + 40) { + let lifted324 : String? = match mbt_ffi_load8_u((iter_base) + 40) { 0 => Option::None 1 => { - let result183 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result323 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(result183) + Option::Some(result323) } _ => panic() } - let lifted187 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { + let lifted327 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 52) { 0 => Option::None 1 => { - let lifted186 = match (mbt_ffi_load8_u((iter_base) + 56)) { + let lifted326 = match (mbt_ffi_load8_u((iter_base) + 56)) { 0 => { @types.Role::Multimodal @@ -19738,33 +27688,33 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo } 3 => { - let result185 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) + let result325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 60), mbt_ffi_load32((iter_base) + 64)) - @types.Role::Other(result185) + @types.Role::Other(result325) } _ => panic() } - Option::Some(lifted186) + Option::Some(lifted326) } _ => panic() } - array188.push(@types.NamedFieldType::{name : result174, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted176, aliases : array178, examples : array181, deprecated : lifted184, role : lifted187}}) + array328.push(@types.NamedFieldType::{name : result314, body : mbt_ffi_load32((iter_base) + 8), metadata : @types.MetadataEnvelope::{doc : lifted316, aliases : array318, examples : array321, deprecated : lifted324, role : lifted327}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::RecordType(array188) + @types.SchemaTypeBody::RecordType(array328) } 15 => { - let array205 : Array[@types.VariantCaseType] = []; - for index206 = 0; index206 < (mbt_ffi_load32((iter_base) + 12)); index206 = index206 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index206 * 72) + let array345 : Array[@types.VariantCaseType] = []; + for index346 = 0; index346 < (mbt_ffi_load32((iter_base) + 12)); index346 = index346 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index346 * 72) - let result190 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result330 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted191 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted331 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -19773,53 +27723,53 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - let lifted193 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted333 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result192 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result332 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result192) + Option::Some(result332) } _ => panic() } - let array195 : Array[String] = []; - for index196 = 0; index196 < (mbt_ffi_load32((iter_base) + 32)); index196 = index196 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index196 * 8) + let array335 : Array[String] = []; + for index336 = 0; index336 < (mbt_ffi_load32((iter_base) + 32)); index336 = index336 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index336 * 8) - let result194 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result334 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array195.push(result194) + array335.push(result334) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - let array198 : Array[String] = []; - for index199 = 0; index199 < (mbt_ffi_load32((iter_base) + 40)); index199 = index199 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index199 * 8) + let array338 : Array[String] = []; + for index339 = 0; index339 < (mbt_ffi_load32((iter_base) + 40)); index339 = index339 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 36)) + (index339 * 8) - let result197 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result337 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array198.push(result197) + array338.push(result337) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 36)) - let lifted201 : String? = match mbt_ffi_load8_u((iter_base) + 44) { + let lifted341 : String? = match mbt_ffi_load8_u((iter_base) + 44) { 0 => Option::None 1 => { - let result200 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) + let result340 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 48), mbt_ffi_load32((iter_base) + 52)) - Option::Some(result200) + Option::Some(result340) } _ => panic() } - let lifted204 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted344 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let lifted203 = match (mbt_ffi_load8_u((iter_base) + 60)) { + let lifted343 = match (mbt_ffi_load8_u((iter_base) + 60)) { 0 => { @types.Role::Multimodal @@ -19834,63 +27784,63 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo } 3 => { - let result202 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) + let result342 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 64), mbt_ffi_load32((iter_base) + 68)) - @types.Role::Other(result202) + @types.Role::Other(result342) } _ => panic() } - Option::Some(lifted203) + Option::Some(lifted343) } _ => panic() } - array205.push(@types.VariantCaseType::{name : result190, payload : lifted191, metadata : @types.MetadataEnvelope::{doc : lifted193, aliases : array195, examples : array198, deprecated : lifted201, role : lifted204}}) + array345.push(@types.VariantCaseType::{name : result330, payload : lifted331, metadata : @types.MetadataEnvelope::{doc : lifted333, aliases : array335, examples : array338, deprecated : lifted341, role : lifted344}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::VariantType(array205) + @types.SchemaTypeBody::VariantType(array345) } 16 => { - let array208 : Array[String] = []; - for index209 = 0; index209 < (mbt_ffi_load32((iter_base) + 12)); index209 = index209 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index209 * 8) + let array348 : Array[String] = []; + for index349 = 0; index349 < (mbt_ffi_load32((iter_base) + 12)); index349 = index349 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index349 * 8) - let result207 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result347 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array208.push(result207) + array348.push(result347) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::EnumType(array208) + @types.SchemaTypeBody::EnumType(array348) } 17 => { - let array211 : Array[String] = []; - for index212 = 0; index212 < (mbt_ffi_load32((iter_base) + 12)); index212 = index212 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index212 * 8) + let array351 : Array[String] = []; + for index352 = 0; index352 < (mbt_ffi_load32((iter_base) + 12)); index352 = index352 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index352 * 8) - let result210 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result350 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array211.push(result210) + array351.push(result350) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::FlagsType(array211) + @types.SchemaTypeBody::FlagsType(array351) } 18 => { - let array213 : Array[Int] = []; - for index214 = 0; index214 < (mbt_ffi_load32((iter_base) + 12)); index214 = index214 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index214 * 4) + let array353 : Array[Int] = []; + for index354 = 0; index354 < (mbt_ffi_load32((iter_base) + 12)); index354 = index354 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index354 * 4) - array213.push(mbt_ffi_load32((iter_base) + 0)) + array353.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::TupleType(array213) + @types.SchemaTypeBody::TupleType(array353) } 19 => { @@ -19910,7 +27860,7 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo } 23 => { - let lifted215 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted355 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -19919,7 +27869,7 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - let lifted216 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted356 : Int? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { @@ -19928,30 +27878,30 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted215, err : lifted216}) + @types.SchemaTypeBody::ResultType(@types.ResultSpec::{ok : lifted355, err : lifted356}) } 24 => { - let lifted220 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted360 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array218 : Array[String] = []; - for index219 = 0; index219 < (mbt_ffi_load32((iter_base) + 16)); index219 = index219 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index219 * 8) + let array358 : Array[String] = []; + for index359 = 0; index359 < (mbt_ffi_load32((iter_base) + 16)); index359 = index359 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index359 * 8) - let result217 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result357 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array218.push(result217) + array358.push(result357) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array218) + Option::Some(array358) } _ => panic() } - let lifted221 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted361 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -19960,7 +27910,7 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - let lifted222 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted362 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -19969,41 +27919,41 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - let lifted224 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted364 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result223 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result363 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result223) + Option::Some(result363) } _ => panic() } - @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted220, min_length : lifted221, max_length : lifted222, regex : lifted224}) + @types.SchemaTypeBody::TextType(@types.TextRestrictions::{languages : lifted360, min_length : lifted361, max_length : lifted362, regex : lifted364}) } 25 => { - let lifted228 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted368 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array226 : Array[String] = []; - for index227 = 0; index227 < (mbt_ffi_load32((iter_base) + 16)); index227 = index227 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index227 * 8) + let array366 : Array[String] = []; + for index367 = 0; index367 < (mbt_ffi_load32((iter_base) + 16)); index367 = index367 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index367 * 8) - let result225 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result365 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array226.push(result225) + array366.push(result365) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array226) + Option::Some(array366) } _ => panic() } - let lifted229 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted369 : UInt? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { @@ -20012,7 +27962,7 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - let lifted230 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { + let lifted370 : UInt? = match mbt_ffi_load8_u((iter_base) + 28) { 0 => Option::None 1 => { @@ -20021,91 +27971,91 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted228, min_bytes : lifted229, max_bytes : lifted230}) + @types.SchemaTypeBody::BinaryType(@types.BinaryRestrictions::{mime_types : lifted368, min_bytes : lifted369, max_bytes : lifted370}) } 26 => { - let lifted234 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted374 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { - let array232 : Array[String] = []; - for index233 = 0; index233 < (mbt_ffi_load32((iter_base) + 20)); index233 = index233 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index233 * 8) + let array372 : Array[String] = []; + for index373 = 0; index373 < (mbt_ffi_load32((iter_base) + 20)); index373 = index373 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index373 * 8) - let result231 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result371 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array232.push(result231) + array372.push(result371) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - Option::Some(array232) + Option::Some(array372) } _ => panic() } - let lifted238 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted378 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let array236 : Array[String] = []; - for index237 = 0; index237 < (mbt_ffi_load32((iter_base) + 32)); index237 = index237 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index237 * 8) + let array376 : Array[String] = []; + for index377 = 0; index377 < (mbt_ffi_load32((iter_base) + 32)); index377 = index377 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 28)) + (index377 * 8) - let result235 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result375 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array236.push(result235) + array376.push(result375) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 28)) - Option::Some(array236) + Option::Some(array376) } _ => panic() } - @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted234, allowed_extensions : lifted238}) + @types.SchemaTypeBody::PathType(@types.PathSpec::{direction : @types.PathDirection::from(mbt_ffi_load8_u((iter_base) + 8)), kind : @types.PathKind::from(mbt_ffi_load8_u((iter_base) + 9)), allowed_mime_types : lifted374, allowed_extensions : lifted378}) } 27 => { - let lifted242 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted382 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let array240 : Array[String] = []; - for index241 = 0; index241 < (mbt_ffi_load32((iter_base) + 16)); index241 = index241 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index241 * 8) + let array380 : Array[String] = []; + for index381 = 0; index381 < (mbt_ffi_load32((iter_base) + 16)); index381 = index381 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 12)) + (index381 * 8) - let result239 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result379 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array240.push(result239) + array380.push(result379) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 12)) - Option::Some(array240) + Option::Some(array380) } _ => panic() } - let lifted246 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { + let lifted386 : Array[String]? = match mbt_ffi_load8_u((iter_base) + 20) { 0 => Option::None 1 => { - let array244 : Array[String] = []; - for index245 = 0; index245 < (mbt_ffi_load32((iter_base) + 28)); index245 = index245 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index245 * 8) + let array384 : Array[String] = []; + for index385 = 0; index385 < (mbt_ffi_load32((iter_base) + 28)); index385 = index385 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 24)) + (index385 * 8) - let result243 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result383 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array244.push(result243) + array384.push(result383) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 24)) - Option::Some(array244) + Option::Some(array384) } _ => panic() } - @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted242, allowed_hosts : lifted246}) + @types.SchemaTypeBody::UrlType(@types.UrlRestrictions::{allowed_schemes : lifted382, allowed_hosts : lifted386}) } 28 => { @@ -20117,148 +28067,148 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo } 30 => { - let result247 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result387 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let array249 : Array[String] = []; - for index250 = 0; index250 < (mbt_ffi_load32((iter_base) + 20)); index250 = index250 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index250 * 8) + let array389 : Array[String] = []; + for index390 = 0; index390 < (mbt_ffi_load32((iter_base) + 20)); index390 = index390 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 16)) + (index390 * 8) - let result248 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result388 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array249.push(result248) + array389.push(result388) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 16)) - let lifted252 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted392 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result251 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) + let result391 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 44), mbt_ffi_load32((iter_base) + 48)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result251}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 32), scale : mbt_ffi_load32((iter_base) + 40), unit : result391}) } _ => panic() } - let lifted254 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { + let lifted394 : @types.QuantityValue? = match mbt_ffi_load8_u((iter_base) + 56) { 0 => Option::None 1 => { - let result253 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) + let result393 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 76), mbt_ffi_load32((iter_base) + 80)) - Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result253}) + Option::Some(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 64), scale : mbt_ffi_load32((iter_base) + 72), unit : result393}) } _ => panic() } - @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result247, allowed_suffixes : array249, min : lifted252, max : lifted254}) + @types.SchemaTypeBody::QuantityType(@types.QuantitySpec::{base_unit : result387, allowed_suffixes : array389, min : lifted392, max : lifted394}) } 31 => { - let array278 : Array[@types.UnionBranch] = []; - for index279 = 0; index279 < (mbt_ffi_load32((iter_base) + 12)); index279 = index279 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index279 * 92) + let array418 : Array[@types.UnionBranch] = []; + for index419 = 0; index419 < (mbt_ffi_load32((iter_base) + 12)); index419 = index419 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index419 * 92) - let result255 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result395 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted264 = match (mbt_ffi_load8_u((iter_base) + 12)) { + let lifted404 = match (mbt_ffi_load8_u((iter_base) + 12)) { 0 => { - let result256 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result396 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Prefix(result256) + @types.DiscriminatorRule::Prefix(result396) } 1 => { - let result257 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result397 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Suffix(result257) + @types.DiscriminatorRule::Suffix(result397) } 2 => { - let result258 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result398 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Contains(result258) + @types.DiscriminatorRule::Contains(result398) } 3 => { - let result259 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result399 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::Regex(result259) + @types.DiscriminatorRule::Regex(result399) } 4 => { - let result260 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result400 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - let lifted262 : String? = match mbt_ffi_load8_u((iter_base) + 24) { + let lifted402 : String? = match mbt_ffi_load8_u((iter_base) + 24) { 0 => Option::None 1 => { - let result261 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) + let result401 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 28), mbt_ffi_load32((iter_base) + 32)) - Option::Some(result261) + Option::Some(result401) } _ => panic() } - @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result260, literal : lifted262}) + @types.DiscriminatorRule::FieldEquals(@types.FieldDiscriminator::{field_name : result400, literal : lifted402}) } 5 => { - let result263 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) + let result403 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 16), mbt_ffi_load32((iter_base) + 20)) - @types.DiscriminatorRule::FieldAbsent(result263) + @types.DiscriminatorRule::FieldAbsent(result403) } _ => panic() } - let lifted266 : String? = match mbt_ffi_load8_u((iter_base) + 36) { + let lifted406 : String? = match mbt_ffi_load8_u((iter_base) + 36) { 0 => Option::None 1 => { - let result265 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) + let result405 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 40), mbt_ffi_load32((iter_base) + 44)) - Option::Some(result265) + Option::Some(result405) } _ => panic() } - let array268 : Array[String] = []; - for index269 = 0; index269 < (mbt_ffi_load32((iter_base) + 52)); index269 = index269 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index269 * 8) + let array408 : Array[String] = []; + for index409 = 0; index409 < (mbt_ffi_load32((iter_base) + 52)); index409 = index409 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 48)) + (index409 * 8) - let result267 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result407 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array268.push(result267) + array408.push(result407) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 48)) - let array271 : Array[String] = []; - for index272 = 0; index272 < (mbt_ffi_load32((iter_base) + 60)); index272 = index272 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index272 * 8) + let array411 : Array[String] = []; + for index412 = 0; index412 < (mbt_ffi_load32((iter_base) + 60)); index412 = index412 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 56)) + (index412 * 8) - let result270 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result410 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array271.push(result270) + array411.push(result410) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 56)) - let lifted274 : String? = match mbt_ffi_load8_u((iter_base) + 64) { + let lifted414 : String? = match mbt_ffi_load8_u((iter_base) + 64) { 0 => Option::None 1 => { - let result273 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) + let result413 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 68), mbt_ffi_load32((iter_base) + 72)) - Option::Some(result273) + Option::Some(result413) } _ => panic() } - let lifted277 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { + let lifted417 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 76) { 0 => Option::None 1 => { - let lifted276 = match (mbt_ffi_load8_u((iter_base) + 80)) { + let lifted416 = match (mbt_ffi_load8_u((iter_base) + 80)) { 0 => { @types.Role::Multimodal @@ -20273,57 +28223,57 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo } 3 => { - let result275 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) + let result415 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 84), mbt_ffi_load32((iter_base) + 88)) - @types.Role::Other(result275) + @types.Role::Other(result415) } _ => panic() } - Option::Some(lifted276) + Option::Some(lifted416) } _ => panic() } - array278.push(@types.UnionBranch::{tag : result255, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted264, metadata : @types.MetadataEnvelope::{doc : lifted266, aliases : array268, examples : array271, deprecated : lifted274, role : lifted277}}) + array418.push(@types.UnionBranch::{tag : result395, body : mbt_ffi_load32((iter_base) + 8), discriminator : lifted404, metadata : @types.MetadataEnvelope::{doc : lifted406, aliases : array408, examples : array411, deprecated : lifted414, role : lifted417}}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array278}) + @types.SchemaTypeBody::UnionType(@types.UnionSpec::{branches : array418}) } 32 => { - let lifted281 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted421 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result280 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result420 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result280) + Option::Some(result420) } _ => panic() } - @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted281}) + @types.SchemaTypeBody::SecretType(@types.SecretSpec::{category : lifted421}) } 33 => { - let lifted283 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted423 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result282 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result422 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result282) + Option::Some(result422) } _ => panic() } - @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted283}) + @types.SchemaTypeBody::QuotaTokenType(@types.QuotaTokenSpec::{resource_name : lifted423}) } 34 => { - let lifted284 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted424 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -20332,11 +28282,11 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - @types.SchemaTypeBody::FutureType(lifted284) + @types.SchemaTypeBody::FutureType(lifted424) } 35 => { - let lifted285 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted425 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -20345,58 +28295,58 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - @types.SchemaTypeBody::StreamType(lifted285) + @types.SchemaTypeBody::StreamType(lifted425) } _ => panic() } - let lifted288 : String? = match mbt_ffi_load8_u((iter_base) + 88) { + let lifted428 : String? = match mbt_ffi_load8_u((iter_base) + 88) { 0 => Option::None 1 => { - let result287 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) + let result427 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 92), mbt_ffi_load32((iter_base) + 96)) - Option::Some(result287) + Option::Some(result427) } _ => panic() } - let array290 : Array[String] = []; - for index291 = 0; index291 < (mbt_ffi_load32((iter_base) + 104)); index291 = index291 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index291 * 8) + let array430 : Array[String] = []; + for index431 = 0; index431 < (mbt_ffi_load32((iter_base) + 104)); index431 = index431 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 100)) + (index431 * 8) - let result289 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result429 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array290.push(result289) + array430.push(result429) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 100)) - let array293 : Array[String] = []; - for index294 = 0; index294 < (mbt_ffi_load32((iter_base) + 112)); index294 = index294 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index294 * 8) + let array433 : Array[String] = []; + for index434 = 0; index434 < (mbt_ffi_load32((iter_base) + 112)); index434 = index434 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 108)) + (index434 * 8) - let result292 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result432 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - array293.push(result292) + array433.push(result432) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 108)) - let lifted296 : String? = match mbt_ffi_load8_u((iter_base) + 116) { + let lifted436 : String? = match mbt_ffi_load8_u((iter_base) + 116) { 0 => Option::None 1 => { - let result295 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) + let result435 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 120), mbt_ffi_load32((iter_base) + 124)) - Option::Some(result295) + Option::Some(result435) } _ => panic() } - let lifted299 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { + let lifted439 : @types.Role? = match mbt_ffi_load8_u((iter_base) + 128) { 0 => Option::None 1 => { - let lifted298 = match (mbt_ffi_load8_u((iter_base) + 132)) { + let lifted438 = match (mbt_ffi_load8_u((iter_base) + 132)) { 0 => { @types.Role::Multimodal @@ -20411,48 +28361,48 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo } 3 => { - let result297 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) + let result437 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 136), mbt_ffi_load32((iter_base) + 140)) - @types.Role::Other(result297) + @types.Role::Other(result437) } _ => panic() } - Option::Some(lifted298) + Option::Some(lifted438) } _ => panic() } - array300.push(@types.SchemaTypeNode::{body : lifted286, metadata : @types.MetadataEnvelope::{doc : lifted288, aliases : array290, examples : array293, deprecated : lifted296, role : lifted299}}) + array440.push(@types.SchemaTypeNode::{body : lifted426, metadata : @types.MetadataEnvelope::{doc : lifted428, aliases : array430, examples : array433, deprecated : lifted436, role : lifted439}}) } mbt_ffi_free(mbt_ffi_load32((return_area) + 16)) - let array305 : Array[@types.SchemaTypeDef] = []; - for index306 = 0; index306 < (mbt_ffi_load32((return_area) + 28)); index306 = index306 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 24)) + (index306 * 24) + let array445 : Array[@types.SchemaTypeDef] = []; + for index446 = 0; index446 < (mbt_ffi_load32((return_area) + 28)); index446 = index446 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 24)) + (index446 * 24) - let result302 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) + let result442 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 0), mbt_ffi_load32((iter_base) + 4)) - let lifted304 : String? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted444 : String? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { - let result303 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) + let result443 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 12), mbt_ffi_load32((iter_base) + 16)) - Option::Some(result303) + Option::Some(result443) } _ => panic() } - array305.push(@types.SchemaTypeDef::{id : result302, name : lifted304, body : mbt_ffi_load32((iter_base) + 20)}) + array445.push(@types.SchemaTypeDef::{id : result442, name : lifted444, body : mbt_ffi_load32((iter_base) + 20)}) } mbt_ffi_free(mbt_ffi_load32((return_area) + 24)) - let array337 : Array[@types.SchemaValueNode] = []; - for index338 = 0; index338 < (mbt_ffi_load32((return_area) + 40)); index338 = index338 + 1 { - let iter_base = (mbt_ffi_load32((return_area) + 36)) + (index338 * 32) + let array477 : Array[@types.SchemaValueNode] = []; + for index478 = 0; index478 < (mbt_ffi_load32((return_area) + 40)); index478 = index478 + 1 { + let iter_base = (mbt_ffi_load32((return_area) + 36)) + (index478 * 32) - let lifted336 = match (mbt_ffi_load8_u((iter_base) + 0)) { + let lifted476 = match (mbt_ffi_load8_u((iter_base) + 0)) { 0 => { @types.SchemaValueNode::BoolValue((mbt_ffi_load8_u((iter_base) + 8) != 0)) @@ -20503,25 +28453,25 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo } 12 => { - let result307 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result447 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::StringValue(result307) + @types.SchemaValueNode::StringValue(result447) } 13 => { - let array308 : Array[Int] = []; - for index309 = 0; index309 < (mbt_ffi_load32((iter_base) + 12)); index309 = index309 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index309 * 4) + let array448 : Array[Int] = []; + for index449 = 0; index449 < (mbt_ffi_load32((iter_base) + 12)); index449 = index449 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index449 * 4) - array308.push(mbt_ffi_load32((iter_base) + 0)) + array448.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::RecordValue(array308) + @types.SchemaValueNode::RecordValue(array448) } 14 => { - let lifted310 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted450 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -20530,7 +28480,7 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted310}) + @types.SchemaValueNode::VariantValue(@types.VariantValuePayload::{case : (mbt_ffi_load32((iter_base) + 8)).reinterpret_as_uint(), payload : lifted450}) } 15 => { @@ -20538,67 +28488,67 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo } 16 => { - let array311 : Array[Bool] = []; - for index312 = 0; index312 < (mbt_ffi_load32((iter_base) + 12)); index312 = index312 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index312 * 1) + let array451 : Array[Bool] = []; + for index452 = 0; index452 < (mbt_ffi_load32((iter_base) + 12)); index452 = index452 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index452 * 1) - array311.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) + array451.push((mbt_ffi_load8_u((iter_base) + 0) != 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FlagsValue(array311) + @types.SchemaValueNode::FlagsValue(array451) } 17 => { - let array313 : Array[Int] = []; - for index314 = 0; index314 < (mbt_ffi_load32((iter_base) + 12)); index314 = index314 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index314 * 4) + let array453 : Array[Int] = []; + for index454 = 0; index454 < (mbt_ffi_load32((iter_base) + 12)); index454 = index454 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index454 * 4) - array313.push(mbt_ffi_load32((iter_base) + 0)) + array453.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::TupleValue(array313) + @types.SchemaValueNode::TupleValue(array453) } 18 => { - let array315 : Array[Int] = []; - for index316 = 0; index316 < (mbt_ffi_load32((iter_base) + 12)); index316 = index316 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index316 * 4) + let array455 : Array[Int] = []; + for index456 = 0; index456 < (mbt_ffi_load32((iter_base) + 12)); index456 = index456 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index456 * 4) - array315.push(mbt_ffi_load32((iter_base) + 0)) + array455.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::ListValue(array315) + @types.SchemaValueNode::ListValue(array455) } 19 => { - let array317 : Array[Int] = []; - for index318 = 0; index318 < (mbt_ffi_load32((iter_base) + 12)); index318 = index318 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index318 * 4) + let array457 : Array[Int] = []; + for index458 = 0; index458 < (mbt_ffi_load32((iter_base) + 12)); index458 = index458 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index458 * 4) - array317.push(mbt_ffi_load32((iter_base) + 0)) + array457.push(mbt_ffi_load32((iter_base) + 0)) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::FixedListValue(array317) + @types.SchemaValueNode::FixedListValue(array457) } 20 => { - let array319 : Array[@types.MapEntry] = []; - for index320 = 0; index320 < (mbt_ffi_load32((iter_base) + 12)); index320 = index320 + 1 { - let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index320 * 8) + let array459 : Array[@types.MapEntry] = []; + for index460 = 0; index460 < (mbt_ffi_load32((iter_base) + 12)); index460 = index460 + 1 { + let iter_base = (mbt_ffi_load32((iter_base) + 8)) + (index460 * 8) - array319.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) + array459.push(@types.MapEntry::{key : mbt_ffi_load32((iter_base) + 0), value : mbt_ffi_load32((iter_base) + 4)}) } mbt_ffi_free(mbt_ffi_load32((iter_base) + 8)) - @types.SchemaValueNode::MapValue(array319) + @types.SchemaValueNode::MapValue(array459) } 21 => { - let lifted321 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { + let lifted461 : Int? = match mbt_ffi_load8_u((iter_base) + 8) { 0 => Option::None 1 => { @@ -20607,14 +28557,14 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - @types.SchemaValueNode::OptionValue(lifted321) + @types.SchemaValueNode::OptionValue(lifted461) } 22 => { - let lifted324 = match (mbt_ffi_load8_u((iter_base) + 8)) { + let lifted464 = match (mbt_ffi_load8_u((iter_base) + 8)) { 0 => { - let lifted322 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted462 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -20623,11 +28573,11 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - @types.ResultValuePayload::OkValue(lifted322) + @types.ResultValuePayload::OkValue(lifted462) } 1 => { - let lifted323 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { + let lifted463 : Int? = match mbt_ffi_load8_u((iter_base) + 12) { 0 => Option::None 1 => { @@ -20636,58 +28586,58 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - @types.ResultValuePayload::ErrValue(lifted323) + @types.ResultValuePayload::ErrValue(lifted463) } _ => panic() } - @types.SchemaValueNode::ResultValue(lifted324) + @types.SchemaValueNode::ResultValue(lifted464) } 23 => { - let result325 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result465 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted327 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted467 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result326 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result466 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result326) + Option::Some(result466) } _ => panic() } - @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result325, language : lifted327}) + @types.SchemaValueNode::TextValue(@types.TextValuePayload::{text : result465, language : lifted467}) } 24 => { - let result328 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result468 = mbt_ffi_ptr2bytes(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - let lifted330 : String? = match mbt_ffi_load8_u((iter_base) + 16) { + let lifted470 : String? = match mbt_ffi_load8_u((iter_base) + 16) { 0 => Option::None 1 => { - let result329 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result469 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - Option::Some(result329) + Option::Some(result469) } _ => panic() } - @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result328, mime_type : lifted330}) + @types.SchemaValueNode::BinaryValue(@types.BinaryValuePayload::{bytes : result468, mime_type : lifted470}) } 25 => { - let result331 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result471 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::PathValue(result331) + @types.SchemaValueNode::PathValue(result471) } 26 => { - let result332 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result472 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UrlValue(result332) + @types.SchemaValueNode::UrlValue(result472) } 27 => { @@ -20699,21 +28649,21 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo } 29 => { - let result333 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) + let result473 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 20), mbt_ffi_load32((iter_base) + 24)) - @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result333}) + @types.SchemaValueNode::QuantityValueNode(@types.QuantityValue::{mantissa : mbt_ffi_load64((iter_base) + 8), scale : mbt_ffi_load32((iter_base) + 16), unit : result473}) } 30 => { - let result334 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result474 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result334, body : mbt_ffi_load32((iter_base) + 16)}) + @types.SchemaValueNode::UnionValue(@types.UnionValuePayload::{tag : result474, body : mbt_ffi_load32((iter_base) + 16)}) } 31 => { - let result335 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) + let result475 = mbt_ffi_ptr2str(mbt_ffi_load32((iter_base) + 8), mbt_ffi_load32((iter_base) + 12)) - @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result335}) + @types.SchemaValueNode::SecretValue(@types.SecretValuePayload::{secret_ref : result475}) } 32 => { @@ -20722,30 +28672,30 @@ pub fn FutureInvokeResult::get(self : FutureInvokeResult) -> Result[@common.Invo _ => panic() } - array337.push(lifted336) + array477.push(lifted476) } mbt_ffi_free(mbt_ffi_load32((return_area) + 36)) - @common.ToolError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array300, defs : array305, root : mbt_ffi_load32((return_area) + 32)}, value : @types.SchemaValueTree::{value_nodes : array337, root : mbt_ffi_load32((return_area) + 44)}}) + @common.ToolError::CustomError(@types.TypedSchemaValue::{graph : @types.SchemaGraph::{type_nodes : array440, defs : array445, root : mbt_ffi_load32((return_area) + 32)}, value : @types.SchemaValueTree::{value_nodes : array477, root : mbt_ffi_load32((return_area) + 44)}}) } _ => panic() } - RpcError::RemoteToolError(lifted339) + RpcError::RemoteToolError(lifted479) } _ => panic() } - Result::Err(lifted340) + Result::Err(lifted480) } _ => panic() } - Option::Some(lifted341) + Option::Some(lifted481) } _ => panic() } - let ret = lifted342 + let ret = lifted482 mbt_ffi_free(return_area) return ret diff --git a/sdks/moonbit/golem_sdk/schema/primitives.mbt b/sdks/moonbit/golem_sdk/schema/primitives.mbt index 3ae1a8bd36..71623cd8d3 100644 --- a/sdks/moonbit/golem_sdk/schema/primitives.mbt +++ b/sdks/moonbit/golem_sdk/schema/primitives.mbt @@ -77,7 +77,7 @@ pub impl IntoSchema for Int with type_id() { ///| pub impl IntoSchema for Int with register_in(_b) { - @model.schema_type(S32) + @model.schema_type(S32(None)) } ///| @@ -105,7 +105,7 @@ pub impl IntoSchema for UInt with type_id() { ///| pub impl IntoSchema for UInt with register_in(_b) { - @model.schema_type(U32) + @model.schema_type(U32(None)) } ///| @@ -133,7 +133,7 @@ pub impl IntoSchema for Int64 with type_id() { ///| pub impl IntoSchema for Int64 with register_in(_b) { - @model.schema_type(S64) + @model.schema_type(S64(None)) } ///| @@ -161,7 +161,7 @@ pub impl IntoSchema for UInt64 with type_id() { ///| pub impl IntoSchema for UInt64 with register_in(_b) { - @model.schema_type(U64) + @model.schema_type(U64(None)) } ///| @@ -189,7 +189,7 @@ pub impl IntoSchema for Float with type_id() { ///| pub impl IntoSchema for Float with register_in(_b) { - @model.schema_type(F32) + @model.schema_type(F32(None)) } ///| @@ -217,7 +217,7 @@ pub impl IntoSchema for Double with type_id() { ///| pub impl IntoSchema for Double with register_in(_b) { - @model.schema_type(F64) + @model.schema_type(F64(None)) } ///| @@ -245,7 +245,7 @@ pub impl IntoSchema for Byte with type_id() { ///| pub impl IntoSchema for Byte with register_in(_b) { - @model.schema_type(U8) + @model.schema_type(U8(None)) } ///| diff --git a/sdks/moonbit/golem_sdk/schema_model/model.mbt b/sdks/moonbit/golem_sdk/schema_model/model.mbt index b5653bf29b..f1596fac06 100644 --- a/sdks/moonbit/golem_sdk/schema_model/model.mbt +++ b/sdks/moonbit/golem_sdk/schema_model/model.mbt @@ -35,16 +35,16 @@ pub(all) enum SchemaTypeBody { Ref(TypeId) // Primitives Bool - S8 - S16 - S32 - S64 - U8 - U16 - U32 - U64 - F32 - F64 + S8(@types.NumericRestrictions?) + S16(@types.NumericRestrictions?) + S32(@types.NumericRestrictions?) + S64(@types.NumericRestrictions?) + U8(@types.NumericRestrictions?) + U16(@types.NumericRestrictions?) + U32(@types.NumericRestrictions?) + U64(@types.NumericRestrictions?) + F32(@types.NumericRestrictions?) + F64(@types.NumericRestrictions?) Char String // Structural composites diff --git a/sdks/moonbit/golem_sdk/schema_model/pkg.generated.mbti b/sdks/moonbit/golem_sdk/schema_model/pkg.generated.mbti index 72551a05b3..81ab6bf51d 100644 --- a/sdks/moonbit/golem_sdk/schema_model/pkg.generated.mbti +++ b/sdks/moonbit/golem_sdk/schema_model/pkg.generated.mbti @@ -145,16 +145,16 @@ pub(all) struct SchemaType { pub(all) enum SchemaTypeBody { Ref(String) Bool - S8 - S16 - S32 - S64 - U8 - U16 - U32 - U64 - F32 - F64 + S8(@types.NumericRestrictions?) + S16(@types.NumericRestrictions?) + S32(@types.NumericRestrictions?) + S64(@types.NumericRestrictions?) + U8(@types.NumericRestrictions?) + U16(@types.NumericRestrictions?) + U32(@types.NumericRestrictions?) + U64(@types.NumericRestrictions?) + F32(@types.NumericRestrictions?) + F64(@types.NumericRestrictions?) Char String Record(Array[NamedFieldType]) diff --git a/sdks/moonbit/golem_sdk/schema_model/roundtrip_test.mbt b/sdks/moonbit/golem_sdk/schema_model/roundtrip_test.mbt index 65d200851c..005307a734 100644 --- a/sdks/moonbit/golem_sdk/schema_model/roundtrip_test.mbt +++ b/sdks/moonbit/golem_sdk/schema_model/roundtrip_test.mbt @@ -23,20 +23,50 @@ fn rt_graph(g : SchemaGraph) -> SchemaGraph raise { schema_graph_from_wit(schema_graph_to_wit(g)) } +///| +fn encoded_body(st : SchemaType) -> @types.SchemaTypeBody raise { + let wit = schema_graph_to_wit({ defs: [], root: st }) + wit.type_nodes[wit.root].body +} + +///| +fn ub(v : UInt64) -> @types.NumericBound { + @types.Unsigned(v) +} + +///| +fn sb(v : Int64) -> @types.NumericBound { + @types.Signed(v) +} + +///| +fn fb(bits : UInt64) -> @types.NumericBound { + @types.FloatBits(bits) +} + +///| +fn nr( + min? : @types.NumericBound, + max? : @types.NumericBound, + unit? : String, +) -> @types.NumericRestrictions { + { min, max, unit } +} + ///| test "primitive types round-trip" { let prims : Array[SchemaTypeBody] = [ Bool, - S8, - S16, - S32, - S64, - U8, - U16, - U32, - U64, - F32, - F64, + S8(None), + S16(None), + S32(None), + S64(None), + U8(None), + U16(None), + U32(None), + U64(None), + F32(None), + F64(None), Char, String, Datetime, @@ -48,24 +78,86 @@ test "primitive types round-trip" { } } +///| +test "numeric restrictions golden vectors round-trip" { + let i64_max = 9_223_372_036_854_775_807L + let u64_max = 18_446_744_073_709_551_615UL + let cases : Array[SchemaType] = [ + schema_type(U32(None)), + schema_type(U32(Some(nr(min=ub(1UL))))), + schema_type(U32(Some(nr(min=ub(1UL), unit="items")))), + schema_type(U32(Some(nr(min=ub(0UL), max=ub(100UL))))), + schema_type(U32(Some(nr(min=ub(0UL), max=ub(100UL), unit="percent")))), + schema_type(S64(Some(nr(min=sb(0L), max=sb(i64_max))))), + schema_type(S64(Some(nr(min=sb(0L), max=sb(i64_max), unit="ns")))), + schema_type(U64(Some(nr(min=ub(u64_max - 1UL), max=ub(u64_max))))), + schema_type( + U64(Some(nr(min=ub(u64_max - 1UL), max=ub(u64_max), unit="bytes"))), + ), + schema_type(F64(Some(nr(min=fb(0UL))))), + schema_type(F64(Some(nr(min=fb(0UL), unit="seconds")))), + schema_type(S8(Some(nr(min=sb(-1L), max=sb(1L))))), + schema_type(F32(Some(nr(max=fb(4_609_434_218_613_702_656UL))))), + ] + inspect( + cases.map(rt_type), + content=( + #|[{body: U32(None), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: U32(Some({min: Some(Unsigned(1)), max: None, unit: None})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: U32(Some({min: Some(Unsigned(1)), max: None, unit: Some(items)})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: U32(Some({min: Some(Unsigned(0)), max: Some(Unsigned(100)), unit: None})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: U32(Some({min: Some(Unsigned(0)), max: Some(Unsigned(100)), unit: Some(percent)})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: S64(Some({min: Some(Signed(0)), max: Some(Signed(9223372036854775807)), unit: None})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: S64(Some({min: Some(Signed(0)), max: Some(Signed(9223372036854775807)), unit: Some(ns)})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: U64(Some({min: Some(Unsigned(18446744073709551614)), max: Some(Unsigned(18446744073709551615)), unit: None})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: U64(Some({min: Some(Unsigned(18446744073709551614)), max: Some(Unsigned(18446744073709551615)), unit: Some(bytes)})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: F64(Some({min: Some(FloatBits(0)), max: None, unit: None})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: F64(Some({min: Some(FloatBits(0)), max: None, unit: Some(seconds)})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: S8(Some({min: Some(Signed(-1)), max: Some(Signed(1)), unit: None})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}, {body: F32(Some({min: None, max: Some(FloatBits(4609434218613702656)), unit: None})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}}] + ), + ) +} + +///| +test "numeric restrictions canonicalization" { + inspect( + encoded_body(schema_type(U32(Some(nr())))), + content=( + #|U32Type(None) + ), + ) + inspect( + rt_type(schema_type(U32(Some(nr(unit=""))))), + content=( + #|{body: U32(None), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}} + ), + ) + inspect( + rt_type(schema_type(U32(Some(nr(min=ub(1UL), unit=""))))), + content=( + #|{body: U32(Some({min: Some(Unsigned(1)), max: None, unit: None})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}} + ), + ) + inspect( + rt_type(schema_type(F64(Some(nr(min=fb(9_223_372_036_854_775_808UL)))))), + content=( + #|{body: F64(Some({min: Some(FloatBits(0)), max: None, unit: None})), metadata: {doc: None, aliases: [], examples: [], deprecated: None, role: None}} + ), + ) +} + ///| test "composite types round-trip" { let inner = schema_type( Record([ - field("id", schema_type(S64)), + field("id", schema_type(S64(None))), field("name", schema_type(String)), field("tags", schema_type(List(schema_type(String)))), field("maybe", schema_type(Option(schema_type(Bool)))), field( "outcome", - schema_type(Result(Some(schema_type(S32)), Some(schema_type(String)))), + schema_type( + Result(Some(schema_type(S32(None))), Some(schema_type(String))), + ), + ), + field( + "pairs", + schema_type(Map(schema_type(String), schema_type(U32(None)))), ), - field("pairs", schema_type(Map(schema_type(String), schema_type(U32)))), - field("fixed", schema_type(FixedList(schema_type(U8), 4))), + field("fixed", schema_type(FixedList(schema_type(U8(None)), 4))), field( "triple", schema_type( - Tuple([schema_type(Bool), schema_type(Char), schema_type(F64)]), + Tuple([schema_type(Bool), schema_type(Char), schema_type(F64(None))]), ), ), field("flags", schema_type(Flags(["a", "b", "c"]))), @@ -74,7 +166,7 @@ test "composite types round-trip" { "shape", schema_type( Variant([ - variant_case("circle", payload=schema_type(F64)), + variant_case("circle", payload=schema_type(F64(None))), variant_case("point"), ]), ), @@ -135,7 +227,7 @@ test "Ref maps to ref-type by first-seen def index" { let g : SchemaGraph = { defs: [ { id: "Zulu", name: None, body: schema_type(String) }, - { id: "Bravo", name: None, body: schema_type(S32) }, + { id: "Bravo", name: None, body: schema_type(S32(None)) }, ], root: schema_type( Tuple([schema_type(Ref("Zulu")), schema_type(Ref("Bravo"))]), @@ -172,7 +264,7 @@ test "self-recursive type closes via reserve/commit" { "cons", payload=schema_type( Record([ - field("head", schema_type(S32)), + field("head", schema_type(S32(None))), field("tail", b.ref_("IntList")), ]), ), @@ -300,7 +392,7 @@ test "merge_agent_graphs dedups shared defs and rejects conflicts" { let shared : SchemaTypeDef = { id: "Shared", name: None, - body: schema_type(S32), + body: schema_type(S32(None)), } let g1 : SchemaGraph = { defs: [shared], root: schema_type(Ref("Shared")) } let g2 : SchemaGraph = { @@ -356,7 +448,7 @@ test "semantic and capability types round-trip" { let quota_s : @types.QuotaTokenSpec = { resource_name: Some("cpu") } let branch_a : UnionBranch = { tag: "a", - body: schema_type(S32), + body: schema_type(S32(None)), discriminator: @types.DiscriminatorRule::Prefix("a:"), metadata: empty_metadata(), } @@ -375,7 +467,7 @@ test "semantic and capability types round-trip" { field("quantity", schema_type(Quantity(qty_s))), field("secret", schema_type(Secret(secret_s))), field("quota", schema_type(QuotaToken(quota_s))), - field("future_some", schema_type(Future(Some(schema_type(S32))))), + field("future_some", schema_type(Future(Some(schema_type(S32(None)))))), field("future_none", schema_type(Future(None))), field("stream_some", schema_type(Stream(Some(schema_type(String))))), field("stream_none", schema_type(Stream(None))), @@ -390,7 +482,7 @@ test "encode_merged_agent_graph shares one pool across roots" { let shared : SchemaTypeDef = { id: "Shared", name: None, - body: schema_type(S32), + body: schema_type(S32(None)), } let g1 : SchemaGraph = { defs: [shared], root: schema_type(Ref("Shared")) } let g2 : SchemaGraph = { diff --git a/sdks/moonbit/golem_sdk/schema_model/validation.mbt b/sdks/moonbit/golem_sdk/schema_model/validation.mbt index 3b4217c56a..dd08b97aac 100644 --- a/sdks/moonbit/golem_sdk/schema_model/validation.mbt +++ b/sdks/moonbit/golem_sdk/schema_model/validation.mbt @@ -268,16 +268,16 @@ fn is_primitive_key_resolved(graph : SchemaGraph, ty : SchemaType) -> Bool { fn is_primitive_key(body : SchemaTypeBody) -> Bool { match body { Bool - | S8 - | S16 - | S32 - | S64 - | U8 - | U16 - | U32 - | U64 - | F32 - | F64 + | S8(_) + | S16(_) + | S32(_) + | S64(_) + | U8(_) + | U16(_) + | U32(_) + | U64(_) + | F32(_) + | F64(_) | Char | String => true _ => false diff --git a/sdks/moonbit/golem_sdk/schema_model/validation_test.mbt b/sdks/moonbit/golem_sdk/schema_model/validation_test.mbt index fedc0be674..4c3d309ab6 100644 --- a/sdks/moonbit/golem_sdk/schema_model/validation_test.mbt +++ b/sdks/moonbit/golem_sdk/schema_model/validation_test.mbt @@ -28,7 +28,7 @@ fn branch( ///| test "well-formed record graph passes" { let rec = schema_type( - Record([field("name", vstr()), field("age", schema_type(S32))]), + Record([field("name", vstr()), field("age", schema_type(S32(None)))]), ) let g : SchemaGraph = { defs: [def("Person", rec)], @@ -53,7 +53,7 @@ test "map with primitive key resolved through a ref passes" { ///| test "duplicate type id" { let g : SchemaGraph = { - defs: [def("a", vstr()), def("a", schema_type(S32))], + defs: [def("a", vstr()), def("a", schema_type(S32(None)))], root: schema_type(Ref("a")), } inspect( @@ -370,7 +370,7 @@ test "union string rule on non-string body" { let g : SchemaGraph = { defs: [], root: schema_type( - Union([branch("t", schema_type(S32), @types.Prefix("a"))]), + Union([branch("t", schema_type(S32(None)), @types.Prefix("a"))]), ), } inspect( @@ -433,7 +433,7 @@ test "union field-equals literal on non-string field" { Union([ branch( "t", - schema_type(Record([field("x", schema_type(S32))])), + schema_type(Record([field("x", schema_type(S32(None)))])), @types.FieldEquals({ field_name: "x", literal: Some("v") }), ), ]), diff --git a/sdks/moonbit/golem_sdk/schema_model/wit.mbt b/sdks/moonbit/golem_sdk/schema_model/wit.mbt index 48d3e123f2..09887de317 100644 --- a/sdks/moonbit/golem_sdk/schema_model/wit.mbt +++ b/sdks/moonbit/golem_sdk/schema_model/wit.mbt @@ -43,6 +43,49 @@ fn u16_in_range(u : UInt) -> Bool { u <= 65535 } +///| +fn canonicalize_numeric_bound( + bound : @types.NumericBound, +) -> @types.NumericBound { + match bound { + @types.FloatBits(bits) => + // IEEE-754 f64 has exactly two zero bit patterns; canonicalize -0.0 to +0.0. + if bits == 0UL || bits == 9_223_372_036_854_775_808UL { + @types.FloatBits(0UL) + } else { + bound + } + _ => bound + } +} + +///| +fn normalize_numeric_restrictions( + restrictions : @types.NumericRestrictions?, +) -> @types.NumericRestrictions? { + match restrictions { + None => None + Some(r) => { + let unit = match r.unit { + Some("") => None + other => other + } + let normalized : @types.NumericRestrictions = { + min: r.min.map(canonicalize_numeric_bound), + max: r.max.map(canonicalize_numeric_bound), + unit, + } + if normalized.min is None && + normalized.max is None && + normalized.unit is None { + None + } else { + Some(normalized) + } + } + } +} + // ============================================================ // Schema type / graph — encode (recursive -> flat) // ============================================================ @@ -131,16 +174,16 @@ fn GraphEncoder::encode_body( raise EncodeError("schema graph references unknown type id '\{id}'") } Bool => @types.BoolType - S8 => @types.S8Type - S16 => @types.S16Type - S32 => @types.S32Type - S64 => @types.S64Type - U8 => @types.U8Type - U16 => @types.U16Type - U32 => @types.U32Type - U64 => @types.U64Type - F32 => @types.F32Type - F64 => @types.F64Type + S8(r) => @types.S8Type(normalize_numeric_restrictions(r)) + S16(r) => @types.S16Type(normalize_numeric_restrictions(r)) + S32(r) => @types.S32Type(normalize_numeric_restrictions(r)) + S64(r) => @types.S64Type(normalize_numeric_restrictions(r)) + U8(r) => @types.U8Type(normalize_numeric_restrictions(r)) + U16(r) => @types.U16Type(normalize_numeric_restrictions(r)) + U32(r) => @types.U32Type(normalize_numeric_restrictions(r)) + U64(r) => @types.U64Type(normalize_numeric_restrictions(r)) + F32(r) => @types.F32Type(normalize_numeric_restrictions(r)) + F64(r) => @types.F64Type(normalize_numeric_restrictions(r)) Char => @types.CharType String => @types.StringType Record(fields) => @@ -371,16 +414,16 @@ fn GraphDecoder::body_of( match body { @types.RefType(di) => Ref(self.def_id(di)) @types.BoolType => Bool - @types.S8Type => S8 - @types.S16Type => S16 - @types.S32Type => S32 - @types.S64Type => S64 - @types.U8Type => U8 - @types.U16Type => U16 - @types.U32Type => U32 - @types.U64Type => U64 - @types.F32Type => F32 - @types.F64Type => F64 + @types.S8Type(r) => S8(normalize_numeric_restrictions(r)) + @types.S16Type(r) => S16(normalize_numeric_restrictions(r)) + @types.S32Type(r) => S32(normalize_numeric_restrictions(r)) + @types.S64Type(r) => S64(normalize_numeric_restrictions(r)) + @types.U8Type(r) => U8(normalize_numeric_restrictions(r)) + @types.U16Type(r) => U16(normalize_numeric_restrictions(r)) + @types.U32Type(r) => U32(normalize_numeric_restrictions(r)) + @types.U64Type(r) => U64(normalize_numeric_restrictions(r)) + @types.F32Type(r) => F32(normalize_numeric_restrictions(r)) + @types.F64Type(r) => F64(normalize_numeric_restrictions(r)) @types.CharType => Char @types.StringType => String @types.RecordType(fields) => diff --git a/sdks/rust/golem-rust/Cargo.toml b/sdks/rust/golem-rust/Cargo.toml index afc383347c..ea75e26cdd 100644 --- a/sdks/rust/golem-rust/Cargo.toml +++ b/sdks/rust/golem-rust/Cargo.toml @@ -20,6 +20,10 @@ harness = false name = "tool" harness = false +[[test]] +name = "tool_canonical" +harness = false + [[test]] name = "ui" harness = false diff --git a/sdks/rust/golem-rust/tests/tool_canonical.rs b/sdks/rust/golem-rust/tests/tool_canonical.rs new file mode 100644 index 0000000000..a0b536de3c --- /dev/null +++ b/sdks/rust/golem-rust/tests/tool_canonical.rs @@ -0,0 +1,1137 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Canonical agent-tools examples (§5.3.1 `grep`, §5.3.5.1 `git`) ported to the +//! Golem Rust SDK and validated through the public discover-tools registry path +//! (`get_all_tools` / `get_tool_by_name` / `get_extended_tool_by_name`, the same +//! functions `guest.discover-tools` / `guest.get-tool` delegate to). +//! +//! Adaptations from the spec's illustrative `golem_tool` crate to the finalized +//! SDK + WIT model: +//! - `Path` -> `std::path::PathBuf`, `Url` -> `url::Url`, `DateTime` -> +//! `chrono::DateTime`, `RegexString` -> `String` refined with +//! `#[arg(regex = ...)]`. +//! - `keyvalue-t` is `SchemaValue::Map`, authored as +//! `BTreeMap` (a repeatable-map option). +//! - color/output sum types are real enums deriving `IntoSchema`/`FromSchema`. +//! - Tool-wide globals propagate from an ancestor command; a pure-dispatcher +//! root cannot carry globals, so multi-level propagation is exercised on the +//! `git remote` subtree dispatcher (declared once, effective in descendants). + +test_r::enable!(); + +// Both canonical examples register their tools into the same process-global +// tool registry, which is not thread-safe (it transitively holds a wit-bindgen +// guest resource handle and is built for the single-threaded WASM guest). A +// single parent `#[sequential]` suite makes test-r share one execution lock +// across every descendant test, so the two example modules never touch the +// registry concurrently *in-process*. +// +// Every test additionally carries `#[test_r::never_capture]`. With output +// capturing on, test-r runs the suite across parallel worker subprocesses +// (capture requires it), and that worker/IPC path is unreliable for this +// registry-reading binary. `never_capture` keeps the whole binary running +// in-process, where the `#[sequential]` lock fully serializes registry access. +// Any test added to this file MUST keep `#[test_r::never_capture]`, otherwise +// capturing turns back on for the binary and the flaky worker path returns. +#[cfg(test)] +#[cfg(feature = "export_golem_agentic")] +#[test_r::sequential] +mod canonical { + #[allow(clippy::disallowed_names, dead_code)] + mod grep_canonical { + use golem_rust::agentic::{ + EffectiveCommandField, ExtendedOptionShape, ExtendedToolType, + encode_schema_value_default, get_all_tools, get_extended_tool_by_name, + get_tool_by_name, option_collected_graph, render_argument_help, render_help, + }; + use golem_rust::schema::schema_type::NumericBound; + use golem_rust::schema::{SchemaType, SchemaValue}; + use golem_rust::wasip2::io::streams::{InputStream, OutputStream}; + use golem_rust::{FromSchema, IntoSchema, tool_definition, tool_implementation}; + use golem_rust_macro::ToolError; + use std::path::PathBuf; + use test_r::test; + + #[derive(Clone, IntoSchema, FromSchema)] + #[schema(rename_all = "kebab-case")] + enum ColorMode { + Always, + Never, + Auto, + } + + #[derive(IntoSchema, FromSchema)] + struct Hit { + file: PathBuf, + line: u32, + text: String, + } + + /// Errors raised by `grep`. + #[derive(ToolError)] + enum GrepError { + /// The supplied pattern is not a valid regex. + #[tool_error(kind = "usage-error", exit_code = 2)] + InvalidPattern { reason: String }, + /// No line matched. + #[tool_error(kind = "runtime-error", exit_code = 1)] + NoMatch, + } + + /// Search files for a regex pattern. + #[tool_definition(version = "2.0.0")] + trait Grep { + /// Search files for a regex pattern. Bare `grep` runs this body. + #[arg(case_sensitive = "global", short = 'i', kind = "flag")] + #[arg(color = "global", default = "auto")] + #[arg(pattern = "positional", regex = r"^.+$")] + #[arg( + extra_patterns = "option", + short = 'e', + repeatable = "either", + delim = ',' + )] + #[arg(max_count = "option", short = 'n', min = 1)] + #[arg(files = "tail", accepts_stdio = true)] + fn grep( + &self, + case_sensitive: bool, + color: ColorMode, + pattern: String, + extra_patterns: Vec, + max_count: Option, + files: Vec, + stdin: InputStream, + stdout: OutputStream, + ) -> Result, GrepError>; + + /// In-place text replacement. + fn replace( + &self, + case_sensitive: bool, + color: ColorMode, + pattern: String, + replacement: String, + files: Vec, + ) -> Result; + } + + struct LeafGrep; + + #[tool_implementation] + impl Grep for LeafGrep { + fn grep( + &self, + _case_sensitive: bool, + _color: ColorMode, + _pattern: String, + _extra_patterns: Vec, + _max_count: Option, + _files: Vec, + _stdin: InputStream, + _stdout: OutputStream, + ) -> Result, GrepError> { + Ok(vec![]) + } + + fn replace( + &self, + _case_sensitive: bool, + _color: ColorMode, + _pattern: String, + _replacement: String, + _files: Vec, + ) -> Result { + Ok(0) + } + } + + fn grep_tool() -> ExtendedToolType { + get_extended_tool_by_name("grep") + .expect("grep is registered via #[tool_implementation]") + } + + #[test] + #[test_r::never_capture] + fn grep_is_discoverable_through_registry() { + // `discover-tools` -> `get_all_tools`. + let all = get_all_tools(); + assert!( + all.iter().any(|t| t.commands.nodes[0].name == "grep"), + "grep must appear in discover-tools output" + ); + // `get-tool` -> `get_tool_by_name`. + let wire = get_tool_by_name("grep").expect("get-tool resolves grep"); + assert_eq!(wire.version, "2.0.0"); + assert_eq!(wire.commands.nodes[0].name, "grep"); + } + + #[test] + #[test_r::never_capture] + fn grep_root_metadata() { + let tool = grep_tool(); + assert_eq!(tool.version, "2.0.0"); + assert_eq!(tool.tool_name(), "grep"); + + let root = &tool.commands[0]; + assert_eq!(root.name, "grep"); + + // Two globals: a `color` option and a `case-sensitive` flag. + assert_eq!(root.globals.options.len(), 1); + let color = &root.globals.options[0]; + assert_eq!(color.long, "color"); + assert!(matches!(color.shape, ExtendedOptionShape::Scalar(_))); + assert_eq!(root.globals.flags.len(), 1); + assert_eq!(root.globals.flags[0].long, "case-sensitive"); + assert_eq!(root.globals.flags[0].short, Some('i')); + + let body = root.body.as_ref().expect("grep has an implicit body"); + + // `pattern` positional carries the regex refinement. + assert_eq!(body.positionals.fixed.len(), 1); + assert_eq!(body.positionals.fixed[0].name, "pattern"); + + // `files` is the stdio-bound tail positional. + let tail = body.positionals.tail.as_ref().expect("files tail"); + assert_eq!(tail.name, "files"); + assert!(tail.accepts_stdio); + + // `extra-patterns` is a repeatable-list option; `max-count` a scalar. + let extra = body + .options + .iter() + .find(|o| o.long == "extra-patterns") + .expect("extra-patterns option"); + assert_eq!(extra.short, Some('e')); + assert!(matches!( + extra.shape, + ExtendedOptionShape::RepeatableList(_) + )); + let max_count = body + .options + .iter() + .find(|o| o.long == "max-count") + .expect("max-count option"); + assert_eq!(max_count.short, Some('n')); + // `Option` makes the scalar option not-required (the distinct + // `OptionalScalar` shape is opted into with `#[arg(optional_scalar)]`). + assert!(matches!(max_count.shape, ExtendedOptionShape::Scalar(_))); + assert!(!max_count.required); + + // stdin/stdout slots are present. + assert!(body.stdin.is_some()); + assert!(body.stdout.is_some()); + + // Two declared error cases (mixed usage/runtime kinds). + assert_eq!(body.errors.len(), 2); + assert_eq!(body.errors[0].name, "invalid-pattern"); + assert_eq!(body.errors[0].exit_code, 2); + assert_eq!(body.errors[1].name, "no-match"); + assert_eq!(body.errors[1].exit_code, 1); + + tool.try_to_tool() + .expect("grep tool is valid wire metadata"); + } + + #[test] + #[test_r::never_capture] + fn grep_replace_subcommand_deprojects_inherited_globals() { + let tool = grep_tool(); + let root = &tool.commands[0]; + let replace = root + .subcommands + .iter() + .map(|&i| &tool.commands[i as usize]) + .find(|c| c.name == "replace") + .expect("replace subcommand"); + let body = replace.body.as_ref().expect("replace body"); + + // `case_sensitive` / `color` repeat the inherited root globals and are + // de-projected from the replace body (covered once, by the root global). + assert!( + !body.flags.iter().any(|f| f.long == "case-sensitive"), + "inherited case-sensitive global must be suppressed in replace body" + ); + assert!( + !body.options.iter().any(|o| o.long == "color") + && !body.positionals.fixed.iter().any(|p| p.name == "color"), + "inherited color global must be suppressed in replace body" + ); + + // The genuine body positionals remain, in order. + let names: Vec<&str> = body + .positionals + .fixed + .iter() + .map(|p| p.name.as_str()) + .collect(); + assert_eq!(names, vec!["pattern", "replacement"]); + let tail = body.positionals.tail.as_ref().expect("replace files tail"); + assert_eq!(tail.name, "files"); + + tool.try_to_tool().expect("grep tool with replace is valid"); + } + + #[test] + #[test_r::never_capture] + fn grep_canonical_input_field_order() { + // D7: globals (in root->node order: options then flags), then body + // positionals (fixed, tail), options, flags. + let tool = grep_tool(); + let fields = tool.canonical_input_fields(0); + let names: Vec<&str> = fields.iter().map(|f| f.name.as_str()).collect(); + assert_eq!( + names, + vec![ + "color", + "case-sensitive", + "pattern", + "files", + "extra-patterns", + "max-count", + ] + ); + } + + #[test] + #[test_r::never_capture] + fn grep_color_default_encodes_to_schema_value_tree() { + // D9: the `default = "auto"` literal resolves to the enum case and + // encodes into a self-contained schema-value-tree. + let tool = grep_tool(); + let color = tool.commands[0] + .globals + .options + .iter() + .find(|o| o.long == "color") + .expect("color global option"); + let default = color.default.as_ref().expect("color has a default"); + assert_eq!(*default, SchemaValue::Enum { case: 2 }); + encode_schema_value_default(default).expect("default encodes to a schema-value-tree"); + } + + #[test] + #[test_r::never_capture] + fn grep_help_renders_at_root_and_argument_depth() { + let tool = grep_tool(); + + // The root command is addressed by the empty path; subcommands by their + // names below the root. + let root_help = render_help(&tool, &[]).expect("root help"); + assert!(root_help.contains("Usage: grep")); + assert!(root_help.contains("Globals:")); + assert!(root_help.contains("--color")); + assert!(root_help.contains("--case-sensitive")); + assert!(root_help.contains("pattern")); + assert!(root_help.contains("files...")); + assert!(root_help.contains("Subcommands:")); + assert!(root_help.contains("replace")); + + let sub_help = render_help(&tool, &["replace".to_string()]).expect("sub help"); + assert!(sub_help.contains("Usage: replace")); + + let color_help = render_argument_help(&tool, &[], "color").expect("color arg help"); + assert!(color_help.contains("--color (option, global)")); + + let pattern_help = + render_argument_help(&tool, &[], "pattern").expect("pattern arg help"); + assert!(pattern_help.contains("pattern (positional")); + } + + // --- D8: globals declared once on an ancestor are effective in descendants - + + #[test] + #[test_r::never_capture] + fn grep_global_is_effective_on_subcommand() { + let tool = grep_tool(); + let replace_idx = tool.commands[0] + .subcommands + .iter() + .copied() + .find(|&i| tool.commands[i as usize].name == "replace") + .expect("replace index") as usize; + + // The replace node stores no globals itself... + assert!(tool.commands[replace_idx].globals.options.is_empty()); + assert!(tool.commands[replace_idx].globals.flags.is_empty()); + + // ...but the root globals are effective at replace depth. + let effective = tool.effective_globals(replace_idx); + assert!(effective.iter().any(|g| matches!( + g, + EffectiveCommandField::Flag(f) if f.long == "case-sensitive" + ))); + assert!(effective.iter().any(|g| matches!( + g, + EffectiveCommandField::Option(o) if o.long == "color" + ))); + } + + // --- D1: a tool with no #[tool_implementation] is never registered --------- + + /// A defined-but-unimplemented tool. No `#[tool_implementation]` impl exists, + /// so no ctor registers it. + #[tool_definition] + trait Unimplemented { + fn unimplemented(&self, name: String) -> Result<(), GrepError>; + } + + #[test] + #[test_r::never_capture] + fn unimplemented_tool_is_not_registered() { + assert!( + get_extended_tool_by_name("unimplemented").is_none(), + "a tool with no #[tool_implementation] must not be discoverable" + ); + // It must also be absent from the full discover-tools listing. + assert!( + !get_all_tools() + .iter() + .any(|t| t.commands.nodes[0].name == "unimplemented") + ); + } + + // --- D2: numeric bounds up to u64::MAX ------------------------------------- + + #[tool_definition] + trait BigBound { + #[arg(count = "option", bounds = (0, u64::MAX))] + fn big_bound(&self, count: Option) -> Result<(), GrepError>; + } + + struct LeafBigBound; + + #[tool_implementation] + impl BigBound for LeafBigBound { + fn big_bound(&self, _count: Option) -> Result<(), GrepError> { + Ok(()) + } + } + + #[test] + #[test_r::never_capture] + fn numeric_bounds_reach_u64_max() { + // Through the discover-tools path: registered via #[tool_implementation], + // resolved by name, and round-tripped to wire metadata. + get_tool_by_name("big-bound").expect("get-tool resolves big-bound"); + let tool = get_extended_tool_by_name("big-bound") + .expect("big-bound is registered via #[tool_implementation]"); + let body = tool.commands[0].body.as_ref().expect("body"); + let count = body + .options + .iter() + .find(|o| o.long == "count") + .expect("count option"); + let graph = option_collected_graph(&count.shape); + match &graph.root { + SchemaType::U64 { restrictions, .. } => { + let r = restrictions.as_ref().expect("u64 restrictions present"); + assert_eq!(r.min, Some(NumericBound::Unsigned(0))); + assert_eq!(r.max, Some(NumericBound::Unsigned(u64::MAX))); + } + other => panic!("expected a U64 option type, got {other:?}"), + } + tool.try_to_tool() + .expect("u64::MAX bound encodes to valid wire metadata"); + } + } + + // The canonical `git` subset (§5.3.5.1). It needs the `url` and `chrono` + // schema features for the `Url` / `DateTime` nodes, so it is compiled only + // when those features are enabled (in addition to `export_golem_agentic`). + #[cfg(all(feature = "url", feature = "chrono"))] + #[allow(clippy::disallowed_names, dead_code)] + mod git_canonical { + use chrono::{DateTime, Utc}; + use golem_rust::agentic::{ + EffectiveCommandField, ExtendedConstraint, ExtendedOptionShape, ExtendedRef, + ExtendedRepeatableListShape, ExtendedToolType, ExtendedValueIsLiteral, + get_extended_tool_by_name, get_tool_by_name, option_collected_graph, + }; + use golem_rust::golem_agentic::golem::tool::common::{ErrorKind, FlagShape, Repetition}; + use golem_rust::schema::{SchemaType, SchemaValue}; + use golem_rust::{FromSchema, IntoSchema, tool_definition, tool_implementation}; + use golem_rust_macro::ToolError; + use std::collections::BTreeMap; + use std::path::PathBuf; + use test_r::test; + use url::Url; + + #[derive(Clone, IntoSchema, FromSchema)] + #[schema(rename_all = "kebab-case")] + enum OutputMode { + Human, + Porcelain, + Json, + } + + #[derive(IntoSchema, FromSchema)] + struct CommitResult { + hash: String, + files_changed: u32, + insertions: u32, + deletions: u32, + } + + #[derive(IntoSchema, FromSchema)] + struct LogEntry { + hash: String, + author: String, + date: DateTime, + message: String, + } + + #[derive(ToolError)] + enum CommitError { + #[tool_error(kind = "runtime-error", exit_code = 1)] + NothingStaged, + #[tool_error(kind = "runtime-error", exit_code = 128)] + DirtyMerge, + #[tool_error(kind = "usage-error", exit_code = 129)] + BadAuthorFormat { author: String }, + } + + #[derive(ToolError)] + enum LogError { + #[tool_error(kind = "usage-error", exit_code = 128)] + BadRevision, + #[tool_error(kind = "usage-error", exit_code = 129)] + NotARepository, + } + + #[derive(ToolError)] + enum RemoteError { + #[tool_error(kind = "usage-error", exit_code = 128)] + NoSuchRemote { name: String }, + } + + #[derive(ToolError)] + enum SetUrlError { + #[tool_error(kind = "runtime-error", exit_code = 1)] + Failed(String), + } + + /// Stupid content tracker. + #[tool_definition] + trait Git { + /// Record changes to the repository. + #[command(aliases = ["ci"], annotations(destructive = true))] + // Globals effective on this command: + #[arg(verbose = "global", short = 'v', kind = "count-flag", max = 3)] + #[arg(git_dir = "global", env = "GIT_DIR", default = ".git")] + #[arg(paginate = "global", kind = "flag", negatable = true, default = true)] + #[arg(config = "global", short = 'c', repeatable = "repeated")] + // Per-command: + #[arg(message = "option", short = 'm', required = true, aliases = ["msg"])] + #[arg(author = "option", env = "GIT_AUTHOR_NAME", regex = r"^.+ <.+@.+>$")] + #[arg(amend = "flag", negatable = true, default = false)] + #[arg(signoff = "flag", negatable = true, default = false)] + #[arg(reset_author = "flag", default = false)] + #[arg(output = "option", default = "human")] + #[constraint(implies(lhs = "reset-author", rhs = "amend"))] + #[constraint(requires_all = value_is("output", "json"))] + #[result(formatters = ["human", "porcelain", "json"], default = "human")] + fn commit( + &self, + verbose: u32, + git_dir: PathBuf, + paginate: bool, + config: BTreeMap, + message: String, + author: Option, + amend: bool, + signoff: bool, + reset_author: bool, + output: OutputMode, + ) -> Result; + + /// Manage set of tracked repositories. Pure dispatcher. + // The subtree dispatcher declares the propagating globals once; they are + // effective in every descendant of `git remote`. + #[command(subtree = Remote, aliases = ["rmt"])] + #[arg(verbose = "global", short = 'v', kind = "count-flag", max = 3)] + #[arg(git_dir = "global", env = "GIT_DIR", default = ".git")] + #[arg(paginate = "global", kind = "flag", negatable = true, default = true)] + #[arg(config = "global", short = 'c', repeatable = "repeated")] + fn remote( + &self, + verbose: u32, + git_dir: PathBuf, + paginate: bool, + config: BTreeMap, + ) -> RemoteSubtree; + + /// Show commit logs. + #[command(annotations(read_only = true, idempotent = true))] + #[arg(max_count = "option", short = 'n', bounds = (0, i64::MAX))] + #[arg(since = "option")] + #[arg(until = "option")] + #[arg(author = "option", repeatable = "delimited", delim = ',')] + #[arg(grep = "option", repeatable = "either", delim = ',')] + #[arg(all_match = "flag")] + #[arg(invert_grep = "flag")] + #[arg(oneline = "flag")] + #[arg(graph = "flag")] + #[arg(paths = "tail", separator = "--", min = 0)] + #[constraint(all_or_none = ["all-match", "grep"])] + #[result(formatters = ["oneline", "short", "medium", "full"], default = "medium")] + fn log( + &self, + max_count: Option, + since: Option>, + until: Option>, + author: Vec, + grep: Vec, + all_match: bool, + invert_grep: bool, + oneline: bool, + graph: bool, + paths: Vec, + ) -> Result, LogError>; + } + + /// Placeholder return type for the `remote` subtree dispatcher. + struct RemoteSubtree; + + /// Subcommand subtree under `git remote`. Pure dispatcher. + #[tool_definition] + trait Remote { + /// Add a remote. + #[command(annotations(destructive = false, idempotent = false))] + #[arg(name = "positional", regex = r"^[a-zA-Z][a-zA-Z0-9_-]*$")] + #[arg(url = "positional")] + #[arg(track = "option", short = 't', repeatable = "repeated")] + #[arg(master = "option", short = 'm')] + #[arg(tags = "flag", negatable = true, default = true)] + #[arg(fetch = "flag", short = 'f', default = false)] + // `verbose` repeats the inherited `remote` global; it is de-projected + // from the body when grafted under `git remote`. + #[arg(verbose, kind = "count-flag", max = 3)] + fn add( + &self, + verbose: u32, + name: String, + url: Url, + track: Vec, + master: Option, + tags: bool, + fetch: bool, + ) -> Result<(), RemoteError>; + + /// Remove a remote. + #[command(aliases = ["rm"], annotations(destructive = true, idempotent = true))] + #[arg(name = "positional", regex = r"^[a-zA-Z][a-zA-Z0-9_-]*$")] + fn remove(&self, name: String) -> Result<(), RemoteError>; + + /// Change a remote URL. + #[command(annotations(destructive = true))] + #[arg(name = "positional")] + #[arg(newurl = "positional")] + #[arg(oldurl = "positional", required = false)] + #[arg(push = "flag")] + #[arg(add = "flag")] + #[arg(delete = "flag")] + #[constraint(mutex_groups = [["add"], ["delete"]])] + fn set_url( + &self, + name: String, + newurl: Url, + oldurl: Option, + push: bool, + add: bool, + delete: bool, + ) -> Result<(), SetUrlError>; + } + + struct LeafGit; + + #[tool_implementation] + impl Git for LeafGit { + fn commit( + &self, + _verbose: u32, + _git_dir: PathBuf, + _paginate: bool, + _config: BTreeMap, + _message: String, + _author: Option, + _amend: bool, + _signoff: bool, + _reset_author: bool, + _output: OutputMode, + ) -> Result { + Ok(CommitResult { + hash: String::new(), + files_changed: 0, + insertions: 0, + deletions: 0, + }) + } + + fn remote( + &self, + _verbose: u32, + _git_dir: PathBuf, + _paginate: bool, + _config: BTreeMap, + ) -> RemoteSubtree { + RemoteSubtree + } + + fn log( + &self, + _max_count: Option, + _since: Option>, + _until: Option>, + _author: Vec, + _grep: Vec, + _all_match: bool, + _invert_grep: bool, + _oneline: bool, + _graph: bool, + _paths: Vec, + ) -> Result, LogError> { + Ok(vec![]) + } + } + + fn git_tool() -> ExtendedToolType { + get_extended_tool_by_name("git").expect("git is registered via #[tool_implementation]") + } + + fn child<'a>( + tool: &'a ExtendedToolType, + parent: usize, + name: &str, + ) -> &'a golem_rust::agentic::ExtendedCommandNode { + let idx = tool.commands[parent] + .subcommands + .iter() + .copied() + .find(|&i| tool.commands[i as usize].name == name) + .unwrap_or_else(|| panic!("missing subcommand {name}")) + as usize; + &tool.commands[idx] + } + + fn child_index(tool: &ExtendedToolType, parent: usize, name: &str) -> usize { + tool.commands[parent] + .subcommands + .iter() + .copied() + .find(|&i| tool.commands[i as usize].name == name) + .unwrap_or_else(|| panic!("missing subcommand {name}")) as usize + } + + #[test] + #[test_r::never_capture] + fn git_is_discoverable_with_pure_dispatcher_root() { + let wire = get_tool_by_name("git").expect("get-tool resolves git"); + assert_eq!(wire.commands.nodes[0].name, "git"); + let tool = git_tool(); + let root = &tool.commands[0]; + assert_eq!(root.name, "git"); + // Pure dispatcher: no implicit body. + assert!(root.body.is_none()); + // The subtree-only child `Remote` is grafted, not registered standalone. + assert!(get_extended_tool_by_name("remote").is_none()); + } + + #[test] + #[test_r::never_capture] + fn git_top_level_subcommands_aliases_and_annotations() { + let tool = git_tool(); + let names: Vec<&str> = tool.commands[0] + .subcommands + .iter() + .map(|&i| tool.commands[i as usize].name.as_str()) + .collect(); + assert!(names.contains(&"commit")); + assert!(names.contains(&"remote")); + assert!(names.contains(&"log")); + + let commit = child(&tool, 0, "commit"); + assert_eq!(commit.aliases, vec!["ci".to_string()]); + let commit_ann = commit + .body + .as_ref() + .unwrap() + .annotations + .as_ref() + .expect("commit annotations"); + assert!(commit_ann.destructive); + + let log = child(&tool, 0, "log"); + let log_ann = log + .body + .as_ref() + .unwrap() + .annotations + .as_ref() + .expect("log annotations"); + assert!(log_ann.read_only); + assert!(log_ann.idempotent); + + // The `remote` dispatcher carries an alias but no body (pure dispatcher). + let remote = child(&tool, 0, "remote"); + assert_eq!(remote.aliases, vec!["rmt".to_string()]); + assert!(remote.body.is_none()); + } + + #[test] + #[test_r::never_capture] + fn git_commit_globals_options_constraint_and_formatters() { + let tool = git_tool(); + let commit = child(&tool, 0, "commit"); + + // Globals: count-flag + negatable flag (flags), git-dir + config (options). + let verbose = commit + .globals + .flags + .iter() + .find(|f| f.long == "verbose") + .expect("verbose count-flag global"); + assert_eq!(verbose.short, Some('v')); + assert!( + matches!(verbose.shape, FlagShape::CountFlag(Some(3))), + "verbose is a count-flag capped at 3, got {:?}", + verbose.shape + ); + let paginate = commit + .globals + .flags + .iter() + .find(|f| f.long == "paginate") + .expect("paginate flag global"); + match &paginate.shape { + FlagShape::BoolFlag(b) => { + assert!(b.default, "paginate defaults to true"); + assert!(b.negatable, "paginate is negatable"); + } + other => panic!("expected paginate bool flag, got {other:?}"), + } + let git_dir = commit + .globals + .options + .iter() + .find(|o| o.long == "git-dir") + .expect("git-dir option global"); + assert_eq!(git_dir.env_var.as_deref(), Some("GIT_DIR")); + assert!(git_dir.default.is_some()); + let config = commit + .globals + .options + .iter() + .find(|o| o.long == "config") + .expect("config option global"); + match &config.shape { + ExtendedOptionShape::RepeatableMap(map) => { + assert!(matches!(map.repetition, Repetition::Repeated)); + let root = map + .map_type + .resolve_ref(&map.map_type.root) + .expect("config map node resolves"); + assert!( + matches!(root, SchemaType::Map { .. }), + "config is a Map node" + ); + } + other => panic!("expected repeatable-map config, got {other:?}"), + } + + let body = commit.body.as_ref().unwrap(); + let message = body + .options + .iter() + .find(|o| o.long == "message") + .expect("message option"); + assert_eq!(message.short, Some('m')); + assert!(message.required); + assert_eq!(message.aliases, vec!["msg".to_string()]); + // `output` resolves to an enum node with its default case. + let output = body + .options + .iter() + .find(|o| o.long == "output") + .expect("output option"); + let output_graph = option_collected_graph(&output.shape); + let output_root = output_graph + .resolve_ref(&output_graph.root) + .expect("output enum resolves"); + assert!(matches!(output_root, SchemaType::Enum { .. })); + assert!(output.default.is_some()); + + // implies constraint present. + assert!( + body.constraints + .iter() + .any(|c| matches!(c, ExtendedConstraint::Implies(_))), + "commit has an implies constraint" + ); + // D9: a `value_is(...)` literal is resolved against the referenced + // option's enum schema into a self-contained schema-value-tree. + let value_is = body + .constraints + .iter() + .find_map(|c| match c { + ExtendedConstraint::RequiresAll(refs) => refs.iter().find_map(|r| match r { + ExtendedRef::ValueIs(v) => Some(v), + ExtendedRef::Present(_) => None, + }), + _ => None, + }) + .expect("commit has a value_is constraint"); + assert_eq!(value_is.name, "output"); + assert!( + matches!( + &value_is.value, + ExtendedValueIsLiteral::Resolved(SchemaValue::Enum { case: 2 }) + ), + "value_is(\"output\", \"json\") resolves to the json enum case, got {:?}", + value_is.value + ); + // Result formatters with a default. + let result = body.result.as_ref().expect("commit result"); + let formatter_names: Vec<&str> = + result.formatters.iter().map(|f| f.name.as_str()).collect(); + assert_eq!(formatter_names, vec!["human", "porcelain", "json"]); + assert_eq!(result.default_formatter, "human"); + // Mixed usage / runtime exit codes and error kinds. + let codes: Vec = body.errors.iter().map(|e| e.exit_code).collect(); + assert!(codes.contains(&1)); + assert!(codes.contains(&128)); + assert!(codes.contains(&129)); + assert!( + body.errors.iter().any( + |e| e.name == "nothing-staged" && matches!(e.kind, ErrorKind::RuntimeError) + ), + "nothing-staged is a runtime error" + ); + assert!( + body.errors + .iter() + .any(|e| e.name == "bad-author-format" + && matches!(e.kind, ErrorKind::UsageError)), + "bad-author-format is a usage error" + ); + } + + #[test] + #[test_r::never_capture] + fn git_log_bounds_datetime_repeatable_modes_tail_separator_and_constraint() { + let tool = git_tool(); + let log = child(&tool, 0, "log"); + let body = log.body.as_ref().unwrap(); + + // i64::MAX bound on max-count. + let max_count = body + .options + .iter() + .find(|o| o.long == "max-count") + .expect("max-count"); + match option_collected_graph(&max_count.shape).root { + SchemaType::S64 { restrictions, .. } => { + let r = restrictions.expect("s64 restrictions"); + assert_eq!( + r.max, + Some(golem_rust::schema::schema_type::NumericBound::Signed( + i64::MAX + )) + ); + } + other => panic!("expected S64 max-count, got {other:?}"), + } + + // datetime-typed options. + let since = body + .options + .iter() + .find(|o| o.long == "since") + .expect("since"); + assert!(matches!( + option_collected_graph(&since.shape).root, + SchemaType::Datetime { .. } + )); + + // delimited vs either repeatable modes. + let author = body + .options + .iter() + .find(|o| o.long == "author") + .expect("author"); + match &author.shape { + ExtendedOptionShape::RepeatableList(ExtendedRepeatableListShape { + repetition, + .. + }) => { + assert!(matches!(repetition, Repetition::Delimited(_))); + } + other => panic!("expected delimited repeatable author, got {other:?}"), + } + let grep = body + .options + .iter() + .find(|o| o.long == "grep") + .expect("grep"); + match &grep.shape { + ExtendedOptionShape::RepeatableList(ExtendedRepeatableListShape { + repetition, + .. + }) => { + assert!(matches!(repetition, Repetition::Either(_))); + } + other => panic!("expected either repeatable grep, got {other:?}"), + } + + // tail positional with `--` separator. + let tail = body.positionals.tail.as_ref().expect("paths tail"); + assert_eq!(tail.name, "paths"); + assert_eq!(tail.separator.as_deref(), Some("--")); + + // all-or-none constraint. + assert!( + body.constraints + .iter() + .any(|c| matches!(c, ExtendedConstraint::AllOrNone(_))), + "log has an all-or-none constraint" + ); + } + + #[test] + #[test_r::never_capture] + fn git_remote_subtree_multilevel_globals_and_deprojection() { + let tool = git_tool(); + let remote_idx = child_index(&tool, 0, "remote"); + let remote = &tool.commands[remote_idx]; + + // Globals declared ONCE on the remote dispatcher. + assert!(remote.globals.flags.iter().any(|f| f.long == "verbose")); + assert!(remote.globals.options.iter().any(|o| o.long == "git-dir")); + + // Children: add, rm (alias of remove), set-url. + let sub_names: Vec<&str> = remote + .subcommands + .iter() + .map(|&i| tool.commands[i as usize].name.as_str()) + .collect(); + assert!(sub_names.contains(&"add")); + assert!(sub_names.contains(&"remove")); + assert!(sub_names.contains(&"set-url")); + + // D8: globals are effective at depth (on `add`) though declared once. + let add_idx = child_index(&tool, remote_idx, "add"); + let effective = tool.effective_globals(add_idx); + assert!(effective.iter().any(|g| matches!( + g, + EffectiveCommandField::Flag(f) if f.long == "verbose" + ))); + assert!(effective.iter().any(|g| matches!( + g, + EffectiveCommandField::Option(o) if o.long == "git-dir" + ))); + + // The `add` body re-declares `verbose`; it is de-projected (covered by + // the inherited count-flag global). + let add = &tool.commands[add_idx]; + let add_body = add.body.as_ref().unwrap(); + assert!( + !add_body.flags.iter().any(|f| f.long == "verbose"), + "inherited verbose global must be suppressed from the add body" + ); + + // url-typed positional on add. + let url_pos = add_body + .positionals + .fixed + .iter() + .find(|p| p.name == "url") + .expect("url positional"); + assert!(matches!(url_pos.type_.root, SchemaType::Url { .. })); + + // track repeatable-list option in `repeated` mode (--track a --track b). + match &add_body + .options + .iter() + .find(|o| o.long == "track") + .expect("track") + .shape + { + ExtendedOptionShape::RepeatableList(ExtendedRepeatableListShape { + repetition, + .. + }) => assert!(matches!(repetition, Repetition::Repeated)), + other => panic!("expected repeated repeatable track, got {other:?}"), + } + + // `remove` carries the declared `rm` alias. + let remove = child(&tool, remote_idx, "remove"); + assert_eq!(remove.aliases, vec!["rm".to_string()]); + + // D7 at subtree depth: the exact canonical field order is inherited + // globals (options then flags, in the `remote` dispatcher's declaration + // order), then this body's positionals, then options, then flags. The + // re-declared `verbose` appears once, as the inherited count-flag global. + let add_fields = tool.canonical_input_fields(add_idx); + let names: Vec<&str> = add_fields.iter().map(|f| f.name.as_str()).collect(); + assert_eq!( + names, + vec![ + // inherited globals: options then flags + "git-dir", "config", "verbose", "paginate", // body positionals + "name", "url", // body options + "track", "master", // body flags + "tags", "fetch", + ], + "canonical input field order at subtree depth (D7)" + ); + } + + #[test] + #[test_r::never_capture] + fn git_set_url_optional_trailing_positional_and_mutex() { + let tool = git_tool(); + let remote_idx = child_index(&tool, 0, "remote"); + let set_url = child(&tool, remote_idx, "set-url"); + let body = set_url.body.as_ref().unwrap(); + + let positionals: Vec<(&str, bool)> = body + .positionals + .fixed + .iter() + .map(|p| (p.name.as_str(), p.required)) + .collect(); + assert_eq!( + positionals, + vec![("name", true), ("newurl", true), ("oldurl", false)], + "oldurl is the optional trailing positional" + ); + + assert!( + body.constraints + .iter() + .any(|c| matches!(c, ExtendedConstraint::MutexGroups(_))), + "set-url has a mutex-groups constraint" + ); + } + + #[test] + #[test_r::never_capture] + fn git_builds_valid_wire_metadata() { + git_tool() + .try_to_tool() + .expect("the full git tool is valid wire metadata"); + } + } +} diff --git a/sdks/rust/golem-rust/tests/ui/fail/tool_bad_arg_unknown_param.rs b/sdks/rust/golem-rust/tests/ui/fail/tool_bad_arg_unknown_param.rs new file mode 100644 index 0000000000..02d094be03 --- /dev/null +++ b/sdks/rust/golem-rust/tests/ui/fail/tool_bad_arg_unknown_param.rs @@ -0,0 +1,11 @@ +use golem_rust::tool_definition; + +// A `#[arg(...)]` must bind to a real method parameter. `missing` does not name +// any parameter of `grep`, so this is a build-time error. +#[tool_definition] +trait Grep { + #[arg(missing = "option")] + fn grep(&self, pattern: String) -> Result<(), ()>; +} + +fn main() {} diff --git a/sdks/rust/golem-rust/tests/ui/fail/tool_bad_arg_unknown_param.stderr b/sdks/rust/golem-rust/tests/ui/fail/tool_bad_arg_unknown_param.stderr new file mode 100644 index 0000000000..b242485555 --- /dev/null +++ b/sdks/rust/golem-rust/tests/ui/fail/tool_bad_arg_unknown_param.stderr @@ -0,0 +1,5 @@ +error: #[arg(...)] refers to unknown parameter `missing`; the method has no such parameter + --> tests/ui/fail/tool_bad_arg_unknown_param.rs:7:11 + | +7 | #[arg(missing = "option")] + | ^^^^^^^ diff --git a/sdks/rust/golem-rust/tests/ui/fail/tool_body_name_divergence.rs b/sdks/rust/golem-rust/tests/ui/fail/tool_body_name_divergence.rs new file mode 100644 index 0000000000..dbc3003d8f --- /dev/null +++ b/sdks/rust/golem-rust/tests/ui/fail/tool_body_name_divergence.rs @@ -0,0 +1,12 @@ +use golem_rust::tool_definition; + +// §5.8.1: the implicit-body method (named after the tool) must not rename the +// root command away from the tool name. `grep` is the implicit body of tool +// `grep`, so `#[command(name = "search")]` is a build-time error. +#[tool_definition] +trait Grep { + #[command(name = "search")] + fn grep(&self, pattern: String) -> Result<(), ()>; +} + +fn main() {} diff --git a/sdks/rust/golem-rust/tests/ui/fail/tool_body_name_divergence.stderr b/sdks/rust/golem-rust/tests/ui/fail/tool_body_name_divergence.stderr new file mode 100644 index 0000000000..3d500ffd6d --- /dev/null +++ b/sdks/rust/golem-rust/tests/ui/fail/tool_body_name_divergence.stderr @@ -0,0 +1,5 @@ +error: the implicit-body method's #[command(name = "search")] diverges from the tool name "grep"; the root command name must equal the tool name (§5.8.1) + --> tests/ui/fail/tool_body_name_divergence.rs:9:8 + | +9 | fn grep(&self, pattern: String) -> Result<(), ()>; + | ^^^^ diff --git a/sdks/rust/golem-rust/tests/ui/fail/tool_subtree_invalid_shape.rs b/sdks/rust/golem-rust/tests/ui/fail/tool_subtree_invalid_shape.rs new file mode 100644 index 0000000000..d9e56f339c --- /dev/null +++ b/sdks/rust/golem-rust/tests/ui/fail/tool_subtree_invalid_shape.rs @@ -0,0 +1,14 @@ +use golem_rust::tool_definition; + +// A `#[command(subtree = ...)]` method is a pure dispatcher: the model places a +// result/constraints on a command body, not on a subtree graft. Attaching +// `#[result(...)]` to a subtree method is an invalid subtree descriptor shape +// and a build-time error. +#[tool_definition] +trait Git { + #[command(subtree = Remote)] + #[result(formatters = ["json"], default = "json")] + fn remote(&self) -> RemoteSubtree; +} + +fn main() {} diff --git a/sdks/rust/golem-rust/tests/ui/fail/tool_subtree_invalid_shape.stderr b/sdks/rust/golem-rust/tests/ui/fail/tool_subtree_invalid_shape.stderr new file mode 100644 index 0000000000..d1c8d75e06 --- /dev/null +++ b/sdks/rust/golem-rust/tests/ui/fail/tool_subtree_invalid_shape.stderr @@ -0,0 +1,5 @@ +error: #[constraint] / #[result] are not supported on a #[command(subtree = ...)] method + --> tests/ui/fail/tool_subtree_invalid_shape.rs:11:8 + | +11 | fn remote(&self) -> RemoteSubtree; + | ^^^^^^ diff --git a/sdks/scala/core/js/src/main/scala/golem/host/SchemaWireInterop.scala b/sdks/scala/core/js/src/main/scala/golem/host/SchemaWireInterop.scala index 494dd47c3f..54fc250b48 100644 --- a/sdks/scala/core/js/src/main/scala/golem/host/SchemaWireInterop.scala +++ b/sdks/scala/core/js/src/main/scala/golem/host/SchemaWireInterop.scala @@ -150,6 +150,38 @@ object SchemaWireInterop { // Specs // =========================================================================== + private def numericBoundToJs(b: NumericBound): JsNumericBound = + b match { + case NumericBound.Signed(v) => JsNumericBound.signed(js.BigInt(v.toString)) + case NumericBound.Unsigned(v) => JsNumericBound.unsigned(js.BigInt(U64.fromRawBits(v).toString)) + case NumericBound.FloatBits(v) => JsNumericBound.floatBits(js.BigInt(U64.fromRawBits(v).toString)) + } + + private def numericBoundFromJs(j: JsNumericBound): NumericBound = + j.tag match { + case "signed" => NumericBound.Signed(BigInt(valOf(j).asInstanceOf[js.BigInt].toString).toLong) + case "unsigned" => NumericBound.Unsigned(U64.toRawBits(BigInt(valOf(j).asInstanceOf[js.BigInt].toString))) + case "float-bits" => NumericBound.FloatBits(U64.toRawBits(BigInt(valOf(j).asInstanceOf[js.BigInt].toString))) + case other => throw new IllegalArgumentException(s"Unknown numeric-bound tag: $other") + } + + private def numericRToJs(r: NumericRestrictions): JsNumericRestrictions = + JsNumericRestrictions( + r.min.map(numericBoundToJs).orUndefined, + r.max.map(numericBoundToJs).orUndefined, + r.unit.orUndefined + ) + + private def numericRFromJs(j: JsNumericRestrictions): NumericRestrictions = + NumericRestrictions(j.min.toOption.map(numericBoundFromJs), j.max.toOption.map(numericBoundFromJs), j.unit.toOption) + + private def optNumericVal(o: js.Object): Option[NumericRestrictions] = + o.asInstanceOf[js.Dynamic] + .selectDynamic("val") + .asInstanceOf[js.UndefOr[JsNumericRestrictions]] + .toOption + .map(numericRFromJs) + private def textRToJs(t: TextRestrictions): JsTextRestrictions = JsTextRestrictions( t.languages.map(_.toJSArray).orUndefined, @@ -317,16 +349,16 @@ object SchemaWireInterop { b match { case RefType(i) => JsSchemaTypeBody.refType(i) case BoolType => JsSchemaTypeBody.boolType - case S8Type => JsSchemaTypeBody.s8Type - case S16Type => JsSchemaTypeBody.s16Type - case S32Type => JsSchemaTypeBody.s32Type - case S64Type => JsSchemaTypeBody.s64Type - case U8Type => JsSchemaTypeBody.u8Type - case U16Type => JsSchemaTypeBody.u16Type - case U32Type => JsSchemaTypeBody.u32Type - case U64Type => JsSchemaTypeBody.u64Type - case F32Type => JsSchemaTypeBody.f32Type - case F64Type => JsSchemaTypeBody.f64Type + case S8Type(r) => JsSchemaTypeBody.s8Type(r.map(numericRToJs).orUndefined) + case S16Type(r) => JsSchemaTypeBody.s16Type(r.map(numericRToJs).orUndefined) + case S32Type(r) => JsSchemaTypeBody.s32Type(r.map(numericRToJs).orUndefined) + case S64Type(r) => JsSchemaTypeBody.s64Type(r.map(numericRToJs).orUndefined) + case U8Type(r) => JsSchemaTypeBody.u8Type(r.map(numericRToJs).orUndefined) + case U16Type(r) => JsSchemaTypeBody.u16Type(r.map(numericRToJs).orUndefined) + case U32Type(r) => JsSchemaTypeBody.u32Type(r.map(numericRToJs).orUndefined) + case U64Type(r) => JsSchemaTypeBody.u64Type(r.map(numericRToJs).orUndefined) + case F32Type(r) => JsSchemaTypeBody.f32Type(r.map(numericRToJs).orUndefined) + case F64Type(r) => JsSchemaTypeBody.f64Type(r.map(numericRToJs).orUndefined) case CharType => JsSchemaTypeBody.charType case StringType => JsSchemaTypeBody.stringType case RecordType(fs) => JsSchemaTypeBody.recordType(fs.map(namedFieldToJs).toJSArray) @@ -359,16 +391,16 @@ object SchemaWireInterop { j.tag match { case "ref-type" => RefType(valOf(j).asInstanceOf[Int]) case "bool-type" => BoolType - case "s8-type" => S8Type - case "s16-type" => S16Type - case "s32-type" => S32Type - case "s64-type" => S64Type - case "u8-type" => U8Type - case "u16-type" => U16Type - case "u32-type" => U32Type - case "u64-type" => U64Type - case "f32-type" => F32Type - case "f64-type" => F64Type + case "s8-type" => S8Type(optNumericVal(j)) + case "s16-type" => S16Type(optNumericVal(j)) + case "s32-type" => S32Type(optNumericVal(j)) + case "s64-type" => S64Type(optNumericVal(j)) + case "u8-type" => U8Type(optNumericVal(j)) + case "u16-type" => U16Type(optNumericVal(j)) + case "u32-type" => U32Type(optNumericVal(j)) + case "u64-type" => U64Type(optNumericVal(j)) + case "f32-type" => F32Type(optNumericVal(j)) + case "f64-type" => F64Type(optNumericVal(j)) case "char-type" => CharType case "string-type" => StringType case "record-type" => diff --git a/sdks/scala/core/js/src/main/scala/golem/host/js/schema/SchemaTypes.scala b/sdks/scala/core/js/src/main/scala/golem/host/js/schema/SchemaTypes.scala index 1526a8989e..f11ceeb09e 100644 --- a/sdks/scala/core/js/src/main/scala/golem/host/js/schema/SchemaTypes.scala +++ b/sdks/scala/core/js/src/main/scala/golem/host/js/schema/SchemaTypes.scala @@ -182,6 +182,36 @@ object JsResultSpec { } } +@js.native +sealed trait JsNumericBound extends js.Object { + def tag: String = js.native +} +object JsNumericBound { + def signed(value: js.BigInt): JsNumericBound = JsShape.tagged[JsNumericBound]("signed", value) + def unsigned(value: js.BigInt): JsNumericBound = JsShape.tagged[JsNumericBound]("unsigned", value) + def floatBits(value: js.BigInt): JsNumericBound = JsShape.tagged[JsNumericBound]("float-bits", value) +} + +@js.native +sealed trait JsNumericRestrictions extends js.Object { + def min: js.UndefOr[JsNumericBound] = js.native + def max: js.UndefOr[JsNumericBound] = js.native + def unit: js.UndefOr[String] = js.native +} +object JsNumericRestrictions { + def apply( + min: js.UndefOr[JsNumericBound], + max: js.UndefOr[JsNumericBound], + unit: js.UndefOr[String] + ): JsNumericRestrictions = { + val o = js.Dynamic.literal() + min.foreach(v => o.updateDynamic("min")(v)) + max.foreach(v => o.updateDynamic("max")(v)) + unit.foreach(v => o.updateDynamic("unit")(v)) + o.asInstanceOf[JsNumericRestrictions] + } +} + @js.native sealed trait JsTextRestrictions extends js.Object { def languages: js.UndefOr[js.Array[String]] = js.native @@ -382,17 +412,27 @@ sealed trait JsSchemaTypeBody extends js.Object { object JsSchemaTypeBody { def refType(defIndex: Int): JsSchemaTypeBody = JsShape.tagged[JsSchemaTypeBody]("ref-type", defIndex) - def boolType: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("bool-type") - def s8Type: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("s8-type") - def s16Type: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("s16-type") - def s32Type: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("s32-type") - def s64Type: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("s64-type") - def u8Type: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("u8-type") - def u16Type: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("u16-type") - def u32Type: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("u32-type") - def u64Type: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("u64-type") - def f32Type: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("f32-type") - def f64Type: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("f64-type") + def boolType: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("bool-type") + def s8Type(r: js.UndefOr[JsNumericRestrictions]): JsSchemaTypeBody = + JsShape.taggedOptional[JsSchemaTypeBody]("s8-type", r) + def s16Type(r: js.UndefOr[JsNumericRestrictions]): JsSchemaTypeBody = + JsShape.taggedOptional[JsSchemaTypeBody]("s16-type", r) + def s32Type(r: js.UndefOr[JsNumericRestrictions]): JsSchemaTypeBody = + JsShape.taggedOptional[JsSchemaTypeBody]("s32-type", r) + def s64Type(r: js.UndefOr[JsNumericRestrictions]): JsSchemaTypeBody = + JsShape.taggedOptional[JsSchemaTypeBody]("s64-type", r) + def u8Type(r: js.UndefOr[JsNumericRestrictions]): JsSchemaTypeBody = + JsShape.taggedOptional[JsSchemaTypeBody]("u8-type", r) + def u16Type(r: js.UndefOr[JsNumericRestrictions]): JsSchemaTypeBody = + JsShape.taggedOptional[JsSchemaTypeBody]("u16-type", r) + def u32Type(r: js.UndefOr[JsNumericRestrictions]): JsSchemaTypeBody = + JsShape.taggedOptional[JsSchemaTypeBody]("u32-type", r) + def u64Type(r: js.UndefOr[JsNumericRestrictions]): JsSchemaTypeBody = + JsShape.taggedOptional[JsSchemaTypeBody]("u64-type", r) + def f32Type(r: js.UndefOr[JsNumericRestrictions]): JsSchemaTypeBody = + JsShape.taggedOptional[JsSchemaTypeBody]("f32-type", r) + def f64Type(r: js.UndefOr[JsNumericRestrictions]): JsSchemaTypeBody = + JsShape.taggedOptional[JsSchemaTypeBody]("f64-type", r) def charType: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("char-type") def stringType: JsSchemaTypeBody = JsShape.tagOnly[JsSchemaTypeBody]("string-type") diff --git a/sdks/scala/core/js/src/main/scala/golem/runtime/guest/Guest.scala b/sdks/scala/core/js/src/main/scala/golem/runtime/guest/Guest.scala index d94c82b925..c586d1eeb9 100644 --- a/sdks/scala/core/js/src/main/scala/golem/runtime/guest/Guest.scala +++ b/sdks/scala/core/js/src/main/scala/golem/runtime/guest/Guest.scala @@ -216,7 +216,7 @@ object Guest { js.Dynamic.literal( "discoverTools" -> (() => discoverTools()), "getTool" -> ((name: String) => getTool(name)), - "invoke" -> ( + "invoke" -> ( ( toolName: String, _commandPath: js.Array[String], diff --git a/sdks/scala/core/js/src/test/scala/golem/SchemaVerificationSpec.scala b/sdks/scala/core/js/src/test/scala/golem/SchemaVerificationSpec.scala index cf9f90bd62..6c0a37a27a 100644 --- a/sdks/scala/core/js/src/test/scala/golem/SchemaVerificationSpec.scala +++ b/sdks/scala/core/js/src/test/scala/golem/SchemaVerificationSpec.scala @@ -161,34 +161,34 @@ object SchemaVerificationSpec extends ZIOSpecDefault { assertTrue(inputElementNames("multiParamMethod") == List("name", "age", "active")) }, test("byte method produces s8 schema body") { - assertTrue(firstParamBody("byteMethod") == SchemaTypeBody.S8Type) + assertTrue(firstParamBody("byteMethod") == SchemaTypeBody.S8Type()) }, test("short method produces s16 schema body") { - assertTrue(firstParamBody("shortMethod") == SchemaTypeBody.S16Type) + assertTrue(firstParamBody("shortMethod") == SchemaTypeBody.S16Type()) }, test("int method produces s32 schema body") { - assertTrue(firstParamBody("intMethod") == SchemaTypeBody.S32Type) + assertTrue(firstParamBody("intMethod") == SchemaTypeBody.S32Type()) }, test("long method produces s64 schema body") { - assertTrue(firstParamBody("longMethod") == SchemaTypeBody.S64Type) + assertTrue(firstParamBody("longMethod") == SchemaTypeBody.S64Type()) }, test("float method produces f32 schema body") { - assertTrue(firstParamBody("floatMethod") == SchemaTypeBody.F32Type) + assertTrue(firstParamBody("floatMethod") == SchemaTypeBody.F32Type()) }, test("double method produces f64 schema body") { - assertTrue(firstParamBody("doubleMethod") == SchemaTypeBody.F64Type) + assertTrue(firstParamBody("doubleMethod") == SchemaTypeBody.F64Type()) }, test("ubyte method produces u8 schema body") { - assertTrue(firstParamBody("ubyteMethod") == SchemaTypeBody.U8Type) + assertTrue(firstParamBody("ubyteMethod") == SchemaTypeBody.U8Type()) }, test("ushort method produces u16 schema body") { - assertTrue(firstParamBody("ushortMethod") == SchemaTypeBody.U16Type) + assertTrue(firstParamBody("ushortMethod") == SchemaTypeBody.U16Type()) }, test("uint method produces u32 schema body") { - assertTrue(firstParamBody("uintMethod") == SchemaTypeBody.U32Type) + assertTrue(firstParamBody("uintMethod") == SchemaTypeBody.U32Type()) }, test("ulong method produces u64 schema body") { - assertTrue(firstParamBody("ulongMethod") == SchemaTypeBody.U64Type) + assertTrue(firstParamBody("ulongMethod") == SchemaTypeBody.U64Type()) }, test("string method produces string schema body") { assertTrue(firstParamBody("stringMethod") == SchemaTypeBody.StringType) diff --git a/sdks/scala/core/js/src/test/scala/golem/host/SchemaWireInteropSpec.scala b/sdks/scala/core/js/src/test/scala/golem/host/SchemaWireInteropSpec.scala index d267b085e7..85da2a3f09 100644 --- a/sdks/scala/core/js/src/test/scala/golem/host/SchemaWireInteropSpec.scala +++ b/sdks/scala/core/js/src/test/scala/golem/host/SchemaWireInteropSpec.scala @@ -48,6 +48,12 @@ object SchemaWireInteropSpec extends ZIOSpecDefault { private val textFull = TextRestrictions(Some(List("en", "hu")), Some(1), Some(99), Some("a.*z")) private val textNone = TextRestrictions.empty + private val numericFull = NumericRestrictions( + min = Some(NumericBound.Unsigned(-2L)), + max = Some(NumericBound.Unsigned(-1L)), + unit = Some("bytes") + ) + private val binFull = BinaryRestrictions(Some(List("image/png")), Some(0), Some(1024)) private val binNone = BinaryRestrictions.empty @@ -83,16 +89,16 @@ object SchemaWireInteropSpec extends ZIOSpecDefault { private val typeBodies: Vector[WitSchemaTypeBody] = Vector( RefType(0), BoolType, - S8Type, - S16Type, - S32Type, - S64Type, - U8Type, - U16Type, - U32Type, - U64Type, - F32Type, - F64Type, + S8Type(), + S16Type(), + S32Type(), + S64Type(), + U8Type(), + U16Type(), + U32Type(Some(NumericRestrictions(min = Some(NumericBound.Unsigned(1L)), unit = Some("items")))), + U64Type(Some(numericFull)), + F32Type(Some(NumericRestrictions(max = Some(NumericBound.FloatBits(java.lang.Double.doubleToRawLongBits(1.5d)))))), + F64Type(Some(NumericRestrictions(min = Some(NumericBound.FloatBits(0L)), unit = Some("seconds")))), CharType, StringType, RecordType(Vector(WitNamedFieldType("x", 1, mdFull), WitNamedFieldType("y", 2, md0))), @@ -306,6 +312,20 @@ object SchemaWireInteropSpec extends ZIOSpecDefault { val bytes = pay("bytes").asInstanceOf[Uint8Array] assertTrue(ctorName == "Uint8Array", bytes.length == 3, bytes(0).toInt == 1, bytes(2).toInt == 3) }, + test("raw JS shape: numeric restrictions carry bigint bounds") { + val body = singleTypeBodyJs(U64Type(Some(numericFull))) + val r = valDict(body) + val min = r("min").asInstanceOf[js.Dynamic] + val max = r("max").asInstanceOf[js.Dynamic] + assertTrue( + body.tag == "u64-type", + min.selectDynamic("tag").asInstanceOf[String] == "unsigned", + max.selectDynamic("tag").asInstanceOf[String] == "unsigned", + js.typeOf(min.selectDynamic("val")) == "bigint", + js.typeOf(max.selectDynamic("val")) == "bigint", + r("unit").asInstanceOf[String] == "bytes" + ) + }, test("raw JS shape: s64/u64 carry JS bigint, u32 carries JS number") { val s64 = rawVal(singleValueNodeJs(S64Value(-64L))) val u64 = rawVal(singleValueNodeJs(U64Value(-1L))) diff --git a/sdks/scala/macros/src/test/scala/golem/runtime/macros/AgentMetadataMacroSpec.scala b/sdks/scala/macros/src/test/scala/golem/runtime/macros/AgentMetadataMacroSpec.scala index acc0cdd2af..fcd54b464c 100644 --- a/sdks/scala/macros/src/test/scala/golem/runtime/macros/AgentMetadataMacroSpec.scala +++ b/sdks/scala/macros/src/test/scala/golem/runtime/macros/AgentMetadataMacroSpec.scala @@ -130,7 +130,7 @@ object AgentMetadataMacroSpec extends ZIOSpecDefault { assertTrue( params.map(_.name) == List("left", "right"), rootBody(params.head.graph) == SchemaTypeBody.StringType, - rootBody(params(1).graph) == SchemaTypeBody.S32Type + rootBody(params(1).graph) == SchemaTypeBody.S32Type() ) }, test("Agent metadata captures trait-level mode annotation") { diff --git a/sdks/scala/model/src/main/scala/golem/schema/Derivation.scala b/sdks/scala/model/src/main/scala/golem/schema/Derivation.scala index e128e1ed48..d68ba582db 100644 --- a/sdks/scala/model/src/main/scala/golem/schema/Derivation.scala +++ b/sdks/scala/model/src/main/scala/golem/schema/Derivation.scala @@ -197,10 +197,10 @@ private[golem] object Derivation { private def unsignedBody(reflect: Reflect.Bound[?]): Option[SchemaTypeBody] = { val tid = reflect.typeId - if (TypeId.structurallyEqual(tid, ubyteTypeId)) Some(SchemaTypeBody.U8Type) - else if (TypeId.structurallyEqual(tid, ushortTypeId)) Some(SchemaTypeBody.U16Type) - else if (TypeId.structurallyEqual(tid, uintTypeId)) Some(SchemaTypeBody.U32Type) - else if (TypeId.structurallyEqual(tid, ulongTypeId)) Some(SchemaTypeBody.U64Type) + if (TypeId.structurallyEqual(tid, ubyteTypeId)) Some(SchemaTypeBody.U8Type()) + else if (TypeId.structurallyEqual(tid, ushortTypeId)) Some(SchemaTypeBody.U16Type()) + else if (TypeId.structurallyEqual(tid, uintTypeId)) Some(SchemaTypeBody.U32Type()) + else if (TypeId.structurallyEqual(tid, ulongTypeId)) Some(SchemaTypeBody.U64Type()) else None } diff --git a/sdks/scala/model/src/main/scala/golem/schema/SchemaType.scala b/sdks/scala/model/src/main/scala/golem/schema/SchemaType.scala index b262e6a9c4..52d608373c 100644 --- a/sdks/scala/model/src/main/scala/golem/schema/SchemaType.scala +++ b/sdks/scala/model/src/main/scala/golem/schema/SchemaType.scala @@ -59,19 +59,19 @@ object SchemaTypeBody { final case class RefType(id: String) extends SchemaTypeBody // Primitives - case object BoolType extends SchemaTypeBody - case object S8Type extends SchemaTypeBody - case object S16Type extends SchemaTypeBody - case object S32Type extends SchemaTypeBody - case object S64Type extends SchemaTypeBody - case object U8Type extends SchemaTypeBody - case object U16Type extends SchemaTypeBody - case object U32Type extends SchemaTypeBody - case object U64Type extends SchemaTypeBody - case object F32Type extends SchemaTypeBody - case object F64Type extends SchemaTypeBody - case object CharType extends SchemaTypeBody - case object StringType extends SchemaTypeBody + case object BoolType extends SchemaTypeBody + final case class S8Type(restrictions: Option[NumericRestrictions] = None) extends SchemaTypeBody + final case class S16Type(restrictions: Option[NumericRestrictions] = None) extends SchemaTypeBody + final case class S32Type(restrictions: Option[NumericRestrictions] = None) extends SchemaTypeBody + final case class S64Type(restrictions: Option[NumericRestrictions] = None) extends SchemaTypeBody + final case class U8Type(restrictions: Option[NumericRestrictions] = None) extends SchemaTypeBody + final case class U16Type(restrictions: Option[NumericRestrictions] = None) extends SchemaTypeBody + final case class U32Type(restrictions: Option[NumericRestrictions] = None) extends SchemaTypeBody + final case class U64Type(restrictions: Option[NumericRestrictions] = None) extends SchemaTypeBody + final case class F32Type(restrictions: Option[NumericRestrictions] = None) extends SchemaTypeBody + final case class F64Type(restrictions: Option[NumericRestrictions] = None) extends SchemaTypeBody + case object CharType extends SchemaTypeBody + case object StringType extends SchemaTypeBody // Structural composites final case class RecordType(fields: List[NamedFieldType]) extends SchemaTypeBody @@ -115,20 +115,30 @@ object t { private def st(body: SchemaTypeBody): SchemaType = SchemaType(body) - def ref(id: String): SchemaType = st(RefType(id)) - def bool: SchemaType = st(BoolType) - def s8: SchemaType = st(S8Type) - def s16: SchemaType = st(S16Type) - def s32: SchemaType = st(S32Type) - def s64: SchemaType = st(S64Type) - def u8: SchemaType = st(U8Type) - def u16: SchemaType = st(U16Type) - def u32: SchemaType = st(U32Type) - def u64: SchemaType = st(U64Type) - def f32: SchemaType = st(F32Type) - def f64: SchemaType = st(F64Type) - def char: SchemaType = st(CharType) - def string: SchemaType = st(StringType) + def ref(id: String): SchemaType = st(RefType(id)) + def bool: SchemaType = st(BoolType) + def s8: SchemaType = s8(None) + def s8(restrictions: Option[NumericRestrictions]): SchemaType = st(S8Type(restrictions.flatMap(_.normalize))) + def s16: SchemaType = s16(None) + def s16(restrictions: Option[NumericRestrictions]): SchemaType = st(S16Type(restrictions.flatMap(_.normalize))) + def s32: SchemaType = s32(None) + def s32(restrictions: Option[NumericRestrictions]): SchemaType = st(S32Type(restrictions.flatMap(_.normalize))) + def s64: SchemaType = s64(None) + def s64(restrictions: Option[NumericRestrictions]): SchemaType = st(S64Type(restrictions.flatMap(_.normalize))) + def u8: SchemaType = u8(None) + def u8(restrictions: Option[NumericRestrictions]): SchemaType = st(U8Type(restrictions.flatMap(_.normalize))) + def u16: SchemaType = u16(None) + def u16(restrictions: Option[NumericRestrictions]): SchemaType = st(U16Type(restrictions.flatMap(_.normalize))) + def u32: SchemaType = u32(None) + def u32(restrictions: Option[NumericRestrictions]): SchemaType = st(U32Type(restrictions.flatMap(_.normalize))) + def u64: SchemaType = u64(None) + def u64(restrictions: Option[NumericRestrictions]): SchemaType = st(U64Type(restrictions.flatMap(_.normalize))) + def f32: SchemaType = f32(None) + def f32(restrictions: Option[NumericRestrictions]): SchemaType = st(F32Type(restrictions.flatMap(_.normalize))) + def f64: SchemaType = f64(None) + def f64(restrictions: Option[NumericRestrictions]): SchemaType = st(F64Type(restrictions.flatMap(_.normalize))) + def char: SchemaType = st(CharType) + def string: SchemaType = st(StringType) def record(fields: List[NamedFieldType]): SchemaType = st(RecordType(fields)) def variant(cases: List[VariantCaseType]): SchemaType = st(VariantType(cases)) diff --git a/sdks/scala/model/src/main/scala/golem/schema/Specs.scala b/sdks/scala/model/src/main/scala/golem/schema/Specs.scala index 23195d166a..f81e26f8b5 100644 --- a/sdks/scala/model/src/main/scala/golem/schema/Specs.scala +++ b/sdks/scala/model/src/main/scala/golem/schema/Specs.scala @@ -43,6 +43,39 @@ object TextRestrictions { val empty: TextRestrictions = TextRestrictions() } +sealed trait NumericBound extends Product with Serializable +object NumericBound { + final case class Signed(value: Long) extends NumericBound + final case class Unsigned(value: Long) extends NumericBound + final case class FloatBits(value: Long) extends NumericBound +} + +final case class NumericRestrictions( + min: Option[NumericBound] = None, + max: Option[NumericBound] = None, + unit: Option[String] = None +) { + def normalize: Option[NumericRestrictions] = { + val normalized = copy( + min = min.map(NumericRestrictions.canonicalizeBound), + max = max.map(NumericRestrictions.canonicalizeBound), + unit = unit.filter(_.nonEmpty) + ) + if (normalized.min.isEmpty && normalized.max.isEmpty && normalized.unit.isEmpty) None else Some(normalized) + } +} + +object NumericRestrictions { + val empty: NumericRestrictions = NumericRestrictions() + + private def canonicalizeBound(bound: NumericBound): NumericBound = + bound match { + case NumericBound.FloatBits(bits) if java.lang.Double.longBitsToDouble(bits) == 0.0d => + NumericBound.FloatBits(0L) + case other => other + } +} + final case class BinaryRestrictions( mimeTypes: Option[List[String]] = None, minBytes: Option[Int] = None, diff --git a/sdks/scala/model/src/main/scala/golem/schema/wire/Wire.scala b/sdks/scala/model/src/main/scala/golem/schema/wire/Wire.scala index 47c911d40a..4056f72664 100644 --- a/sdks/scala/model/src/main/scala/golem/schema/wire/Wire.scala +++ b/sdks/scala/model/src/main/scala/golem/schema/wire/Wire.scala @@ -60,19 +60,19 @@ sealed trait WitSchemaTypeBody extends Product with Serializable object WitSchemaTypeBody { final case class RefType(defIndex: Int) extends WitSchemaTypeBody - case object BoolType extends WitSchemaTypeBody - case object S8Type extends WitSchemaTypeBody - case object S16Type extends WitSchemaTypeBody - case object S32Type extends WitSchemaTypeBody - case object S64Type extends WitSchemaTypeBody - case object U8Type extends WitSchemaTypeBody - case object U16Type extends WitSchemaTypeBody - case object U32Type extends WitSchemaTypeBody - case object U64Type extends WitSchemaTypeBody - case object F32Type extends WitSchemaTypeBody - case object F64Type extends WitSchemaTypeBody - case object CharType extends WitSchemaTypeBody - case object StringType extends WitSchemaTypeBody + case object BoolType extends WitSchemaTypeBody + final case class S8Type(restrictions: Option[NumericRestrictions] = None) extends WitSchemaTypeBody + final case class S16Type(restrictions: Option[NumericRestrictions] = None) extends WitSchemaTypeBody + final case class S32Type(restrictions: Option[NumericRestrictions] = None) extends WitSchemaTypeBody + final case class S64Type(restrictions: Option[NumericRestrictions] = None) extends WitSchemaTypeBody + final case class U8Type(restrictions: Option[NumericRestrictions] = None) extends WitSchemaTypeBody + final case class U16Type(restrictions: Option[NumericRestrictions] = None) extends WitSchemaTypeBody + final case class U32Type(restrictions: Option[NumericRestrictions] = None) extends WitSchemaTypeBody + final case class U64Type(restrictions: Option[NumericRestrictions] = None) extends WitSchemaTypeBody + final case class F32Type(restrictions: Option[NumericRestrictions] = None) extends WitSchemaTypeBody + final case class F64Type(restrictions: Option[NumericRestrictions] = None) extends WitSchemaTypeBody + case object CharType extends WitSchemaTypeBody + case object StringType extends WitSchemaTypeBody final case class RecordType(fields: Vector[WitNamedFieldType]) extends WitSchemaTypeBody final case class VariantType(cases: Vector[WitVariantCaseType]) extends WitSchemaTypeBody diff --git a/sdks/scala/model/src/main/scala/golem/schema/wire/WireCodec.scala b/sdks/scala/model/src/main/scala/golem/schema/wire/WireCodec.scala index df62700b2d..47824cb0dd 100644 --- a/sdks/scala/model/src/main/scala/golem/schema/wire/WireCodec.scala +++ b/sdks/scala/model/src/main/scala/golem/schema/wire/WireCodec.scala @@ -28,6 +28,11 @@ import scala.collection.mutable // Unflattening walks indices back into the recursive form, guarding against // out-of-range and cyclic indices. Mirrors the TS SDK's `wit.ts`. +private object NumericRestrictionCodec { + def normalize(restrictions: Option[NumericRestrictions]): Option[NumericRestrictions] = + restrictions.flatMap(_.normalize) +} + /** * Incremental encoder for a single flat [[WitSchemaGraph]] holding several * independent root types in one shared `typeNodes` pool. Mirrors the Rust @@ -73,16 +78,16 @@ final class GraphEncoder(defs: ListMap[String, SchemaTypeDef]) { case None => throw SchemaEncodeError(s"schema graph references unknown type id '$id'") } case BoolType => W.BoolType - case S8Type => W.S8Type - case S16Type => W.S16Type - case S32Type => W.S32Type - case S64Type => W.S64Type - case U8Type => W.U8Type - case U16Type => W.U16Type - case U32Type => W.U32Type - case U64Type => W.U64Type - case F32Type => W.F32Type - case F64Type => W.F64Type + case S8Type(r) => W.S8Type(NumericRestrictionCodec.normalize(r)) + case S16Type(r) => W.S16Type(NumericRestrictionCodec.normalize(r)) + case S32Type(r) => W.S32Type(NumericRestrictionCodec.normalize(r)) + case S64Type(r) => W.S64Type(NumericRestrictionCodec.normalize(r)) + case U8Type(r) => W.U8Type(NumericRestrictionCodec.normalize(r)) + case U16Type(r) => W.U16Type(NumericRestrictionCodec.normalize(r)) + case U32Type(r) => W.U32Type(NumericRestrictionCodec.normalize(r)) + case U64Type(r) => W.U64Type(NumericRestrictionCodec.normalize(r)) + case F32Type(r) => W.F32Type(NumericRestrictionCodec.normalize(r)) + case F64Type(r) => W.F64Type(NumericRestrictionCodec.normalize(r)) case CharType => W.CharType case StringType => W.StringType case RecordType(fields) => @@ -168,16 +173,16 @@ object SchemaWire { body match { case WitSchemaTypeBody.RefType(di) => S.RefType(idByDefIndex(di)) case WitSchemaTypeBody.BoolType => S.BoolType - case WitSchemaTypeBody.S8Type => S.S8Type - case WitSchemaTypeBody.S16Type => S.S16Type - case WitSchemaTypeBody.S32Type => S.S32Type - case WitSchemaTypeBody.S64Type => S.S64Type - case WitSchemaTypeBody.U8Type => S.U8Type - case WitSchemaTypeBody.U16Type => S.U16Type - case WitSchemaTypeBody.U32Type => S.U32Type - case WitSchemaTypeBody.U64Type => S.U64Type - case WitSchemaTypeBody.F32Type => S.F32Type - case WitSchemaTypeBody.F64Type => S.F64Type + case WitSchemaTypeBody.S8Type(r) => S.S8Type(NumericRestrictionCodec.normalize(r)) + case WitSchemaTypeBody.S16Type(r) => S.S16Type(NumericRestrictionCodec.normalize(r)) + case WitSchemaTypeBody.S32Type(r) => S.S32Type(NumericRestrictionCodec.normalize(r)) + case WitSchemaTypeBody.S64Type(r) => S.S64Type(NumericRestrictionCodec.normalize(r)) + case WitSchemaTypeBody.U8Type(r) => S.U8Type(NumericRestrictionCodec.normalize(r)) + case WitSchemaTypeBody.U16Type(r) => S.U16Type(NumericRestrictionCodec.normalize(r)) + case WitSchemaTypeBody.U32Type(r) => S.U32Type(NumericRestrictionCodec.normalize(r)) + case WitSchemaTypeBody.U64Type(r) => S.U64Type(NumericRestrictionCodec.normalize(r)) + case WitSchemaTypeBody.F32Type(r) => S.F32Type(NumericRestrictionCodec.normalize(r)) + case WitSchemaTypeBody.F64Type(r) => S.F64Type(NumericRestrictionCodec.normalize(r)) case WitSchemaTypeBody.CharType => S.CharType case WitSchemaTypeBody.StringType => S.StringType case WitSchemaTypeBody.RecordType(fields) => diff --git a/sdks/scala/model/src/test/scala/golem/schema/SchemaDerivationSpec.scala b/sdks/scala/model/src/test/scala/golem/schema/SchemaDerivationSpec.scala index c433f94992..7e2aea351c 100644 --- a/sdks/scala/model/src/test/scala/golem/schema/SchemaDerivationSpec.scala +++ b/sdks/scala/model/src/test/scala/golem/schema/SchemaDerivationSpec.scala @@ -128,12 +128,12 @@ object SchemaDerivationSpec extends ZIOSpecDefault { assertTrue( fields("b") == BoolType, - fields("i8") == S8Type, - fields("i16") == S16Type, - fields("i32") == S32Type, - fields("i64") == S64Type, - fields("f") == F32Type, - fields("d") == F64Type, + fields("i8") == S8Type(), + fields("i16") == S16Type(), + fields("i32") == S32Type(), + fields("i64") == S64Type(), + fields("f") == F32Type(), + fields("d") == F64Type(), fields("c") == CharType, fields("s") == StringType, fields("bd") == StringType, @@ -286,10 +286,10 @@ object SchemaDerivationSpec extends ZIOSpecDefault { }, test("unsigned wrappers derive u8/u16/u32/u64 and round-trip (incl. boundary)") { assertTrue( - rootBody[UByte] == U8Type, - rootBody[UShort] == U16Type, - rootBody[UInt] == U32Type, - rootBody[ULong] == U64Type + rootBody[UByte] == U8Type(), + rootBody[UShort] == U16Type(), + rootBody[UInt] == U32Type(), + rootBody[ULong] == U64Type() ) && assert(roundTrip(UByte(255)))(isRight(equalTo(UByte(255)))) && assert(roundTrip(UShort(65535)))(isRight(equalTo(UShort(65535)))) && diff --git a/sdks/scala/model/src/test/scala/golem/schema/SchemaModelSpec.scala b/sdks/scala/model/src/test/scala/golem/schema/SchemaModelSpec.scala index 7bff5c54f7..8315cd948d 100644 --- a/sdks/scala/model/src/test/scala/golem/schema/SchemaModelSpec.scala +++ b/sdks/scala/model/src/test/scala/golem/schema/SchemaModelSpec.scala @@ -247,6 +247,74 @@ object SchemaModelSpec extends ZIOSpecDefault { val rootBody = wit.typeNodes(wit.root).body // "a.point" sorts before "z.point", so its def index is 0. assertTrue(rootBody == WitSchemaTypeBody.RefType(0)) + }, + test("numeric restrictions golden vectors round-trip and normalize") { + import NumericBound._ + import SchemaTypeBody._ + + def u(v: Long) = Unsigned(v) + def s(v: Long) = Signed(v) + def f(v: Double) = FloatBits(java.lang.Double.doubleToRawLongBits(v)) + def r(min: Option[NumericBound] = None, max: Option[NumericBound] = None, unit: Option[String] = None) = + NumericRestrictions(min, max, unit).normalize + def roundTrip(body: SchemaTypeBody): SchemaTypeBody = + SchemaWire + .schemaGraphFromWit(SchemaWire.schemaGraphToWit(SchemaGraph(ListMap.empty, SchemaType(body)))) + .root + .body + + val cases = List( + U32Type(None), + U32Type(r(min = Some(u(1L)))), + U32Type(r(min = Some(u(1L)), unit = Some("items"))), + U32Type(r(min = Some(u(0L)), max = Some(u(100L)))), + U32Type(r(min = Some(u(0L)), max = Some(u(100L)), unit = Some("percent"))), + S64Type(r(min = Some(s(0L)), max = Some(s(Long.MaxValue)))), + S64Type(r(min = Some(s(0L)), max = Some(s(Long.MaxValue)), unit = Some("ns"))), + U64Type(r(min = Some(u(-2L)), max = Some(u(-1L)))), + U64Type(r(min = Some(u(-2L)), max = Some(u(-1L)), unit = Some("bytes"))), + F64Type(r(min = Some(f(0.0d)))), + F64Type(r(min = Some(f(0.0d)), unit = Some("seconds"))), + S8Type(r(min = Some(s(-1L)), max = Some(s(1L)))), + F32Type(r(max = Some(f(1.5d)))) + ) + + assertTrue(cases.forall(body => roundTrip(body) == body)) + }, + test("numeric restrictions canonicalization drops empty values and negative zero") { + import NumericBound._ + import SchemaTypeBody._ + + val negZero = java.lang.Double.doubleToRawLongBits(-0.0d) + val emptyWire = WitSchemaGraph( + Vector( + WitSchemaTypeNode(WitSchemaTypeBody.U32Type(Some(NumericRestrictions.empty)), MetadataEnvelope.empty) + ), + Vector.empty, + 0 + ) + val emptyUnit = NumericRestrictions(unit = Some("")) + val boundEmptyUnit = NumericRestrictions(min = Some(Unsigned(1L)), unit = Some("")) + val negZeroWire = WitSchemaGraph( + Vector( + WitSchemaTypeNode( + WitSchemaTypeBody.F64Type(Some(NumericRestrictions(min = Some(FloatBits(negZero))))), + MetadataEnvelope.empty + ) + ), + Vector.empty, + 0 + ) + + assertTrue( + NumericRestrictions.empty.normalize.isEmpty, + emptyUnit.normalize.isEmpty, + boundEmptyUnit.normalize.contains(NumericRestrictions(min = Some(Unsigned(1L)))), + SchemaWire.schemaGraphFromWit(emptyWire).root.body == U32Type(None), + SchemaWire.schemaGraphFromWit(negZeroWire).root.body == F64Type( + Some(NumericRestrictions(min = Some(FloatBits(0L)))) + ) + ) } ), suite("value tree wire roundtrip")( diff --git a/sdks/scala/wit/dts/golem_core_2_0_0_types.d.ts b/sdks/scala/wit/dts/golem_core_2_0_0_types.d.ts index 6f4775abec..a3547a3113 100644 --- a/sdks/scala/wit/dts/golem_core_2_0_0_types.d.ts +++ b/sdks/scala/wit/dts/golem_core_2_0_0_types.d.ts @@ -179,6 +179,36 @@ declare module 'golem:core/types@2.0.0' { ok?: TypeNodeIndex; err?: TypeNodeIndex; }; + /** + * --- Numeric restrictions --- + * A numeric bound usable across every numeric representation. Float bounds + * carry canonical IEEE-754 `f64` bits (NaN/inf rejected, -0.0 normalized); + * comparisons decode the bits to `f64` and compare numerically. + */ + export type NumericBound = + { + tag: 'signed' + val: bigint + } | + { + tag: 'unsigned' + val: bigint + } | + { + tag: 'float-bits' + val: bigint + }; + /** + * Inline numeric refinement. `none` on a numeric type means unconstrained + * (the common case). The empty restriction set is never encoded as `some`: + * producers normalize it to `none`, decoders normalize a decoded empty to + * `none`. `unit` is schema/help metadata only. + */ + export type NumericRestrictions = { + min?: NumericBound; + max?: NumericBound; + unit?: string; + }; /** * --- Text / Binary restrictions --- */ @@ -356,33 +386,43 @@ declare module 'golem:core/types@2.0.0' { } | { tag: 's8-type' + val: NumericRestrictions | undefined } | { tag: 's16-type' + val: NumericRestrictions | undefined } | { tag: 's32-type' + val: NumericRestrictions | undefined } | { tag: 's64-type' + val: NumericRestrictions | undefined } | { tag: 'u8-type' + val: NumericRestrictions | undefined } | { tag: 'u16-type' + val: NumericRestrictions | undefined } | { tag: 'u32-type' + val: NumericRestrictions | undefined } | { tag: 'u64-type' + val: NumericRestrictions | undefined } | { tag: 'f32-type' + val: NumericRestrictions | undefined } | { tag: 'f64-type' + val: NumericRestrictions | undefined } | { tag: 'char-type' diff --git a/sdks/scala/wit/dts/golem_tool_0_1_0_common.d.ts b/sdks/scala/wit/dts/golem_tool_0_1_0_common.d.ts index 4869873990..1912d27717 100644 --- a/sdks/scala/wit/dts/golem_tool_0_1_0_common.d.ts +++ b/sdks/scala/wit/dts/golem_tool_0_1_0_common.d.ts @@ -50,11 +50,15 @@ * no items, is valid). * • A `positional` / `option` / `result` / `error` `type-node-index` * resolves to a node in `tool.schema`. - * • A `repeatable` option's `default`, if present, is a list whose - * elements are values of the `repeatable-shape.%type` node. - * • A `value-is` ref naming a repeatable option, tail positional, or - * otherwise list-shaped target means "any occurrence / element - * equals this literal"; the literal is a value of the element type. + * • A `repeatable-list` option's `default`, if present, is a `list` + * whose elements are values of the `repeatable-list-shape.item-type` + * node. A `repeatable-map` option's `default`, if present, is a `map` + * value of the `repeatable-map-shape.map-type` node. + * • A `value-is` ref naming a `repeatable-list` option, tail positional, + * or otherwise list-shaped target means "any occurrence / element + * equals this literal"; the literal is a value of the element type. For + * a `repeatable-map` option the literal is a value of the map's value + * type (any entry's value equals this literal). * • The tool's identity is its root command name * (`commands.nodes[0].name`); `get-tool(name)` and * `guest.invoke(tool-name, …)` match against it. `commands.nodes` @@ -98,6 +102,10 @@ declare module 'golem:tool/common@0.1.0' { */ openWorld: boolean; }; + /** + * Resolution policy for a repeated key in a `repeatable-map` option. + */ + export type DuplicateKeyPolicy = "reject" | "last-wins"; export type Repetition = /** --inc a --inc b */ { @@ -113,10 +121,20 @@ declare module 'golem:tool/common@0.1.0' { tag: 'either' val: string }; - export type RepeatableShape = { + export type RepeatableListShape = { repetition: Repetition; - /** Index into `tool.schema`. */ - type: TypeNodeIndex; + /** Index into `tool.schema`; the element type of the collected `list`. */ + itemType: TypeNodeIndex; + }; + export type RepeatableMapShape = { + repetition: Repetition; + /** + * Index into `tool.schema`; a `golem:core` `map` (key + value) node. The + * collected value is this map. + */ + mapType: TypeNodeIndex; + /** What happens when the same key is supplied more than once. */ + duplicateKeyPolicy: DuplicateKeyPolicy; }; export type OptionShape = /** Required value: --opt VALUE or --opt=VALUE. Index into `tool.schema`. */ @@ -133,10 +151,21 @@ declare module 'golem:tool/common@0.1.0' { tag: 'optional-scalar' val: TypeNodeIndex } | - /** Repeatable; value type in the derived signature is list-of-scalar. */ + /** + * Repeatable scalar option (`-e a -e b`); the collected value is a + * `list` of the element type. + */ + { + tag: 'repeatable-list' + val: RepeatableListShape + } | + /** + * Repeatable key-value option (`-c a=1 -c b=2`); the collected value is a + * `golem:core` `map` node, never a `list`. + */ { - tag: 'repeatable' - val: RepeatableShape + tag: 'repeatable-map' + val: RepeatableMapShape }; export type BoolFlagShape = { default_: boolean; @@ -235,6 +264,11 @@ declare module 'golem:tool/common@0.1.0' { /** Default value, interpreted against `%type` in `tool.schema`. */ default_?: SchemaValueTree; required: boolean; + /** + * If true, the positional's value may be read from standard input + * (e.g. grep's trailing `files` accepting piped input). + */ + acceptsStdio: boolean; }; export type TailPositional = { name: string; @@ -251,6 +285,11 @@ declare module 'golem:tool/common@0.1.0' { * `kubectl exec -- CMD ARGS...`). */ verbatim: boolean; + /** + * If true, the tail items may be read from standard input + * (e.g. grep's trailing `files` accepting piped input). + */ + acceptsStdio: boolean; }; /** * Positionals (variadic only at the tail, structurally) diff --git a/sdks/ts/packages/golem-ts-sdk/src/internal/schema-model/model.ts b/sdks/ts/packages/golem-ts-sdk/src/internal/schema-model/model.ts index 482151c7d5..4362f0efbc 100644 --- a/sdks/ts/packages/golem-ts-sdk/src/internal/schema-model/model.ts +++ b/sdks/ts/packages/golem-ts-sdk/src/internal/schema-model/model.ts @@ -28,6 +28,7 @@ import type { TypeId, MetadataEnvelope, + NumericRestrictions, TextRestrictions, BinaryRestrictions, PathSpec, @@ -46,6 +47,7 @@ import { GuestQuotaTokenHandle } from './quotaTokenHandle'; export type { TypeId, MetadataEnvelope, + NumericRestrictions, TextRestrictions, BinaryRestrictions, PathSpec, @@ -63,7 +65,13 @@ export type { // These are part of the schema-model public surface but are only ever re-exported // (never referenced in a local declaration), so re-export them directly to avoid // an "unused external import" bundling warning. -export type { Role, PathDirection, PathKind, FieldDiscriminator } from 'golem:core/types@2.0.0'; +export type { + NumericBound, + Role, + PathDirection, + PathKind, + FieldDiscriminator, +} from 'golem:core/types@2.0.0'; // ============================================================ // Schema type (recursive) @@ -80,16 +88,16 @@ export type SchemaTypeBody = | { tag: 'ref'; id: TypeId } // Primitives | { tag: 'bool' } - | { tag: 's8' } - | { tag: 's16' } - | { tag: 's32' } - | { tag: 's64' } - | { tag: 'u8' } - | { tag: 'u16' } - | { tag: 'u32' } - | { tag: 'u64' } - | { tag: 'f32' } - | { tag: 'f64' } + | { tag: 's8'; restrictions?: NumericRestrictions } + | { tag: 's16'; restrictions?: NumericRestrictions } + | { tag: 's32'; restrictions?: NumericRestrictions } + | { tag: 's64'; restrictions?: NumericRestrictions } + | { tag: 'u8'; restrictions?: NumericRestrictions } + | { tag: 'u16'; restrictions?: NumericRestrictions } + | { tag: 'u32'; restrictions?: NumericRestrictions } + | { tag: 'u64'; restrictions?: NumericRestrictions } + | { tag: 'f32'; restrictions?: NumericRestrictions } + | { tag: 'f64'; restrictions?: NumericRestrictions } | { tag: 'char' } | { tag: 'string' } // Structural composites @@ -241,16 +249,16 @@ export function schemaType( export const t = { ref: (id: TypeId): SchemaType => schemaType({ tag: 'ref', id }), bool: (): SchemaType => schemaType({ tag: 'bool' }), - s8: (): SchemaType => schemaType({ tag: 's8' }), - s16: (): SchemaType => schemaType({ tag: 's16' }), - s32: (): SchemaType => schemaType({ tag: 's32' }), - s64: (): SchemaType => schemaType({ tag: 's64' }), - u8: (): SchemaType => schemaType({ tag: 'u8' }), - u16: (): SchemaType => schemaType({ tag: 'u16' }), - u32: (): SchemaType => schemaType({ tag: 'u32' }), - u64: (): SchemaType => schemaType({ tag: 'u64' }), - f32: (): SchemaType => schemaType({ tag: 'f32' }), - f64: (): SchemaType => schemaType({ tag: 'f64' }), + s8: (restrictions?: NumericRestrictions): SchemaType => schemaType({ tag: 's8', restrictions }), + s16: (restrictions?: NumericRestrictions): SchemaType => schemaType({ tag: 's16', restrictions }), + s32: (restrictions?: NumericRestrictions): SchemaType => schemaType({ tag: 's32', restrictions }), + s64: (restrictions?: NumericRestrictions): SchemaType => schemaType({ tag: 's64', restrictions }), + u8: (restrictions?: NumericRestrictions): SchemaType => schemaType({ tag: 'u8', restrictions }), + u16: (restrictions?: NumericRestrictions): SchemaType => schemaType({ tag: 'u16', restrictions }), + u32: (restrictions?: NumericRestrictions): SchemaType => schemaType({ tag: 'u32', restrictions }), + u64: (restrictions?: NumericRestrictions): SchemaType => schemaType({ tag: 'u64', restrictions }), + f32: (restrictions?: NumericRestrictions): SchemaType => schemaType({ tag: 'f32', restrictions }), + f64: (restrictions?: NumericRestrictions): SchemaType => schemaType({ tag: 'f64', restrictions }), char: (): SchemaType => schemaType({ tag: 'char' }), string: (): SchemaType => schemaType({ tag: 'string' }), record: (fields: NamedFieldType[]): SchemaType => schemaType({ tag: 'record', fields }), diff --git a/sdks/ts/packages/golem-ts-sdk/src/internal/schema-model/wit.ts b/sdks/ts/packages/golem-ts-sdk/src/internal/schema-model/wit.ts index eea9d742b8..c0836f2f5b 100644 --- a/sdks/ts/packages/golem-ts-sdk/src/internal/schema-model/wit.ts +++ b/sdks/ts/packages/golem-ts-sdk/src/internal/schema-model/wit.ts @@ -42,6 +42,8 @@ import { type SchemaValue, type TypedSchemaValue, type TypeId, + type NumericRestrictions, + type NumericBound, emptyMetadata, } from './model'; import { GuestQuotaTokenHandle } from './quotaTokenHandle'; @@ -52,6 +54,54 @@ import { SchemaDecodeError, SchemaEncodeError } from './errors'; // Schema type / graph // ============================================================ +// Numeric `SchemaType` variants (`s8`..`f64`) carry an inline +// `option`. The model type and the WIT carrier are the +// same generated `NumericRestrictions` shape, so the codec normalizes in both +// directions to mirror the Rust `NumericRestrictions::normalize` invariants: an +// empty restriction set (no bounds, empty/absent unit) collapses to `undefined` +// (`none`), an empty `unit` is dropped, and a float bound of `-0.0` is +// canonicalized to `+0.0` bits so equal restrictions compare equal. + +const NUMERIC_BOUND_BITS_VIEW = new DataView(new ArrayBuffer(8)); + +/** Canonicalize a numeric bound: collapse `-0.0` float bits to `+0.0` bits. */ +function canonicalizeNumericBound(bound: NumericBound): NumericBound { + if (bound.tag === 'float-bits') { + NUMERIC_BOUND_BITS_VIEW.setBigUint64(0, BigInt.asUintN(64, bound.val), true); + if (NUMERIC_BOUND_BITS_VIEW.getFloat64(0, true) === 0) { + return { tag: 'float-bits', val: 0n }; + } + } + return bound; +} + +/** + * Normalize an `option` carrier, returning `undefined` + * (WIT `none`) for the empty restriction set. Used for both encode (model → + * WIT) and decode (WIT → model) since the two shapes are identical. + */ +function normalizeNumericRestrictions( + restrictions: NumericRestrictions | undefined, +): NumericRestrictions | undefined { + if (restrictions === undefined) { + return undefined; + } + const out: NumericRestrictions = {}; + if (restrictions.min !== undefined) { + out.min = canonicalizeNumericBound(restrictions.min); + } + if (restrictions.max !== undefined) { + out.max = canonicalizeNumericBound(restrictions.max); + } + if (restrictions.unit !== undefined && restrictions.unit !== '') { + out.unit = restrictions.unit; + } + if (out.min === undefined && out.max === undefined && out.unit === undefined) { + return undefined; + } + return out; +} + /** * Incremental encoder for a single flat {@link WitSchemaGraph} that holds * several independent root types in one shared `type-nodes` pool. Mirrors the @@ -105,25 +155,25 @@ export class GraphEncoder { case 'bool': return { tag: 'bool-type' }; case 's8': - return { tag: 's8-type' }; + return { tag: 's8-type', val: normalizeNumericRestrictions(body.restrictions) }; case 's16': - return { tag: 's16-type' }; + return { tag: 's16-type', val: normalizeNumericRestrictions(body.restrictions) }; case 's32': - return { tag: 's32-type' }; + return { tag: 's32-type', val: normalizeNumericRestrictions(body.restrictions) }; case 's64': - return { tag: 's64-type' }; + return { tag: 's64-type', val: normalizeNumericRestrictions(body.restrictions) }; case 'u8': - return { tag: 'u8-type' }; + return { tag: 'u8-type', val: normalizeNumericRestrictions(body.restrictions) }; case 'u16': - return { tag: 'u16-type' }; + return { tag: 'u16-type', val: normalizeNumericRestrictions(body.restrictions) }; case 'u32': - return { tag: 'u32-type' }; + return { tag: 'u32-type', val: normalizeNumericRestrictions(body.restrictions) }; case 'u64': - return { tag: 'u64-type' }; + return { tag: 'u64-type', val: normalizeNumericRestrictions(body.restrictions) }; case 'f32': - return { tag: 'f32-type' }; + return { tag: 'f32-type', val: normalizeNumericRestrictions(body.restrictions) }; case 'f64': - return { tag: 'f64-type' }; + return { tag: 'f64-type', val: normalizeNumericRestrictions(body.restrictions) }; case 'char': return { tag: 'char-type' }; case 'string': @@ -282,25 +332,25 @@ export function schemaGraphFromWit(wit: WitSchemaGraph): SchemaGraph { case 'bool-type': return { tag: 'bool' }; case 's8-type': - return { tag: 's8' }; + return { tag: 's8', restrictions: normalizeNumericRestrictions(body.val) }; case 's16-type': - return { tag: 's16' }; + return { tag: 's16', restrictions: normalizeNumericRestrictions(body.val) }; case 's32-type': - return { tag: 's32' }; + return { tag: 's32', restrictions: normalizeNumericRestrictions(body.val) }; case 's64-type': - return { tag: 's64' }; + return { tag: 's64', restrictions: normalizeNumericRestrictions(body.val) }; case 'u8-type': - return { tag: 'u8' }; + return { tag: 'u8', restrictions: normalizeNumericRestrictions(body.val) }; case 'u16-type': - return { tag: 'u16' }; + return { tag: 'u16', restrictions: normalizeNumericRestrictions(body.val) }; case 'u32-type': - return { tag: 'u32' }; + return { tag: 'u32', restrictions: normalizeNumericRestrictions(body.val) }; case 'u64-type': - return { tag: 'u64' }; + return { tag: 'u64', restrictions: normalizeNumericRestrictions(body.val) }; case 'f32-type': - return { tag: 'f32' }; + return { tag: 'f32', restrictions: normalizeNumericRestrictions(body.val) }; case 'f64-type': - return { tag: 'f64' }; + return { tag: 'f64', restrictions: normalizeNumericRestrictions(body.val) }; case 'char-type': return { tag: 'char' }; case 'string-type': diff --git a/sdks/ts/packages/golem-ts-sdk/tests/schema-model/edge-cases.test.ts b/sdks/ts/packages/golem-ts-sdk/tests/schema-model/edge-cases.test.ts index 65f834b424..c1f3e17e21 100644 --- a/sdks/ts/packages/golem-ts-sdk/tests/schema-model/edge-cases.test.ts +++ b/sdks/ts/packages/golem-ts-sdk/tests/schema-model/edge-cases.test.ts @@ -470,7 +470,7 @@ describe('flat-carrier DAG sharing (decode expands shared nodes)', () => { const m = emptyMetadata(); const wit: WitSchemaGraph = { typeNodes: [ - { body: { tag: 's32-type' }, metadata: m }, + { body: { tag: 's32-type', val: undefined }, metadata: m }, { body: { tag: 'record-type', diff --git a/sdks/ts/packages/golem-ts-sdk/tests/schema-model/numericRestrictions.test.ts b/sdks/ts/packages/golem-ts-sdk/tests/schema-model/numericRestrictions.test.ts new file mode 100644 index 0000000000..46182faad0 --- /dev/null +++ b/sdks/ts/packages/golem-ts-sdk/tests/schema-model/numericRestrictions.test.ts @@ -0,0 +1,149 @@ +// Copyright 2024-2026 Golem Cloud +// +// Licensed under the Golem Source License v1.1 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://license.golem.cloud/LICENSE +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Numeric-restriction codec sync (issue #3532): the numeric `SchemaType` +// variants carry an inline `option`. These tests mirror +// the Rust cross-language golden vectors +// (`golem-common/src/schema/tests/mod.rs::golden_numeric_schema_types`) and the +// canonicalization invariants of `NumericRestrictions::normalize`. + +import { describe, it, expect } from 'vitest'; + +import type { SchemaTypeBody as WitSchemaTypeBody } from 'golem:core/types@2.0.0'; + +import { + schemaGraphToWit, + schemaGraphFromWit, + t, + type NumericBound, + type NumericRestrictions, + type SchemaGraph, + type SchemaType, +} from '../../src/internal/schema-model'; + +/** Canonical IEEE-754 `f64` bits for a float, as a `u64` (the `float-bits` payload). */ +function f64Bits(x: number): bigint { + const view = new DataView(new ArrayBuffer(8)); + view.setFloat64(0, x, true); + return view.getBigUint64(0, true); +} + +const u = (v: bigint): NumericBound => ({ tag: 'unsigned', val: v }); +const s = (v: bigint): NumericBound => ({ tag: 'signed', val: v }); +const f = (v: number): NumericBound => ({ tag: 'float-bits', val: f64Bits(v) }); + +const I64_MAX = 2n ** 63n - 1n; +const U64_MAX = 2n ** 64n - 1n; + +function graph(root: SchemaType): SchemaGraph { + return { defs: new Map(), root }; +} + +/** A numeric body extracted back from the round-tripped graph root. */ +function roundtripBody(root: SchemaType): SchemaType['body'] { + return schemaGraphFromWit(schemaGraphToWit(graph(root))).root.body; +} + +/** The encoded WIT body for the graph root (the wire shape). */ +function encodedRootBody(root: SchemaType): WitSchemaTypeBody { + const wit = schemaGraphToWit(graph(root)); + return wit.typeNodes[wit.root].body; +} + +describe('numeric restrictions codec (golden vectors)', () => { + // (label, model SchemaType, expected normalized restrictions on the model body) + const cases: Array<[string, SchemaType, NumericRestrictions | undefined]> = [ + ['u32 bare', t.u32(), undefined], + ['u32 min=1', t.u32({ min: u(1n) }), { min: u(1n) }], + ['u32 min=1 +unit', t.u32({ min: u(1n), unit: 'items' }), { min: u(1n), unit: 'items' }], + ['u32 bounds=(0,100)', t.u32({ min: u(0n), max: u(100n) }), { min: u(0n), max: u(100n) }], + [ + 'u32 bounds=(0,100) +unit', + t.u32({ min: u(0n), max: u(100n), unit: 'percent' }), + { min: u(0n), max: u(100n), unit: 'percent' }, + ], + [ + 's64 bounds=(0,i64::MAX)', + t.s64({ min: s(0n), max: s(I64_MAX) }), + { min: s(0n), max: s(I64_MAX) }, + ], + [ + 's64 bounds=(0,i64::MAX) +unit', + t.s64({ min: s(0n), max: s(I64_MAX), unit: 'ns' }), + { min: s(0n), max: s(I64_MAX), unit: 'ns' }, + ], + [ + 'u64 near u64::MAX', + t.u64({ min: u(U64_MAX - 1n), max: u(U64_MAX) }), + { min: u(U64_MAX - 1n), max: u(U64_MAX) }, + ], + [ + 'u64 near u64::MAX +unit', + t.u64({ min: u(U64_MAX - 1n), max: u(U64_MAX), unit: 'bytes' }), + { min: u(U64_MAX - 1n), max: u(U64_MAX), unit: 'bytes' }, + ], + ['f64 min=0.0', t.f64({ min: f(0.0) }), { min: f(0.0) }], + [ + 'f64 min=0.0 +unit', + t.f64({ min: f(0.0), unit: 'seconds' }), + { min: f(0.0), unit: 'seconds' }, + ], + ['s8 bounds=(-1,1)', t.s8({ min: s(-1n), max: s(1n) }), { min: s(-1n), max: s(1n) }], + ['f32 max=1.5', t.f32({ max: f(1.5) }), { max: f(1.5) }], + ]; + + for (const [label, type, expected] of cases) { + it(`round-trips ${label}`, () => { + const back = roundtripBody(type); + expect(back).toEqual({ tag: type.body.tag, restrictions: expected }); + }); + } +}); + +describe('numeric restrictions canonicalization', () => { + it('encodes an unconstrained numeric as `none`', () => { + expect(encodedRootBody(t.u32())).toEqual({ tag: 'u32-type', val: undefined }); + }); + + it('collapses an empty restriction set to `none`', () => { + expect(encodedRootBody(t.u32({}))).toEqual({ tag: 'u32-type', val: undefined }); + expect(roundtripBody(t.u32({}))).toEqual({ tag: 'u32', restrictions: undefined }); + }); + + it('drops an empty `unit`', () => { + expect(encodedRootBody(t.u32({ unit: '' }))).toEqual({ tag: 'u32-type', val: undefined }); + expect(roundtripBody(t.u32({ min: u(1n), unit: '' }))).toEqual({ + tag: 'u32', + restrictions: { min: u(1n) }, + }); + }); + + it('canonicalizes a `-0.0` float bound to `+0.0` bits', () => { + const negZeroBits = f64Bits(-0.0); + expect(negZeroBits).toBe(1n << 63n); + const encoded = encodedRootBody(t.f64({ min: { tag: 'float-bits', val: negZeroBits } })); + expect(encoded).toEqual({ tag: 'f64-type', val: { min: { tag: 'float-bits', val: 0n } } }); + expect(roundtripBody(t.f64({ min: { tag: 'float-bits', val: negZeroBits } }))).toEqual({ + tag: 'f64', + restrictions: { min: { tag: 'float-bits', val: 0n } }, + }); + }); + + it('preserves a constrained numeric through the wire shape', () => { + expect(encodedRootBody(t.u32({ min: u(1n), max: u(100n), unit: 'percent' }))).toEqual({ + tag: 'u32-type', + val: { min: u(1n), max: u(100n), unit: 'percent' }, + }); + }); +}); diff --git a/sdks/ts/packages/golem-ts-sdk/types/golem_core_2_0_0_types.d.ts b/sdks/ts/packages/golem-ts-sdk/types/golem_core_2_0_0_types.d.ts index 6f4775abec..a3547a3113 100644 --- a/sdks/ts/packages/golem-ts-sdk/types/golem_core_2_0_0_types.d.ts +++ b/sdks/ts/packages/golem-ts-sdk/types/golem_core_2_0_0_types.d.ts @@ -179,6 +179,36 @@ declare module 'golem:core/types@2.0.0' { ok?: TypeNodeIndex; err?: TypeNodeIndex; }; + /** + * --- Numeric restrictions --- + * A numeric bound usable across every numeric representation. Float bounds + * carry canonical IEEE-754 `f64` bits (NaN/inf rejected, -0.0 normalized); + * comparisons decode the bits to `f64` and compare numerically. + */ + export type NumericBound = + { + tag: 'signed' + val: bigint + } | + { + tag: 'unsigned' + val: bigint + } | + { + tag: 'float-bits' + val: bigint + }; + /** + * Inline numeric refinement. `none` on a numeric type means unconstrained + * (the common case). The empty restriction set is never encoded as `some`: + * producers normalize it to `none`, decoders normalize a decoded empty to + * `none`. `unit` is schema/help metadata only. + */ + export type NumericRestrictions = { + min?: NumericBound; + max?: NumericBound; + unit?: string; + }; /** * --- Text / Binary restrictions --- */ @@ -356,33 +386,43 @@ declare module 'golem:core/types@2.0.0' { } | { tag: 's8-type' + val: NumericRestrictions | undefined } | { tag: 's16-type' + val: NumericRestrictions | undefined } | { tag: 's32-type' + val: NumericRestrictions | undefined } | { tag: 's64-type' + val: NumericRestrictions | undefined } | { tag: 'u8-type' + val: NumericRestrictions | undefined } | { tag: 'u16-type' + val: NumericRestrictions | undefined } | { tag: 'u32-type' + val: NumericRestrictions | undefined } | { tag: 'u64-type' + val: NumericRestrictions | undefined } | { tag: 'f32-type' + val: NumericRestrictions | undefined } | { tag: 'f64-type' + val: NumericRestrictions | undefined } | { tag: 'char-type' diff --git a/sdks/ts/packages/golem-ts-sdk/types/golem_tool_0_1_0_common.d.ts b/sdks/ts/packages/golem-ts-sdk/types/golem_tool_0_1_0_common.d.ts index 4869873990..1912d27717 100644 --- a/sdks/ts/packages/golem-ts-sdk/types/golem_tool_0_1_0_common.d.ts +++ b/sdks/ts/packages/golem-ts-sdk/types/golem_tool_0_1_0_common.d.ts @@ -50,11 +50,15 @@ * no items, is valid). * • A `positional` / `option` / `result` / `error` `type-node-index` * resolves to a node in `tool.schema`. - * • A `repeatable` option's `default`, if present, is a list whose - * elements are values of the `repeatable-shape.%type` node. - * • A `value-is` ref naming a repeatable option, tail positional, or - * otherwise list-shaped target means "any occurrence / element - * equals this literal"; the literal is a value of the element type. + * • A `repeatable-list` option's `default`, if present, is a `list` + * whose elements are values of the `repeatable-list-shape.item-type` + * node. A `repeatable-map` option's `default`, if present, is a `map` + * value of the `repeatable-map-shape.map-type` node. + * • A `value-is` ref naming a `repeatable-list` option, tail positional, + * or otherwise list-shaped target means "any occurrence / element + * equals this literal"; the literal is a value of the element type. For + * a `repeatable-map` option the literal is a value of the map's value + * type (any entry's value equals this literal). * • The tool's identity is its root command name * (`commands.nodes[0].name`); `get-tool(name)` and * `guest.invoke(tool-name, …)` match against it. `commands.nodes` @@ -98,6 +102,10 @@ declare module 'golem:tool/common@0.1.0' { */ openWorld: boolean; }; + /** + * Resolution policy for a repeated key in a `repeatable-map` option. + */ + export type DuplicateKeyPolicy = "reject" | "last-wins"; export type Repetition = /** --inc a --inc b */ { @@ -113,10 +121,20 @@ declare module 'golem:tool/common@0.1.0' { tag: 'either' val: string }; - export type RepeatableShape = { + export type RepeatableListShape = { repetition: Repetition; - /** Index into `tool.schema`. */ - type: TypeNodeIndex; + /** Index into `tool.schema`; the element type of the collected `list`. */ + itemType: TypeNodeIndex; + }; + export type RepeatableMapShape = { + repetition: Repetition; + /** + * Index into `tool.schema`; a `golem:core` `map` (key + value) node. The + * collected value is this map. + */ + mapType: TypeNodeIndex; + /** What happens when the same key is supplied more than once. */ + duplicateKeyPolicy: DuplicateKeyPolicy; }; export type OptionShape = /** Required value: --opt VALUE or --opt=VALUE. Index into `tool.schema`. */ @@ -133,10 +151,21 @@ declare module 'golem:tool/common@0.1.0' { tag: 'optional-scalar' val: TypeNodeIndex } | - /** Repeatable; value type in the derived signature is list-of-scalar. */ + /** + * Repeatable scalar option (`-e a -e b`); the collected value is a + * `list` of the element type. + */ + { + tag: 'repeatable-list' + val: RepeatableListShape + } | + /** + * Repeatable key-value option (`-c a=1 -c b=2`); the collected value is a + * `golem:core` `map` node, never a `list`. + */ { - tag: 'repeatable' - val: RepeatableShape + tag: 'repeatable-map' + val: RepeatableMapShape }; export type BoolFlagShape = { default_: boolean; @@ -235,6 +264,11 @@ declare module 'golem:tool/common@0.1.0' { /** Default value, interpreted against `%type` in `tool.schema`. */ default_?: SchemaValueTree; required: boolean; + /** + * If true, the positional's value may be read from standard input + * (e.g. grep's trailing `files` accepting piped input). + */ + acceptsStdio: boolean; }; export type TailPositional = { name: string; @@ -251,6 +285,11 @@ declare module 'golem:tool/common@0.1.0' { * `kubectl exec -- CMD ARGS...`). */ verbatim: boolean; + /** + * If true, the tail items may be read from standard input + * (e.g. grep's trailing `files` accepting piped input). + */ + acceptsStdio: boolean; }; /** * Positionals (variadic only at the tail, structurally) From c09d82eae75a6ec8851166d473edc7d6d3172d65 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Sun, 28 Jun 2026 08:55:01 +0200 Subject: [PATCH 05/11] Removed txt --- .../schema/validation/tests/well_formedness_tests.txt | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 golem-common/proptest-regressions/schema/validation/tests/well_formedness_tests.txt diff --git a/golem-common/proptest-regressions/schema/validation/tests/well_formedness_tests.txt b/golem-common/proptest-regressions/schema/validation/tests/well_formedness_tests.txt deleted file mode 100644 index f3eea281ee..0000000000 --- a/golem-common/proptest-regressions/schema/validation/tests/well_formedness_tests.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Seeds for failure cases proptest has generated in the past. It is -# automatically read and these particular cases re-run before any -# novel cases are generated. -# -# It is recommended to check this file in to source control so that -# everyone who runs the test benefits from these saved cases. -cc f50bcde5b15dfd67fff05f76fbdb37e9d3e34973219c35076e2d8a1cd6a27a27 # shrinks to graph = SchemaGraph { defs: [SchemaTypeDef { id: TypeId("bt_7"), name: None, body: Ref { id: TypeId("bt_7"), metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } } }, SchemaTypeDef { id: TypeId("igi_"), name: None, body: Bool { metadata: MetadataEnvelope { doc: None, aliases: ["p", "bmjq5"], examples: ["^i*U?F2V:", ">+sN'!$"], deprecated: Some(">q,:&YazVQO\\"), role: Some(Multimodal) } } }, SchemaTypeDef { id: TypeId("e__"), name: Some("gdk_4"), body: Option { inner: Map { key: String { metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }, value: Quantity { spec: QuantitySpec { base_unit: "a", allowed_suffixes: [], min: Some(QuantityValue { mantissa: -1354897389968930, scale: -9, unit: "a" }), max: None }, metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }, metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }, metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } } }], root: Map { key: String { metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }, value: Stream { inner: Some(Path { spec: PathSpec { direction: InOut, kind: Any, allowed_mime_types: Some(["y4", "y"]), allowed_extensions: Some(["y_q9__", "v_3_0_"]) }, metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }), metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } }, metadata: MetadataEnvelope { doc: None, aliases: [], examples: [], deprecated: None, role: None } } } From 1e7eda009975e793c769cf89b6a0ccd3fe3efb8c Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Sun, 28 Jun 2026 08:55:46 +0200 Subject: [PATCH 06/11] Removed md --- tool-rust-1.md | 734 ------------------------------------------------- 1 file changed, 734 deletions(-) delete mode 100644 tool-rust-1.md diff --git a/tool-rust-1.md b/tool-rust-1.md deleted file mode 100644 index 963bdab134..0000000000 --- a/tool-rust-1.md +++ /dev/null @@ -1,734 +0,0 @@ -# Rust tool definition macros (golemcloud/golem#3532) — implementation plan - -Implements the Rust `#[tool_definition]` authoring surface from the agent-tools -spec (§5.1, §5.2.1, §5.3.1 grep example, §5.3.5.1 git subset, §5.8.1 -implicit-body convention), testable end-to-end through the exported -`golem:tool/guest@0.1.0` `discover-tools` function. - -Everything in this list ships in a **single PR** — including the cross-cutting -`golem-schema` changes, subtree support, the git/Remote multi-trait example, and -the §4.7 cross-language equivalence anchor. Nothing the ticket describes is -deferred. - -## Dependency - -This work sits on top of the `value-type-refactoring-6` branch (currently in -`../golem-2`, to be merged onto this branch). That branch adds the -standard-Rust-type → rich-schema-node mappings this plan relies on: - -- `std::path::PathBuf` → `SchemaType::Path { direction: InOut, kind: Any }` -- `url::Url` → `SchemaType::Url` -- `chrono::DateTime` → `SchemaType::Datetime` -- `std::time::Duration` → `SchemaType::Duration` -- `HashMap`/`BTreeMap` → `SchemaType::Map` -- new `SchemaType::{text, path, url, quantity, secret}` constructors - -## Key context (verified against the repo) - -- The repo WIT differs from the spec: the spec's separate `type-tree` / - `value-tree` and `*-c` constraint records are gone. Types and values are - delegated to `golem:core/types@2.0.0`'s schema-graph model. See - `sdks/rust/golem-rust/wit/deps/golem-tool/common.wit` and `guest.wit`. -- `tool` record is `{ version, commands: command-tree, schema: schema-graph }`. - Command bodies reference types by `type-node-index` into the shared - `tool.schema` pool. `schema.root` is a structurally-required placeholder, not - the semantic root. -- The command tree, `option-shape`, `flag-shape`, `constraint` - (`mutex-groups`/`implies`/`all-or-none`/`requires-all`/`requires-any`/`forbids`), - `stream-spec`, `result-spec`, `error-case`, `command-annotations` all still - exist in the tool WIT. -- The schema model (`golem-schema/src/schema/schema_type.rs`) carries constraints - on rich semantic types via inline sidecars (`Text{TextRestrictions}`, - `Url{UrlRestrictions}`, `Path{PathSpec}`, `Quantity{QuantitySpec}`, - `Binary{BinaryRestrictions}`). Numeric variants `S8..U64, F32, F64` currently - carry only `MetadataEnvelope`. `SchemaType` derives `Eq`. -- The `golem-agentic` world already exports `golem:tool/guest@0.1.0`; the current - guest impl `sdks/rust/golem-rust/src/agentic/tool_impl.rs` is a placeholder - (`discover_tools` returns empty, `get_tool`/`invoke` report unknown). -- Pattern to mirror (agents): - - definition macro `sdks/rust/golem-rust-macro/src/agentic/agent_definition_impl.rs` - inserts a `__register_agent_type()` metadata producer into the trait. - - implementation macro `sdks/rust/golem-rust-macro/src/agentic/agent_implementation_impl.rs` - emits the `#[ctor]` that calls `::__register_agent_type()`. - - registry `sdks/rust/golem-rust/src/agentic/agent_registry.rs` (global `State`). - - builder `sdks/rust/golem-rust/src/agentic/extended_agent_type.rs` - (`ExtendedAgentType` → WIT record, merging per-method schema graphs). - - tests `sdks/rust/golem-rust/tests/agent.rs` call `Impl::__register_agent_type()` - directly, then query the registry. - -## Locked decisions - -### D1 — Registration: definition builds metadata, implementation registers - -- `#[tool_definition]` only generates the metadata producer (a `where Self: Sized` - static fn, e.g. `__register_tool()`, plus a hidden `ToolDefinitionDescriptor`) - and performs compile-time validation. It does **not** register. -- `#[tool_implementation]` emits the `#[ctor]` that calls - `::__register_tool()`. Because the ctor only exists on - implemented types, a tool with no implementation is never registered — a - registered tool is necessarily implemented in that wasm (operator invariant). -- A **minimal `#[tool_implementation]`** (registration trigger only; real - `invoke` dispatch is a downstream ticket) is in scope so the macro is testable - through `discover-tools`. -- Tests register by calling `Leaf*::__register_tool()` directly (like the agent - tests), then assert via the `discover_tools()` guest export. - -### D2 — Numeric constraints: `Option` (one PR) - -- Add `restrictions: Option` to all 10 numeric `SchemaType` - variants (`S8..U64, F32, F64`). `Option<>` (not a non-optional empty-by-default - struct) is chosen to minimize hot-path cost: `SchemaType`/`SchemaValue` are - passed, serialized, and converted on the hot path, and the common - unconstrained case is a single `None` tag rather than three carried inner - `Option`s. -- `NumericRestrictions { min: Option, max: Option, - unit: Option }`. -- `NumericBound` is `Eq`-safe and covers the full range of every numeric repr - (`SchemaType` derives `Eq`, and `i64`-mantissa cannot represent `u64::MAX`): - `enum NumericBound { Signed(i64), Unsigned(u64), Float(u64 /* canonical bits */) }`. - Floats are stored as canonical bits, rejecting `NaN`/`inf` and normalizing - `-0.0`. -- **Canonicalization invariant** (closes the `None` vs `Some(empty)` hazard the - `Option<>` form introduces, keeping derived `Eq` and §4.7 byte-equivalence - intact): - - `NumericRestrictions::is_empty()` ⇔ `min.is_none() && max.is_none() && - unit` is `None`/empty. - - Smart constructors and decoders always collapse empty → `None`; `unit: - Some("")` normalizes to `None`. - - Well-formedness forbids `Some(empty)` (it must never be constructible). - - `#[serde(default, skip_serializing_if = "Option::is_none")]` so the wire form - for unconstrained numerics is unchanged. - -### D3 — Rich types: standard types for identity, `#[arg]` for refinement - -- Type identity comes from standard Rust types via the dependency branch - (`PathBuf`/`url::Url`/`chrono::DateTime`/`Duration`/`BTreeMap`). No new SDK - wrapper types. -- The macro does `#[arg]`-driven **node refinement** on the schema node returned - by `::get_type()`: - - `regex` / `min_length` / `max_length` → `Text { TextRestrictions }` - - `direction` / `kind` / `mime` / `accepts_stdio` → `Path { PathSpec }` (+ the - tool-model positional `accepts-stdio` flag, see D5) - - url `schemes` → `Url { UrlRestrictions }` - - numeric `min` / `max` / `bounds` / `unit` → numeric `NumericRestrictions` - -### D4 — Key-value parameters use `Map` - -- Key-value data maps to `SchemaType::Map` / `SchemaValue::Map`, never - `list`. -- Author git's `config` as `BTreeMap` (deterministic key order, - required for the §4.7 canonical anchor; `HashMap` order is nondeterministic). -- git's `config` is also `repeatable = "repeated"` (`-c a=1 -c b=2`). The tool - WIT `repeatable-shape` carries a single element `%type` while the logical - collected value is a `Map`. Model the repeatable element's value type via - `repeatable-shape` and collect into a `Map` node; the exact - element-vs-map shaping is finalized in Phase 0. - -### D5 — `accepts_stdio` is added to the tool WIT (not deferred) - -- `accepts_stdio` (grep's `files = "tail", accepts_stdio = true`) is not in the - current WIT. Add `accepts-stdio: bool` to the tool-model `positional` and - `tail-positional` records in `golem:tool` common.wit (tool-specific home, - smaller blast radius than the shared schema model). Synced to all SDK WIT - copies via `cargo make wit`. - -### D6 — Cross-trait subtree assembly via runtime descriptor - -- A proc macro expanding `Git` cannot read the metadata generated by the `Remote` - macro, so the command tree for `git → remote → add` cannot be assembled at - macro-expansion time. Instead: - - Each `#[tool_definition]` emits a hidden `ToolDefinitionDescriptor` - (`fn metadata() -> ExtendedToolType`). - - The parent declares subtrees explicitly with - `#[command(subtree = path::to::Remote)]` (bare `-> Remote` is not a safe macro - target). - - The parent's generated `__register_tool()` calls the child descriptor's - `metadata()` at registration time, turns the parent method into a command - node with `body = none`, and grafts the child root's subcommands beneath it. - - The child root name must match (or be explicitly overridden against) the - parent command name; validated at registration. - - A subtree-only trait is not registered as a top-level tool unless it has its - own `#[tool_implementation]`. - -### D7 — No command-body input-record in metadata - -- The WIT `command-body` lists positionals/options/flags individually by - `type-node-index`; there is no single input-record type node. The invocation - record (`guest.invoke`'s `typed-schema-value`) is a derived view. -- Lock a canonical invocation-record field order, used by the derived record, - validation, help rendering, and future dispatch/client codegen: - 1. inherited globals from root → parent (at each node: options, then flags), - 2. fixed positionals (declaration order), - 3. tail positional (single list-typed field), - 4. body options, - 5. body flags. - -### D8 — Globals stored once - -- Globals are stored only on the `command-node` where declared (recursive "this - level and downward" semantics). They are **not** cloned into descendant - `command-body` options/flags. An effective-globals view is derived where - needed. A validator checks body-local names are unique against inherited - globals. - -### D9 — Defaults and `value_is` literals - -- `positional.default`, `option-spec.default`, and `value-is` are - `schema-value-tree`s interpreted against the referenced type node. The macro - layer parses Rust attribute literals, resolves the referenced argument's - `SchemaType`, produces a `SchemaValue`, and encodes via the schema model's - value encoder. Validated against the referenced type node at registration. -- Enum-default case names need a canonical casing rule (tool-facing) so the §4.7 - anchor is stable. - -### D10 — Error metadata via a derive - -- `Result` does not let the tool macro recover `#[error(kind, exit_code)]` - from `E`. Add `#[derive(ToolError)]` with a `#[tool_error(kind = "...", - exit_code = ...)]` helper attribute (an inert attribute alone cannot drive - enum-variant metadata). Tool methods returning `Result` require - `E: ToolErrorSchema` (+ `Schema`), and the macro reads error-case metadata from - that. - -## Phases - -### Phase 0 — Design locks (before coding) - -Finalize and write down, with golden examples: - -- Subtree mechanism: `ToolDefinitionDescriptor` shape, `#[command(subtree=…)]` - syntax, child-root-name matching/override rule, runtime graft algorithm (D6). -- Canonical invocation-record field order (D7). -- Defaults / `value_is` literal → `SchemaValue` conversion strategy and enum-case - canonical casing (D9). -- Error metadata strategy: `ToolError` derive + helper attribute (D10). -- Numeric: `Option`, `NumericBound`, normalization invariant - (D2). -- `accepts-stdio` WIT addition (D5); key-value/repeatable `Map` shaping (D4). -- Canonical casing rules for tool / command / arg names. - -### Phase 1 — Schema + WIT model changes - -`golem-schema`: - -- Add `Option` to `S8..U64, F32, F64` - (`skip_serializing_if = Option::is_none` + empty-normalization to `None`); - add `NumericBound`, `NumericRestrictions`, smart constructors. -- Update the ~120 numeric match sites: - - `validation/subtyping.rs`: numeric narrowing within the same repr - (`sub.min >= sup.min`, `sub.max <= sup.max`, `None` = unbounded; inclusive), - equivalence compares normalized restrictions exactly. - - `validation/value.rs`: numeric range/unit checks. - - `validation/well_formedness.rs`: `min <= max`, bounds fit the repr, integer - variants reject fractional bounds, float bounds reject `NaN`/`inf` and - normalize `-0.0`, reject `Some(empty)`. - - `protobuf.rs` + the schema `.proto`: numeric message fields. - - `wit/encode.rs` + `wit/decode.rs` + `golem-core-v2.wit`: numeric variant - cases gain a payload (payloadless → payload-carrying = versioned wire - evolution; decoders normalize missing → `None`). - - `proptest_strategies.rs`, `conversion.rs` (primitives still emit `None`). - -`golem:tool` common.wit: - -- Add `accepts-stdio: bool` to `positional` and `tail-positional`. - -Propagation: - -- Sync WIT/protobuf to the TS / Scala / MoonBit encoders/decoders so byte - equivalence holds; run `cargo make wit`. -- Golden cross-SDK vectors: bare `u32`, `u32 min=1`, `u32 bounds=(0,100)`, - `s64 bounds=(0, i64::MAX)`, `u64` near `u64::MAX`, `f64 min=0.0`, each `+unit`, - and empty → `None` roundtrip. - -> **Phase 1 status (oracle-reviewed):** the Rust core (golem-schema + -> golem-common + protobuf + golem-core-v2/tool WIT + golem-schema-derive) is -> complete, verified, and oracle-confirmed correct (4 bug fixes accepted). -> **Deferred-within-PR gate:** the TS / Scala / MoonBit schema-model codec sync -> for the new numeric WIT/proto/tool shapes is intentionally **sequenced after -> the Rust phases** but is **required same-PR work that must land before Phase 6 -> / final merge** (oracle SHOULD-FIX 2). Tracked in Phase 6. - -### Phase 2 — golem-rust runtime - -> **Phase 2 status (oracle-reviewed, CLEAR):** the golem-rust runtime mirror is -> complete and oracle-confirmed. Delivered in -> `sdks/rust/golem-rust/src/agentic/`: `tool_registry.rs` (deterministic -> root-name-keyed registry), `extended_tool_type.rs` (runtime mirror + -> graph-merge `to_tool()`, full validator mirroring `golem-common`'s -> `validate_tool`, help/argument-help renderer, subtree graft), -> `tool_refinement.rs` (D3 node refinements), `errors.rs` (`ToolError`), and -> registry-wired `tool_impl.rs` discovery/lookup. Oracle blockers resolved: -> subtree index-remap/dispatcher/annotation semantics fixed; panic-safe -> validator + helpers; and per-argument schema graphs are now explicitly -> checked for dangling refs (`check_graph_closed`, mirroring canonical -> `check_type_refs`/`check_def_refs`), which makes per-arg default/`value-is` -> validation equivalent to validating against the merged tool schema. SDK -> build/clippy/tests green (lib 60 passed/4 ignored, agent 29 passed). `invoke` -> remains a placeholder pending the later phase. - -- `tool_registry.rs`: global `State` with `register_tool`, `get_all_tools`, - `get_tool_by_name` (mirror `agent_registry.rs`). -- `extended_tool_type.rs`: Rust mirror of the WIT `tool` / `command-tree` / - `command-node` / `command-body` / specs, with `to_tool()` merging per-arg - schema graphs into one `tool.schema` (reuse the agent graph-merge/encode - pattern). **No synthetic input-record node in metadata.** Add: - - `EffectiveCommandBody`, `effective_globals(command_index)`, - `canonical_input_fields(command_index)` (D7), - - `encode_schema_value_default(...)` (D9), - - validators: name uniqueness vs inherited globals (D8), default / `value_is` - type-match (D9), all `type-node-index` references resolve. -- Node-refinement helpers (D3): regex/min/max-len → `Text`; direction / kind / - mime / `accepts_stdio` → `Path` (+ positional `accepts-stdio`); schemes → - `Url`; min/max/unit → numeric. -- `ToolError` runtime surface; help-text renderer (a `Tool` + command-path → - formatted string at any depth: root, named subcommand, individual argument). -- `ToolDefinitionDescriptor` trait + subtree-graft runtime merge (D6). -- Wire `tool_impl.rs` `discover_tools` / `get_tool` to the registry. - -### Phase 3 — Macro: attribute parsing (golem-rust-macro) - -- New `tool/` module; register in `lib.rs`: `#[tool_definition]`, minimal - `#[tool_implementation]`, `#[derive(ToolError)]`, and inert - `#[arg]` / `#[command]` / `#[constraint]` / `#[result]`. -- Parsers: - - arg kind: `positional` | `option` | `flag` | `tail` | `global`. - - option/flag shapes: `repeatable = repeated|delimited|either` (+ `delim`), - `count-flag` (+ `max`), `optional-scalar`, `negatable`, `default`, `short`, - `aliases`, `env`, `required`. - - refinements: `regex`, path `kind` / `direction` / `accepts_stdio`, url - `schemes`, numeric `min` / `max` / `bounds` / `unit`. - - `#[command(subtree = path, aliases = [...], annotations(destructive, - read_only, idempotent, open_world))]`. - - `#[constraint(...)]`: `mutex_groups`, `all_or_none`, `implies`, - `requires_all`, `requires_any`, `forbids`, `value_is`. - - `#[result(formatters = [...], default = "...")]`. - - `#[tool_error(kind, exit_code)]` (on `ToolError` enum variants). - - doc parsing: `///` on trait/method → `doc.summary` / `doc.description`; - `#[arg(doc = "...")]` for params; examples. - -### Phase 4 — Macro: metadata synthesis - -- Trait name → tool name (kebab). Implicit-body detection: the method whose - snake_case name equals the tool's snake_case name is the root command body. - Enforce `commands[0].name == tool.name`; **compile error on divergence** - (§5.8.1). -- Parameter projection: `bool` → flag; `Vec` at tail → tail positional; - `Vec` elsewhere → repeatable option; `Option` → not-required; primitive - → positional; struct → options-object; `BTreeMap`/`HashMap` → `Map`; - `#[command(subtree=…)]` method → `body = none` node grafted at runtime; - `"global"` args propagate to this command + descendants (stored once, D8). -- Per typed arg: `::get_type()` then apply `#[arg]` refinement; - merge into `tool.schema`. Build the flattened command tree (root at index 0), - globals, options/flags/positionals/streams/result/errors/annotations/ - constraints. -- Emit `__register_tool()` building `ExtendedToolType` (+ descriptor); - `#[tool_implementation]` emits the `#[ctor]` calling `::__register_tool()`. - -### Phase 5 — Tests (through discover-tools) - -- Port **grep** (§5.3.1) — single trait — into `golem-rust/tests/tool.rs` - (feature `export_golem_agentic`): register via `LeafGrep::__register_tool()`, - call `discover_tools()`, assert full metadata. -- Port **git + Remote subtree** (§5.3.5.1): multi-level subcommands, pure - dispatchers, aliases, per-command annotations, tail separator, optional - trailing positional, option aliases/env/default, count-flag, negatable flag, - all repeatable modes, several constraint kinds, multi-level globals - propagation, `Url`/`Datetime`/`Map`/`Enum` nodes, multiple result formatters, - mixed usage/runtime exit codes. -- Targeted tests: canonical invocation-record field order (D7); default / - `value_is` schema-value-tree encoding (D9); globals declared once but effective - in descendants (D8); numeric bounds incl. `u64::MAX` (D2); - no-registration-without-`#[tool_implementation]` (D1); help-text rendering at - root / subcommand / argument depth. -- `trybuild` compile-fail: body/name divergence (§5.8.1), bad `#[arg]`, invalid - subtree return/descriptor shape. - -### Phase 6 — §4.7 cross-language equivalence anchor - -- Ensure canonical ordering and casing throughout the produced metadata. -- Snapshot the canonical grep/git `Tool` metadata as the reference the - cross-language verification ticket (#3560) reuses across SDKs. -- **Deferred-within-PR gate (oracle SHOULD-FIX 2):** complete the TS / Scala / - MoonBit schema-model codec sync for the new numeric WIT/proto/tool shapes - (`numeric-restrictions`, `numeric-bound`, `accepts-stdio`, the `option-shape` - list/map split, `duplicate-key-policy`). Regenerate generated bindings, update - the hand-written codecs, and prove byte-equivalence against the golden - vectors. This is required before final completion of this PR. - -### Phase 7 — Verify - -- `cargo test -p golem-schema` -- `cargo test -p golem-rust --features export_golem_agentic` -- `cargo build -p golem-rust-macro` -- `cargo make wit` (WIT source changed) -- `cargo fmt` + `cargo clippy` per `sdks/rust/AGENTS.md` (the SDK is outside - `cargo make build`; do not hand-edit `wit/deps`, regenerate instead). - -## Phase 0 — Finalized design (grounded against the repo) - -This section turns D1–D10 into concrete, code-level artifacts the later phases -copy verbatim. Every claim below was verified against the current tree on branch -`tools-rust-macro-1` (head `2def062bb Value type refactoring 6 (#3662)`). - -### F0.1 — Grounded file inventory (numeric change, Phase 1) - -Numeric variants `S8..U64, F32, F64` are payloadless today. They are matched in -exactly these files (verified): - -- `golem-schema/src/schema/schema_type.rs` — variant defs, `metadata()` + - `metadata_mut()` accessors, 10 bare constructors. -- `golem-schema/src/schema/wit/encode.rs` (~L362–372), `wit/decode.rs` - (L297–306) — `wire::SchemaTypeBody::{S8Type..F64Type}`. -- `golem-schema/src/schema/protobuf.rs` (encode L212–221, decode L293–302) — - `Body::{S8Type..F64Type}(ProtoEmpty{})`. -- `golem-schema/src/schema/validation/{subtyping,value,well_formedness}.rs`. -- `golem-schema/src/schema/proptest_strategies.rs`, `conversion*.rs`. - -Wire types come from `wit_bindgen::generate!` over -`golem-schema/wit/deps/golem-core-v2/golem-core-v2.wit` (`schema-type-body` -variant, L218). Proto is `golem-api-grpc/proto/golem/schema/schema.proto` -(`SchemaType.body` oneof, fields 4–13 `golem.common.Empty`). `golem-core-v2` and -the tool WIT are brand-new this cycle (unreleased), so evolving the payloadless -numeric cases is a free versioned change, not a compatibility break. - -### F0.2 — Numeric model (D2), exact Rust - -```rust -/// Bound usable across every numeric repr. `SchemaType` derives `Eq`, and an -/// `i64` mantissa cannot represent `u64::MAX`, so the bound is a 3-family sum. -/// Floats store canonical IEEE-754 bits (NaN/inf rejected at construction, -/// `-0.0` normalized to `+0.0`) to stay `Eq`-safe. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, IntoSchema, FromSchema, ...)] -#[serde(tag = "kind", content = "value", rename_all = "kebab-case")] -pub enum NumericBound { - Signed(i64), - Unsigned(u64), - FloatBits(u64), -} -impl NumericBound { - pub fn float(v: f64) -> Result; // reject NaN/inf, normalize -0.0 -} - -#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize, IntoSchema, FromSchema, ...)] -#[serde(rename_all = "camelCase")] -pub struct NumericRestrictions { - #[serde(default, skip_serializing_if = "Option::is_none")] pub min: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] pub max: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] pub unit: Option, -} -impl NumericRestrictions { - pub fn is_empty(&self) -> bool; // min/max none && unit none-or-"" - pub fn normalize(self) -> Option; // empty -> None; unit Some("") -> None -} -``` - -Each numeric variant gains the field (bare constructors keep `restrictions: None`): - -```rust -S8 { - #[serde(default, skip_serializing_if = "Option::is_none")] - restrictions: Option, - #[serde(default, skip_serializing_if = "MetadataEnvelope::is_empty")] - metadata: MetadataEnvelope, -}, -``` - -Accessor match arms become `SchemaType::S8 { metadata, .. } | ...`. The macro -sets restrictions by building the struct literal with -`restrictions: NumericRestrictions{..}.normalize()`. **Invariant:** `Some(empty)` -is never constructible; smart constructors/decoders collapse empty → `None`; -well-formedness rejects `Some(empty)`. - -WIT (`golem-core-v2.wit`): - -```wit -variant numeric-bound { signed(s64), unsigned(u64), float-bits(u64) } -record numeric-restrictions { - min: option, max: option, unit: option, -} -// numeric cases gain a payload: -s8-type(option), // … through f64-type(option) -``` - -Proto (`schema.proto`): numeric oneof fields 4–13 change -`golem.common.Empty` → `NumericRestrictions` (presence = `Some`; absent/empty -decodes/normalizes to `None`): - -```proto -message NumericBound { oneof bound { int64 signed = 1; uint64 unsigned = 2; uint64 float_bits = 3; } } -message NumericRestrictions { NumericBound min = 1; NumericBound max = 2; optional string unit = 3; } -``` - -Validation semantics — centralized in one helper used by **every** entry point -(well-formedness, subtyping, equivalence, value validation, macro refinement), so -no path assumes a prior well-formedness pass (oracle finding 9): - -```rust -fn normalize_numeric_restrictions_for_repr( - repr: NumericRepr, // S8..U64, F32, F64 - r: Option, -) -> Result, SchemaValidationError>; -``` - -- `well_formedness`: `min <= max` compared **numerically** (not by family tag or - raw bits); bound family must match the repr (`U*` ⇒ `Unsigned`, `S*` ⇒ - `Signed`, `F*` ⇒ `FloatBits`) — family mismatch is an error; integer reprs - reject fractional/float bounds; bounds must fit the repr range; reject - `Some(empty)`; a `NumericBound` whose arm is set but value is non-finite is - impossible (constructor guards), but a decoded malformed bound is rejected. -- `subtyping`: numeric narrowing within identical repr — sub.min ≥ sup.min, - sub.max ≤ sup.max (`None` = unbounded, inclusive). Family mismatch ⇒ "not a - subtype" (defended here too, not only in well-formedness). Equivalence compares - normalized restrictions exactly. **`unit` is schema-level metadata** (numeric - `SchemaValue`s carry no unit), so value validation never checks it; for - equivalence/subtyping the normalized `unit` must match exactly (finding 10). -- `value`: **range only** against the node's restrictions; decode bound bits → - `f64`/`i64`/`u64`, compare numerically. No unit check. - -Float rule (finding 11): `FloatBits` stores **canonical f64 bits**. All -comparisons decode to `f64` and compare numerically, never by bit order. For -`F32`, bounds must round-trip through `f32` (well-formedness rejects bounds that -don't); value checks widen the `f32` value to `f64` and compare against the f64 -bounds. - -Wire/format notes (findings 6–8): -- **WIT** change `s8-type` → `s8-type(option)` is an - intentional ABI change on an unreleased package. Unconstrained numeric encodes - as `s8-type(none)`. There is no "missing payload decodes to None"; the binding - type simply carries `Option`. `some(empty)` is accepted only at the decode - boundary and normalized to `none`. -- **Proto** decode rules: a missing `SchemaType.body` is an invalid schema (not - `S8(None)`); `Body::S8Type(NumericRestrictions::default())` decodes to - `S8 { restrictions: None }`; `Some({min:None,max:None,unit:None|Some("")})` - normalizes to `None`; a present `NumericBound` with no `bound` arm set is a - decode error. -- **desert** `BinaryCodec` with `evolution()`: binary bytes for numeric schema - variants are **not** backward-compatible across this unreleased refactor (a - payloadless case gaining an `Option` payload is not assumed wire-stable). Phase - 1 adds a roundtrip test over `S8/U64/F64` plus adjacent `Char`/`String`/`Bool` - to prove the codec is internally consistent after the change. - -### F0.3 — `accepts-stdio` (D5), exact WIT - -Add to `golem:tool` `common.wit` `positional` and `tail-positional` records: - -```wit -accepts-stdio: bool, -``` - -Source of truth `sdks/rust/golem-rust/wit/deps/golem-tool/common.wit`; all 9 -copies synced via `cargo make wit`. - -### F0.4 — Subtree descriptor + graft (D6), exact shape - -A trait associated fn with `where Self: Sized` is **not** callable from a bare -trait path (`::…` needs a concrete `Self`), so the descriptor -cannot be a trait method that the parent reaches via the subtree trait path -(oracle blocker 1). Instead, `#[tool_definition] trait T` emits a **module-level -free function** with a deterministic name derived from the trait ident: - -```rust -#[doc(hidden)] -pub fn __golem_tool_descriptor_for_T( - ctx: &mut golem_rust::agentic::ToolBuildCtx, -) -> Result; -``` - -It also adds two hidden trait items so the `#[tool_implementation]` ctor and the -"must be implemented" check work exactly like agents: - -```rust -#[doc(hidden)] -fn __tool_descriptor() -> golem_rust::agentic::ExtendedToolType where Self: Sized { // delegates to the free fn - __golem_tool_descriptor_for_T(&mut golem_rust::agentic::ToolBuildCtx::new()) - .expect("tool descriptor build failed") -} -#[doc(hidden)] -fn tool_implementation_annotation() where Self: Sized; // forces #[tool_implementation] -``` - -`#[tool_implementation]` emits (via the re-exported `ctor`, like agents): - -```rust -::golem_rust::ctor::__support::ctor_parse!( - #[ctor] fn __register_tool_() { - golem_rust::agentic::register_tool(::__tool_descriptor()); - } -); -``` - -Because the ctor exists only on implemented types, an unimplemented tool is never -registered (D1). A subtree-only trait without its own `#[tool_implementation]` is -never a top-level tool (no ctor → not registered), but its free descriptor fn is -still reachable for grafting. - -**Subtree resolution.** A method annotated `#[command(subtree = path::Remote)]` -(optionally `subtree = path::Remote, name = "remote"`) is rewritten by the parent -macro to call the child's free descriptor fn: it maps the path's last segment -`Remote` → `__golem_tool_descriptor_for_Remote` and calls -`path::__golem_tool_descriptor_for_Remote(ctx)`, threading the same `ctx`. - -**`ToolBuildCtx`** (blocker 2) carries a recursion stack keyed by descriptor -identity (the free-fn path string) plus command path. Building a child: -- pushes the child identity; if already present, returns - `ToolBuildError::SubtreeCycle(path)` (e.g. `git.remote -> remote.foo -> - git.remote`) — no stack overflow; -- DAG reuse (same child grafted twice) is allowed: each graft **clones** the - child `ExtendedToolType` and **remaps** its command indices and schema - `type-node-index`es into the parent before merging — never shares mutable nodes; -- pops on return. - -**Graft semantics** (blocker 3 — no silent loss): -- The child root command's `body` **must be `None`**; a child root with an - executable body is rejected (`ToolBuildError::SubtreeRootHasBody`). -- The child root's `globals` are **copied onto the graft placeholder node** so - they still apply to all descendants (per WIT recursive-globals semantics). -- The graft node's `name`/`doc`/`aliases`/`annotations` come from the parent - subtree method's `#[command(...)]` when present, otherwise inherit from the - child root. Name/alias uniqueness against siblings is validated after merge. -- The child root's subcommands (index-remapped) become the graft node's - subcommands. -- Child-root-name rule: the child tool's root command name must equal the subtree - method's command name (kebab) unless overridden by `name = "..."`; validated - during the parent descriptor build. - -### F0.5 — Canonical invocation-record field order (D7), restated authoritatively - -The derived invocation record for a command body (used by validation, help, and -future dispatch/codegen) orders fields. Per the WIT, globals declared on a -command apply to that command's **own** body and to all descendants, so the -effective set runs from the root **through the current node inclusive** (oracle -blocker 5): - -1. effective globals, root → current node **inclusive**, at each node - **options then flags** (declaration order within each), -2. body fixed positionals (declaration order), -3. body tail positional (single list-typed field), if any, -4. body options (declaration order), -5. body flags (declaration order). - -Worked example for `git remote add` (3-level): -1. `git` global options, `git` global flags, -2. `remote` global options, `remote` global flags, -3. `add` global options, `add` global flags, -4. `add` fixed positionals, -5. `add` tail positional, -6. `add` body options, -7. `add` body flags. - -Globals are stored **once** in the declaring `command-node.globals` (D8) and are -**never** duplicated into any `command-body.options`/`flags`; the effective view -is derived by walking root→node. A validator rejects a body-local name colliding -with any effective (inherited or own) global. - -### F0.6 — Defaults / `value-is` literals (D9) - -`positional.default`, `option-spec.default`, and `value-is` literals are -`schema-value-tree`s. Macro flow: parse the Rust attr literal → resolve the -referenced arg's `SchemaType` → build a `SchemaValue` → encode with the schema -value encoder → store. Validated against the referenced type node at descriptor -build time. Enum default case names use the canonical kebab casing (F0.8). - -### F0.7 — Error metadata via derive (D10), exact shape - -```rust -#[derive(ToolError)] -enum GrepError { - #[tool_error(kind = "usage-error", exit_code = 2)] BadPattern(String), - #[tool_error(kind = "runtime-error", exit_code = 1)] Io(String), -} -``` - -Generates `impl golem_rust::agentic::ToolErrorSchema for GrepError` exposing per -variant: kebab `name`, `error-kind` (`usage-error`|`runtime-error`), `exit-code` -(`u8`), and the payload `SchemaType`. Tool methods returning `Result` -require `E: ToolErrorSchema + Schema`; the macro reads error cases from -`E::error_cases()`. Payload rules per variant shape (oracle finding 13): -- unit variant → `payload: None`; -- exactly one field (named or unnamed) → payload `SchemaType` from that field via - `Schema::get_type()`; -- two or more fields → **compile error** (no synthetic record in Phase 1–7). - -### F0.8 — Canonical casing (D7/D9, §4.7 stability) - -All tool-facing identifiers are kebab-case, matching the WIT regex -`^[a-z][a-z0-9]*(-[a-z0-9]+)*$`: - -- tool name ← kebab(trait ident); root command name == tool name. -- command name ← kebab(method ident). Implicit body: the method whose snake_case - == tool snake_case is the root body; `commands[0].name == tool.name` is enforced - with a **compile error** on divergence (§5.8.1). -- option long / flag long / positional name ← kebab(param ident). -- error-case name ← kebab(variant ident); enum default case ← kebab(variant). - -### F0.9 — Key-value / repeatable `Map` shaping (D4) + WIT `option-shape` split - -The current WIT `option-shape::repeatable(repeatable-shape{repetition,%type})` -documents `%type` as the **element** of a list-collected option, and a -repeatable default as "a list whose elements are values of `%type`". A -`BTreeMap`-collected repeatable cannot be expressed under that invariant (its -collected value is a `Map`, not a `List`), so Phase 1 **changes the tool WIT** -(`golem:tool` common.wit, in scope of this PR) to model the collected shape -explicitly (oracle blocker 4): - -```wit -variant option-shape { - scalar(type-node-index), - optional-scalar(type-node-index), - repeatable-list(repeatable-list-shape), - repeatable-map(repeatable-map-shape), -} -record repeatable-list-shape { repetition: repetition, item-type: type-node-index } -record repeatable-map-shape { - repetition: repetition, - /// A `SchemaType::Map` node; the collected value is this Map. - map-type: type-node-index, - duplicate-key-policy: duplicate-key-policy, -} -enum duplicate-key-policy { reject, last-wins } -``` - -Shaping rules: -- `BTreeMap` / `HashMap` → `SchemaType::Map { key:String, value:V }`. - Author git's `config` as `BTreeMap` for deterministic order. -- repeatable **scalar** option (`Vec`, grep `-e`): `repeatable-list(item-type = - )`; default is a `List`; collected invocation value is `List`. -- repeatable **key-value** option (git `config` as `BTreeMap`, `-c a=1 -c b=2`): - `repeatable-map(map-type = >, duplicate-key-policy)`; default is a - `Map`; each `-c k=v` contributes one entry; collected invocation value is - the merged `Map`. Never `list`. -- Defaults and `value-is` for each shape are values of the **collected** type - (`List` resp. `Map`), consistent with D9 and the WIT invariant. For a - `value-is` naming a `repeatable-list`, the literal is an element value (any - occurrence equals it); for `repeatable-map`, the literal is an entry value. - -### F0.10 — Runtime mirror targets (Phase 2), grounded - -Mirror the agent pattern 1:1, with one deviation: the tool registry is -**deterministic** (Phase 6 snapshots `discover-tools`), so it stores tools in a -`BTreeMap` (not the agent `HashMap`) and -`get_all_tools()` returns them sorted by root command name. Duplicate -registration of the same tool name **panics** with a clear message (catches two -impls for one tool) — oracle finding 12. -- `agent_registry.rs` (`static mut STATE`, `get_state()`, `register_agent_type`, - `get_all_agent_types`) → `tool_registry.rs` (`register_tool`, `get_all_tools`, - `get_tool_by_name`). -- `extended_agent_type.rs` (`ExtendedAgentType::to_agent_type()` merging per-method - `SchemaGraph`s via `merge_agent_graphs` + `GraphEncoder`) → `extended_tool_type.rs` - (`ExtendedToolType::to_tool()` merging per-arg graphs into one `tool.schema`, - building the flattened command tree, **no synthetic input-record node**). -- `tool_impl.rs` `discover_tools`/`get_tool` wired to the registry (currently a - placeholder returning empty / `InvalidToolName`). - -## Risks - -- Phase 1 cross-cuts `golem-schema` + protobuf + the `golem-core-v2` WIT + all - four SDK codecs. The numeric wire-format change is a versioned evolution (not - byte-identical to the current payloadless numeric cases); golden vectors and - decoder normalization guard byte-equivalence. -- Subtree assembly is a runtime merge, not macro-time. The `#[command(subtree=…)]` - authoring syntax and child-root-name rule must be settled in Phase 0 before the - git example can be implemented. -- The `Option` form depends on the normalization invariant - (D2) to keep derived `Eq` and §4.7 byte-equivalence correct; `Some(empty)` must - never be constructible. From 3749935162ca3bac69700280672ece6a435f805e Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Sun, 28 Jun 2026 09:22:55 +0200 Subject: [PATCH 07/11] Fix --- golem-service-base/src/custom_api/mod.rs | 50 +++++++++++++++++++----- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/golem-service-base/src/custom_api/mod.rs b/golem-service-base/src/custom_api/mod.rs index 7e298030ba..575164f188 100644 --- a/golem-service-base/src/custom_api/mod.rs +++ b/golem-service-base/src/custom_api/mod.rs @@ -87,16 +87,46 @@ impl From<&PathSegmentType> for SchemaType { match value { PathSegmentType::Str => SchemaType::String { metadata }, PathSegmentType::Chr => SchemaType::Char { metadata }, - PathSegmentType::F64 => SchemaType::F64 { metadata }, - PathSegmentType::F32 => SchemaType::F32 { metadata }, - PathSegmentType::U64 => SchemaType::U64 { metadata }, - PathSegmentType::S64 => SchemaType::S64 { metadata }, - PathSegmentType::U32 => SchemaType::U32 { metadata }, - PathSegmentType::S32 => SchemaType::S32 { metadata }, - PathSegmentType::U16 => SchemaType::U16 { metadata }, - PathSegmentType::S16 => SchemaType::S16 { metadata }, - PathSegmentType::U8 => SchemaType::U8 { metadata }, - PathSegmentType::S8 => SchemaType::S8 { metadata }, + PathSegmentType::F64 => SchemaType::F64 { + restrictions: None, + metadata, + }, + PathSegmentType::F32 => SchemaType::F32 { + restrictions: None, + metadata, + }, + PathSegmentType::U64 => SchemaType::U64 { + restrictions: None, + metadata, + }, + PathSegmentType::S64 => SchemaType::S64 { + restrictions: None, + metadata, + }, + PathSegmentType::U32 => SchemaType::U32 { + restrictions: None, + metadata, + }, + PathSegmentType::S32 => SchemaType::S32 { + restrictions: None, + metadata, + }, + PathSegmentType::U16 => SchemaType::U16 { + restrictions: None, + metadata, + }, + PathSegmentType::S16 => SchemaType::S16 { + restrictions: None, + metadata, + }, + PathSegmentType::U8 => SchemaType::U8 { + restrictions: None, + metadata, + }, + PathSegmentType::S8 => SchemaType::S8 { + restrictions: None, + metadata, + }, PathSegmentType::Bool => SchemaType::Bool { metadata }, PathSegmentType::Enum(cases) => SchemaType::Enum { cases: cases.clone(), From f4077db3adefe8e7f525c9834ee4b8b7c298353e Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 29 Jun 2026 19:42:15 +0200 Subject: [PATCH 08/11] Made implicit body usable on all sub-levels --- .../golem-rust-macro/src/tool/descriptor.rs | 349 +++- .../src/agentic/extended_tool_type.rs | 798 ++++++++- sdks/rust/golem-rust/tests/tool.rs | 1565 ++++++++++++++++- sdks/rust/golem-rust/tests/tool_canonical.rs | 146 +- 4 files changed, 2729 insertions(+), 129 deletions(-) diff --git a/sdks/rust/golem-rust-macro/src/tool/descriptor.rs b/sdks/rust/golem-rust-macro/src/tool/descriptor.rs index 1c06801f7b..78c1d7d1e5 100644 --- a/sdks/rust/golem-rust-macro/src/tool/descriptor.rs +++ b/sdks/rust/golem-rust-macro/src/tool/descriptor.rs @@ -82,6 +82,15 @@ pub fn synthesize_descriptor_fn(ir: &ToolDefinitionIr) -> Result = ::std::vec::Vec::new(); commands.push(#root_node); + ctx.apply_pending_graft_root(&mut commands[0])?; + { + let __root_name = commands[0].name.clone(); + golem_rust::agentic::reconcile_command_inherited_globals( + &mut commands[0], + ctx.inherited_globals(), + &__root_name, + )?; + } #(#links)* let mut __tool = golem_rust::agentic::ExtendedToolType { version: #version, @@ -106,8 +115,10 @@ struct Plan { tool_name: String, /// Index of the implicit-body method (`kebab(method) == tool name`), if any. root_idx: Option, - /// Long names + aliases of the root command's globals; descendant commands - /// must not re-project these (they are inherited by walking root→node). + /// Long names + aliases of the root command's globals. A leaf command that + /// re-declares one of these is lowered through an inherited-tail surrogate + /// when it is an explicit tail; all other inherited-global de-projection and + /// tail re-inference is performed at runtime by `normalize_inherited_globals`. root_global_names: BTreeSet, } @@ -278,18 +289,24 @@ fn build_leaf_link(cmd: &CommandIr, plan: &Plan) -> Result { }) } -/// Emits the block that builds a child descriptor, grafts it as a pure -/// dispatcher, prepends the subtree method's params as placeholder globals, and -/// links it under root. +/// Emits the block that builds a child descriptor, grafts it under root, and +/// links it. The subtree method's params are passed as `parent_globals` so +/// `graft_subtree` reconciles the grafted root's body/globals against them and +/// prepends them as propagating globals for descendant subcommands. fn build_subtree_link(cmd: &CommandIr, plan: &Plan) -> Result { let subtree = cmd.subtree.as_ref().expect("subtree present"); let call_path = subtree_call_path(&subtree.path)?; let expected_name = command_name(cmd, &plan.tool_name, false); + let grafted_name = subtree + .name_override + .clone() + .unwrap_or_else(|| expected_name.clone()); let override_name = match &subtree.name_override { Some(n) => quote! { ::std::option::Option::Some(#n.to_string()) }, None => quote! { ::std::option::Option::None }, }; + let override_name_for_ctx = override_name.clone(); let override_doc = if cmd.doc == DocIr::default() { quote! { ::std::option::Option::None } } else { @@ -303,17 +320,19 @@ fn build_subtree_link(cmd: &CommandIr, plan: &Plan) -> Result opts.push(spec), Projection::Flag(spec) => flags.push(spec), @@ -328,31 +347,74 @@ fn build_subtree_link(cmd: &CommandIr, plan: &Plan) -> Result __globals, + ::std::result::Result::Err(__err) => { + if let ::std::result::Result::Err(__root_err @ golem_rust::agentic::ToolBuildError::SubtreeRootNameMismatch { .. }) = ctx.with_graft_root( + #expected_name.to_string(), + #override_name_for_ctx, + |ctx| #call_path(ctx), + ) { + return ::std::result::Result::Err(__root_err); + } + return ::std::result::Result::Err(__err); + } + }; + let mut __child_inherited_globals = __strict_ancestor_globals.clone(); + __child_inherited_globals.extend( + __surviving_parent_globals + .options + .iter() + .cloned() + .map(golem_rust::agentic::EffectiveCommandField::Option), + ); + __child_inherited_globals.extend( + __surviving_parent_globals + .flags + .iter() + .cloned() + .map(golem_rust::agentic::EffectiveCommandField::Flag), + ); + let __child = ctx.with_graft_root( + #expected_name.to_string(), + #override_name_for_ctx, + |ctx| ctx.with_inherited_globals(__child_inherited_globals, |ctx| #call_path(ctx)), + )?; + let __graft = golem_rust::agentic::graft_subtree( __child, #expected_name, + __parent_globals, + &__strict_ancestor_globals, #override_name, #override_doc, #override_aliases, ::std::option::Option::None, )?; - // The subtree method's own params become propagating globals on the - // graft placeholder (index 0), prepended ahead of any globals the - // child root already carries. Reconciliation against inherited - // globals (root + ancestor subtree globals) happens once over the - // whole tree in `normalize_inherited_globals`. - { - let __placeholder = &mut __graft[0]; - let mut __opts: ::std::vec::Vec = - ::std::vec![ #(#opts),* ]; - let mut __flags: ::std::vec::Vec = - ::std::vec![ #(#flags),* ]; - __opts.append(&mut __placeholder.globals.options); - __placeholder.globals.options = __opts; - __flags.append(&mut __placeholder.globals.flags); - __placeholder.globals.flags = __flags; - } let __off = golem_rust::agentic::append_grafted_subtree(&mut commands, __graft); commands[0].subcommands.push(__off); } @@ -399,12 +461,23 @@ fn build_command_node( let mut body_flags = Vec::new(); let mut stdin: Option = None; let mut stdout: Option = None; + // (declaration index, long name) of every body option, in declaration order. + // Used to anchor a demoted tail's reconstructed option in declaration order at + // runtime (see `build_positional_plan` / `reinfer_body_tail`). + let mut body_option_decls: Vec<(usize, String)> = Vec::new(); // The last *positional-eligible* parameter is the only one eligible to // become a tail positional by inference: `Vec` at tail → tail positional, - // `Vec` elsewhere → repeatable option (§5.8). Globals, options, flags, - // streams, and de-projected inherited globals are never positionals, so they - // must not block tail inference for a `Vec` that precedes them. + // `Vec` elsewhere → repeatable option (§5.8). Globals, options, flags, and + // streams are never positionals, so they don't block tail inference. + // + // Tail inference deliberately ignores `inherited_globals`: whether an + // inherited re-declaration actually survives de-projection depends on the + // composition this descriptor is grafted into (a child root global can itself + // be de-projected against a strict ancestor, possibly through an alias), which + // is only known at runtime. So the macro emits the natural declaration-order + // shape, and `normalize_inherited_globals` re-infers the tail + // (`reinfer_body_tail`) once the surviving inherited set is known. let last_value_idx = cmd .params .iter() @@ -412,7 +485,32 @@ fn build_command_node( .rev() .find_map(|(idx, param)| { let arg = arg_for(cmd, ¶m.ident); - if is_positional_candidate(param, arg, is_root, inherited_globals) { + if is_positional_candidate(param, arg) { + Some(idx) + } else { + None + } + }); + + // The last positional-eligible parameter that is *not* a macro-known inherited + // re-declaration. When inherited re-declarations follow an inferred `Vec`, + // they de-project at runtime (a value the runtime drops must not steal the + // tail slot), leaving that `Vec` as the genuine tail. Emitting it as the + // tail directly — rather than as a repeatable-list option repaired afterwards + // — lets tail-only attributes (`separator`, occurrence `min`/`max`, ...) + // validate against the surface the parameter will actually have. The runtime + // finalizer (`reinfer_body_tail`) demotes it back to a repeatable-list option + // if a follower instead survives de-projection. + let last_non_inherited_idx = cmd + .params + .iter() + .enumerate() + .rev() + .find_map(|(idx, param)| { + let arg = arg_for(cmd, ¶m.ident); + let is_inherited = + !is_root && repeats_inherited_global(¶m.ident, arg, inherited_globals); + if is_positional_candidate(param, arg) && !is_inherited { Some(idx) } else { None @@ -437,8 +535,16 @@ fn build_command_node( // not constrain (or be constrained by) the genuine body positionals. let is_inherited = !is_root && repeats_inherited_global(¶m.ident, arg, inherited_globals); - let is_last_param = Some(idx) == last_value_idx; - match classify(¶m.ident, ¶m.ty, arg, is_global, is_last_param)? { + // Emit this parameter as the tail when it is the last positional-eligible + // parameter, or — when only inherited re-declarations follow it — the last + // *non-inherited* `Vec` whose tail form is representable. See + // `last_non_inherited_idx`. + let emit_as_tail = Some(idx) == last_value_idx + || (Some(idx) == last_non_inherited_idx + && last_non_inherited_idx != last_value_idx + && arg.and_then(|a| a.placement).is_none() + && vec_tail_representable(¶m.ty, arg)); + match classify(¶m.ident, ¶m.ty, arg, is_global, emit_as_tail)? { Projection::Stdin(spec) => { if stdin.is_some() { return Err(Error::new( @@ -461,6 +567,7 @@ fn build_command_node( if is_global { global_options.push(spec); } else { + body_option_decls.push((idx, to_kebab_case(¶m.ident.to_string()))); body_options.push(spec); } } @@ -531,6 +638,7 @@ fn build_command_node( ) })?; let name = to_kebab_case(¶m.ident.to_string()); + body_option_decls.push((idx, name.clone())); body_options.push(inherited_tail_option_surrogate_tokens(&name, item, arg)?); continue; } @@ -548,6 +656,7 @@ fn build_command_node( let constraints = build_constraints(cmd)?; let (result_spec, errors) = build_result(cmd)?; let annotations = build_annotations(cmd.annotations.as_ref()); + let positional_plan = build_positional_plan(cmd, &body_option_decls)?; let tail_tokens = match tail { Some(t) => quote! { ::std::option::Option::Some(#t) }, @@ -576,6 +685,7 @@ fn build_command_node( result: #result_spec, errors: #errors, annotations: #annotations, + positional_plan: ::std::vec![ #(#positional_plan),* ], } }; @@ -594,20 +704,153 @@ fn build_command_node( }) } -/// Whether a parameter is eligible to become a positional (fixed or tail), and -/// therefore participates in "last positional → tail" inference. Globals, -/// options, flags, streams, and de-projected inherited globals are excluded -/// because none of them can ever be a positional. -fn is_positional_candidate( - param: &crate::tool::ir::ParamIr, - arg: Option<&ArgIr>, - is_root: bool, - inherited_globals: &BTreeSet, -) -> bool { - if is_stream_type(¶m.ty) { +/// Records every positional-eligible parameter, in declaration order, as a +/// [`PositionalCandidate`] so the runtime can finalize the tail positional after +/// inherited-global de-projection (see `reinfer_body_tail`). +/// +/// Inherited re-declarations are deliberately *included*: whether one actually +/// survives de-projection is only known at runtime (a child root global may +/// itself be de-projected against a strict ancestor, possibly through an alias), +/// so the plan describes the command exactly as authored and lets the runtime +/// decide which candidates survive. +/// +/// A scalar, or an explicit `positional`, can never be the tail and is a `Plain` +/// candidate. A `Vec` is a `VecCandidate` carrying the authored facts the +/// runtime needs to repair the surface. An *inferred* candidate emits no alternate +/// lowered spec — the runtime reconstructs the other surface from the in-body spec +/// (the only surface Rust typechecks). An *explicit* tail additionally carries its +/// full authored tail spec in `authored_tail_surrogate`: that spec is unambiguous +/// (occurrence `min`/`max`, valid tail-only attrs) and already typechecks as a +/// normal tail, so emitting it as data is safe and lets the runtime install it +/// losslessly when the surrogate option is promoted back to the tail. +/// +/// `body_option_decls` is the `(declaration index, long name)` of every body +/// option, used to compute each `Vec` candidate's `later_option_names` anchors +/// for declaration-order re-insertion on demotion. +fn build_positional_plan( + cmd: &CommandIr, + body_option_decls: &[(usize, String)], +) -> Result, Error> { + let mut plan = Vec::new(); + for (idx, param) in cmd.params.iter().enumerate() { + let arg = arg_for(cmd, ¶m.ident); + // Eligibility uses the natural (no-inheritance) shape, matching the + // tail-inference candidate set in `build_command_node`. + if !is_positional_candidate(param, arg) { + continue; + } + let name = to_kebab_case(¶m.ident.to_string()); + // `Option>` (an optional `Vec`) — never representable as a tail. + let optional_vec = unwrap_generic1(¶m.ty, "Option") + .is_some_and(|inner| unwrap_generic1(inner, "Vec").is_some()); + let base = unwrap_generic1(¶m.ty, "Option").unwrap_or(¶m.ty); + let vec_item = unwrap_generic1(base, "Vec"); + + // An explicit positional, or a non-`Vec` scalar, can never be the tail; + // it is recorded only because, when it survives, it keeps an earlier + // `Vec` out of tail position. + if arg.and_then(|a| a.placement) == Some(ArgPlacement::Positional) || vec_item.is_none() { + plan.push(quote! { + golem_rust::agentic::PositionalCandidate::Plain { name: #name.to_string() } + }); + continue; + } + let explicit_tail = arg.and_then(|a| a.placement) == Some(ArgPlacement::Tail); + let has_min_or_max_attr = arg.is_some_and(|a| a.raw_min.is_some() || a.raw_max.is_some()); + // Body options declared after this `Vec`, in declaration order. + let later_option_names = body_option_decls + .iter() + .filter(|(decl_idx, _)| *decl_idx > idx) + .map(|(_, long)| quote! { #long.to_string() }); + + let explicit_tail_tok = if explicit_tail { + quote! { true } + } else { + quote! { false } + }; + let optional_vec_tok = if optional_vec { + quote! { true } + } else { + quote! { false } + }; + let has_min_or_max_tok = if has_min_or_max_attr { + quote! { true } + } else { + quote! { false } + }; + // An explicit tail records its full authored spec so the runtime can + // install it verbatim if it was lowered to a surrogate option and later + // promoted back to the tail (the surrogate option cannot hold tail-only + // attrs). The spec is the same tokens `classify` emits for a normal tail + // and so is already known to typecheck. Inferred candidates carry `None` + // and use the reconstruct-from-spec path. + let authored_tail_surrogate_tok = match (explicit_tail, vec_item) { + (true, Some(item)) => { + let tail_spec = tail_tokens(&name, item, arg)?; + quote! { ::std::option::Option::Some(::std::boxed::Box::new(#tail_spec)) } + } + _ => quote! { ::std::option::Option::None }, + }; + plan.push(quote! { + golem_rust::agentic::PositionalCandidate::VecCandidate { + name: #name.to_string(), + explicit_tail: #explicit_tail_tok, + optional_vec: #optional_vec_tok, + has_min_or_max_attr: #has_min_or_max_tok, + authored_tail_surrogate: #authored_tail_surrogate_tok, + later_option_names: ::std::vec![ #(#later_option_names),* ], + } + }); + } + Ok(plan) +} + +/// Whether an inferred `Vec` parameter can be represented as a tail positional +/// (so the caller may emit it as the tail when only inherited re-declarations +/// follow it). Mirrors the macro-time checks in [`vec_tail_spec`]. +fn vec_tail_representable(ty: &Type, arg: Option<&ArgIr>) -> bool { + if unwrap_generic1(ty, "Option").is_some() { return false; } - if !is_root && repeats_inherited_global(¶m.ident, arg, inherited_globals) { + match unwrap_generic1(ty, "Vec") { + Some(item) => vec_tail_spec("__probe", item, false, arg).is_ok(), + None => false, + } +} + +/// The tail-positional spec for a `Vec` candidate, or the macro error +/// explaining why it cannot be a tail (an `Option>`, or option-only +/// `#[arg]` attributes such as `short`). +fn vec_tail_spec( + name: &str, + item: &Type, + optional: bool, + arg: Option<&ArgIr>, +) -> Result { + if optional { + return Err(Error::new( + arg.map(|a| a.param.span()) + .unwrap_or_else(proc_macro2::Span::call_site), + "a tail positional must not be `Option<_>`; use `Vec` (an empty tail already means none supplied)", + )); + } + if let Some(arg) = arg { + reject_unconsumed_structural_attrs(arg, SurfaceKind::Tail)?; + } + tail_tokens(name, item, arg) +} + +/// Whether a parameter is eligible to become a positional (fixed or tail) in the +/// command's natural shape, and therefore participates in "last positional → +/// tail" inference. Globals, options, flags, and streams are excluded because +/// none of them can ever be a positional. +/// +/// Inherited-global re-declarations are deliberately *not* excluded: whether one +/// survives de-projection is only known at runtime, so the natural shape treats +/// them like any other parameter and the runtime (`reinfer_body_tail`) decides +/// which candidates survive. +fn is_positional_candidate(param: &crate::tool::ir::ParamIr, arg: Option<&ArgIr>) -> bool { + if is_stream_type(¶m.ty) { return false; } match arg.and_then(|a| a.placement) { @@ -848,7 +1091,7 @@ fn classify( ty: &Type, arg: Option<&ArgIr>, is_global: bool, - is_last_param: bool, + emit_as_tail: bool, ) -> Result { let name = to_kebab_case(&ident.to_string()); @@ -972,9 +1215,13 @@ fn classify( // Tail positional: explicit `#[arg(... = "tail")]`, or — following the // uniform projection rule (§5.8) "`Vec` at tail → tail positional, - // `Vec` elsewhere → repeatable option" — an unmarked `Vec` that is the - // last value parameter (streams and inherited globals don't count). - let infer_tail = surface.is_none() && !is_global && vec_item.is_some() && is_last_param; + // `Vec` elsewhere → repeatable option" — an unmarked `Vec` the caller + // asks to emit as the tail (`emit_as_tail`). The caller sets that for the last + // positional-eligible parameter, and for the last *non-inherited* `Vec` + // when only inherited re-declarations follow it (they de-project at runtime, + // leaving this `Vec` the genuine tail; the runtime finalizer demotes it + // back to a repeatable-list option if a follower instead survives). + let infer_tail = surface.is_none() && !is_global && vec_item.is_some() && emit_as_tail; if matches!(surface, Some(ArgPlacement::Tail)) || infer_tail { // A tail positional is inherently variadic (zero or more), and // `ExtendedTailPositional` (like the WIT `tail-positional`) has no diff --git a/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs index 3bb958bc8a..7ac9fabb7f 100644 --- a/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs +++ b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs @@ -56,6 +56,77 @@ pub struct ExtendedCommandBody { pub result: Option, pub errors: Vec, pub annotations: Option, + /// The body's positional-eligible parameters, in declaration order, used to + /// finalize the tail positional after inherited-global de-projection (see + /// [`reinfer_body_tail`]). The final surface of a `Vec` candidate (tail + /// positional vs repeatable-list option) depends on which following + /// re-declarations survive composition, so the macro records the authored + /// facts needed to finalize it; an explicit tail additionally carries its full + /// authored spec so promotion is lossless. Empty for hand-built bodies and + /// ignored by canonical conversion. + pub positional_plan: Vec, +} + +/// One positional-eligible parameter of a command body, recorded by the macro in +/// declaration order so the runtime can finalize the tail positional after +/// inherited-global de-projection. See [`ExtendedCommandBody::positional_plan`] +/// and [`reinfer_body_tail`]. +#[derive(Clone, Debug)] +pub enum PositionalCandidate { + /// A parameter that can never be the tail (a fixed scalar positional, or an + /// explicit `#[arg(... = "positional")]`). It is recorded only so the + /// declaration order of surviving candidates is known. + Plain { name: String }, + /// A `Vec` whose final surface — the tail positional or a repeatable-list + /// option — depends on which following re-declarations survive de-projection + /// (§5.8: the *last* positional `Vec` is the tail, an earlier one is a + /// repeatable-list option). The macro emits only the selected surface into the + /// body. When demoting an inferred tail to an option the finalizer + /// reconstructs it by copying the in-body spec (the value graph carries over + /// unchanged), using these authored facts to reject a re-projection the target + /// surface cannot represent. An explicit tail instead carries its full + /// authored spec in `authored_tail_surrogate`, so promoting it back from a + /// surrogate option is lossless. + VecCandidate { + name: String, + /// Whether the tail was explicitly authored (`#[arg(... = "tail")]`); an + /// explicit tail is never silently demoted to a repeatable-list option. + explicit_tail: bool, + /// Whether the parameter was `Option>`; it can never become the + /// tail (a tail is already variadic and has no representable absent state). + optional_vec: bool, + /// Whether `min`/`max` were authored. They are overloaded — occurrence + /// bounds on a tail, item numeric bounds on a repeatable-list option — so + /// an *inferred* candidate carrying them cannot switch surface without + /// changing their meaning, and re-projection is rejected rather than + /// silently reinterpreted. (Ignored for an explicit tail, whose authored + /// occurrence bounds are preserved verbatim via `authored_tail_surrogate`.) + has_min_or_max_attr: bool, + /// For an explicit `#[arg(... = "tail")]` that the macro lowered to an + /// inherited-global option surrogate (so it would not steal a genuine tail + /// slot before de-projection): the full authored tail spec. When the + /// surrogate survives and becomes the last positional, the finalizer + /// installs this verbatim instead of reconstructing a tail from the option + /// (which has no `separator`/`verbatim`/`accepts_stdio`/occurrence-bound + /// fields). `None` for inferred candidates, which keep the + /// reconstruct-from-spec path. Boxed to keep this variant compact. + authored_tail_surrogate: Option>, + /// Long names of the body options declared after this `Vec`, in + /// declaration order. When this candidate is demoted from the tail to a + /// repeatable-list option, it is inserted before the first of these that + /// survived de-projection (preserving declaration order, §D7); otherwise + /// it is appended. + later_option_names: Vec, + }, +} + +impl PositionalCandidate { + fn name(&self) -> &str { + match self { + PositionalCandidate::Plain { name } + | PositionalCandidate::VecCandidate { name, .. } => name, + } + } } #[derive(Clone, Debug, Default)] @@ -233,7 +304,6 @@ pub enum ToolBuildError { value: String, }, SubtreeCycle(String), - SubtreeRootHasBody(String), SubtreeRootNameMismatch { expected: String, actual: String, @@ -275,6 +345,12 @@ pub enum ToolBuildError { min: u32, max: u32, }, + RequiredPositionalAfterOptional(String), + FixedPositionalAfterTail(String), + VecSurfaceConflict { + name: String, + reason: String, + }, } impl Display for ToolBuildError { @@ -298,14 +374,13 @@ impl Display for ToolBuildError { write!(f, "invalid {kind}: {value:?}") } ToolBuildError::SubtreeCycle(s) => write!(f, "subtree cycle detected: {s}"), - ToolBuildError::SubtreeRootHasBody(s) => write!(f, "subtree root has a body: {s}"), ToolBuildError::SubtreeRootNameMismatch { expected, actual } => write!( f, "subtree root name {actual:?} does not match the parent command name {expected:?}" ), ToolBuildError::SubtreeAnnotationsUnsupported(s) => write!( f, - "annotations are not supported on the pure-dispatcher subtree command {s:?} (the model places command-annotations on a command body)" + "annotations are not supported on a #[command(subtree = ...)] method {s:?} (the model places command-annotations on a command body)" ), ToolBuildError::DuplicateName(s) => write!(f, "duplicate tool metadata name: {s}"), ToolBuildError::DuplicateShort(c) => write!(f, "duplicate short form: {c:?}"), @@ -372,6 +447,21 @@ impl Display for ToolBuildError { "tail positional {name:?} has an impossible occurrence range: min {min} is greater \ than max {max}" ), + ToolBuildError::RequiredPositionalAfterOptional(name) => write!( + f, + "required positional {name:?} cannot appear after an optional positional; optional \ + positionals must be trailing" + ), + ToolBuildError::FixedPositionalAfterTail(name) => write!( + f, + "fixed positional {name:?} cannot appear after a tail positional; the tail \ + positional must be the last positional" + ), + ToolBuildError::VecSurfaceConflict { name, reason } => write!( + f, + "the `Vec<_>` parameter {name:?} cannot be re-projected after inherited-global \ + de-projection: {reason}" + ), } } } @@ -1460,6 +1550,13 @@ fn check_body( register_flag_scope(&mut scope, flag); } + // Optional fixed positionals must be trailing: once an optional one appears, + // no required one may follow, or the boundary between them is ambiguous. The + // macro enforces this for locally declared positionals, but inherited-global + // de-projection can leave a re-declared optional positional local at runtime + // (its inherited global is itself de-projected against a strict ancestor), so + // the surviving order is re-checked here. + let mut saw_optional_positional = false; for positional in &body.positionals.fixed { check_identifier("positional name", &positional.name)?; check_graph_closed( @@ -1476,6 +1573,15 @@ fn check_body( positional.name.clone(), )); } + if positional.required { + if saw_optional_positional { + return Err(ToolBuildError::RequiredPositionalAfterOptional( + positional.name.clone(), + )); + } + } else { + saw_optional_positional = true; + } } if let Some(tail) = &body.positionals.tail { @@ -1853,7 +1959,16 @@ fn render_flag_help(f: &FlagSpec, global: bool) -> String { pub struct ToolBuildCtx { stack: Vec, command_path: Vec, + inherited_globals: Vec, + graft_roots: Vec, } + +#[derive(Clone)] +struct PendingGraftRoot { + expected_name: String, + override_name: Option, +} + impl ToolBuildCtx { pub fn new() -> Self { Self::default() @@ -1901,6 +2016,52 @@ impl ToolBuildCtx { self.pop_descriptor(); result } + pub fn inherited_globals(&self) -> &[EffectiveCommandField] { + &self.inherited_globals + } + pub fn with_inherited_globals( + &mut self, + globals: Vec, + f: impl FnOnce(&mut Self) -> Result, + ) -> Result { + let old_len = self.inherited_globals.len(); + self.inherited_globals.extend(globals); + let result = f(self); + self.inherited_globals.truncate(old_len); + result + } + pub fn with_graft_root( + &mut self, + expected_name: String, + override_name: Option, + f: impl FnOnce(&mut Self) -> Result, + ) -> Result { + self.graft_roots.push(PendingGraftRoot { + expected_name, + override_name, + }); + let result = f(self); + self.graft_roots.pop(); + result + } + pub fn apply_pending_graft_root( + &self, + root: &mut ExtendedCommandNode, + ) -> Result<(), ToolBuildError> { + let Some(pending) = self.graft_roots.last() else { + return Ok(()); + }; + if pending.override_name.is_none() && root.name != pending.expected_name { + return Err(ToolBuildError::SubtreeRootNameMismatch { + expected: pending.expected_name.clone(), + actual: root.name.clone(), + }); + } + if let Some(name) = &pending.override_name { + root.name = name.clone(); + } + Ok(()) + } fn cycle_path(&self, repeated: &str) -> String { let mut chain: Vec<&str> = self.stack.iter().map(String::as_str).collect(); chain.push(repeated); @@ -1920,17 +2081,47 @@ pub trait ToolDefinitionDescriptor { fn metadata(ctx: &mut ToolBuildCtx) -> Result; } +pub fn reconcile_subtree_parent_globals( + mut parent_globals: ExtendedGlobals, + strict_ancestor_globals: &[EffectiveCommandField], + command_name: &str, +) -> Result { + reconcile_globals(&mut parent_globals, strict_ancestor_globals, command_name)?; + Ok(parent_globals) +} + +pub fn reconcile_command_inherited_globals( + node: &mut ExtendedCommandNode, + strict_ancestor_globals: &[EffectiveCommandField], + command_name: &str, +) -> Result<(), ToolBuildError> { + reconcile_globals(&mut node.globals, strict_ancestor_globals, command_name)?; + if let Some(body) = node.body.as_mut() { + reconcile_body(body, strict_ancestor_globals, command_name)?; + } + Ok(()) +} + /// Turn a child subtree's command list into the graft-local nodes to splice -/// beneath a parent. The child root (index 0) becomes the pure-dispatcher -/// placeholder for the parent's subtree command: its `body` must be `None`, its -/// `globals` and `subcommands` are preserved (so recursive globals still apply -/// and the graft-local child indices stay valid), and its `name`/`doc`/ -/// `aliases` may be overridden by the parent's `#[command(...)]`. +/// beneath a parent. The child root (index 0) becomes the parent's subtree +/// command: its `globals` and `subcommands` are preserved (so recursive +/// globals still apply and the graft-local child indices stay valid), and its +/// `name`/`doc`/`aliases` may be overridden by the parent's `#[command(...)]`. +/// +/// The child root may carry a body — the child trait's implicit-body method +/// (e.g. `git stash` runs the `stash` body while `git stash pop` walks to the +/// `pop` child). The subtree method's propagating params (`parent_globals`) +/// are first reconciled against `strict_ancestor_globals`, then the child root's +/// own globals and body are reconciled against the full inherited set. A +/// compatible same-name re-declaration is de-projected onto the inherited +/// global; an incompatible one is rejected as `InheritedGlobalConflict`. +/// Surviving `parent_globals` are then prepended onto the grafted root's +/// globals so they propagate to every descendant subcommand. /// /// `expected_name` is the parent subtree method's command name; unless an /// explicit `override_name` is given, the child root name must equal it -/// (`SubtreeRootNameMismatch`). Command-annotations are not supported on a pure -/// dispatcher (the model places them on a command body), so a non-`None` +/// (`SubtreeRootNameMismatch`). Command-annotations are not supported on a +/// subtree command (the model places them on a command body), so a non-`None` /// `override_annotations` is rejected rather than silently dropped. /// /// Command indices are returned unchanged (graft-local); the final offset into @@ -1938,6 +2129,8 @@ pub trait ToolDefinitionDescriptor { pub fn graft_subtree( child: ExtendedToolType, expected_name: &str, + parent_globals: ExtendedGlobals, + strict_ancestor_globals: &[EffectiveCommandField], override_name: Option, override_doc: Option, override_aliases: Option>, @@ -1945,9 +2138,6 @@ pub fn graft_subtree( ) -> Result, ToolBuildError> { let mut nodes = child.commands; let root = nodes.first_mut().ok_or(ToolBuildError::EmptyCommandTree)?; - if root.body.is_some() { - return Err(ToolBuildError::SubtreeRootHasBody(root.name.clone())); - } if override_annotations.is_some() { return Err(ToolBuildError::SubtreeAnnotationsUnsupported( override_name.clone().unwrap_or_else(|| root.name.clone()), @@ -1959,6 +2149,8 @@ pub fn graft_subtree( actual: root.name.clone(), }); } + // Apply overrides first so any reconciliation error reports the final + // grafted command name rather than the standalone child root name. if let Some(name) = override_name { root.name = name; } @@ -1968,7 +2160,50 @@ pub fn graft_subtree( if let Some(aliases) = override_aliases { root.aliases = aliases; } - // body stays None; globals and subcommands (graft-local indices) unchanged. + + let command_name = root.name.clone(); + + // The subtree method's params become propagating globals on the grafted + // root. They are inherited from the parent command, so first reconcile them + // against strict ancestors above the graft point, then reconcile the grafted + // root's own globals/body against the full inherited set. Doing both here + // preserves the normal inherited-global contract even though the parent + // globals will be stored as same-node globals on the grafted root. + let parent_globals = + reconcile_subtree_parent_globals(parent_globals, strict_ancestor_globals, &command_name)?; + + let mut inherited = strict_ancestor_globals.to_vec(); + inherited.extend( + parent_globals + .options + .iter() + .cloned() + .map(EffectiveCommandField::Option), + ); + inherited.extend( + parent_globals + .flags + .iter() + .cloned() + .map(EffectiveCommandField::Flag), + ); + + reconcile_globals(&mut root.globals, &inherited, &command_name)?; + if let Some(body) = root.body.as_mut() { + reconcile_body(body, &inherited, &command_name)?; + } + + // Prepend the parent globals so they propagate to every descendant + // subcommand of the grafted root. Globals and subcommands keep their + // graft-local indices; `append_grafted_subtree` shifts them on append. + let mut opts = parent_globals.options; + opts.append(&mut root.globals.options); + root.globals.options = opts; + + let mut flags = parent_globals.flags; + flags.append(&mut root.globals.flags); + root.globals.flags = flags; + Ok(nodes) } @@ -2289,9 +2524,344 @@ fn reconcile_body( body.positionals.tail = Some(tail); } } + + // De-projection may have removed the parameter that was the tail (or a later + // positional that kept an earlier `Vec` out of tail position), so re-infer + // the tail against the parameters that actually survived. + reinfer_body_tail(body)?; Ok(()) } +/// Finalize a command body's tail positional after [`reconcile_body`] removed the +/// inherited re-declarations that did not survive in scope. +/// +/// The macro emits only each `Vec` candidate's *selected* surface into the body +/// (tail positional or repeatable-list option) and records the candidate, in +/// declaration order, in [`ExtendedCommandBody::positional_plan`] (§5.8: the +/// *last* positional `Vec` is the tail, an earlier one is a repeatable-list +/// option). Because the selection assumed the macro-known inherited +/// re-declarations would de-project, this pass repairs it against the parameters +/// that actually survived. It: +/// +/// * **demotes** an installed tail into a repeatable-list option (reconstructed by +/// copying the tail's value graph) when another positional survived after it — +/// rejecting an explicitly authored tail, or an inferred tail carrying +/// occurrence bounds / tail-only attributes a repeatable-list option cannot +/// represent; and +/// * **promotes** the last surviving `Vec` candidate's repeatable-list option +/// into the tail (reconstructed likewise) when its natural tail was +/// de-projected — rejecting one carrying option-only attributes a tail cannot +/// represent. +/// +/// It is a no-op for hand-built bodies (empty plan) and whenever the natural tail +/// is already the last surviving positional. +fn reinfer_body_tail(body: &mut ExtendedCommandBody) -> Result<(), ToolBuildError> { + if body.positional_plan.is_empty() { + return Ok(()); + } + // The last surviving positional-eligible candidate, in declaration order. + let mut last = None; + for (idx, candidate) in body.positional_plan.iter().enumerate() { + if body_contains_positional(body, candidate.name()) { + last = Some(idx); + } + } + let Some(last_idx) = last else { return Ok(()) }; + let last_name = body.positional_plan[last_idx].name().to_string(); + + // An explicitly-authored tail that survives de-projection must be the last + // positional-eligible candidate. If a positional survives after it, its + // authored order is violated — whether it still holds the tail slot or was + // lowered to an inherited-global surrogate option (a form invisible to the + // demote path below, which only sees an installed tail). An explicit tail that + // was de-projected entirely is gone and no longer constrains: a genuine later + // `Vec` tail may legitimately take the slot. + if body.positional_plan[..last_idx].iter().any(|c| { + matches!( + c, + PositionalCandidate::VecCandidate { + explicit_tail: true, + .. + } + ) && body_contains_positional(body, c.name()) + }) { + return Err(ToolBuildError::FixedPositionalAfterTail(last_name)); + } + + // Demote first: an installed inferred tail whose declaration precedes a + // surviving positional is no longer last (§5.8). Doing this before promotion + // means that if the last candidate is itself promoted (and its option removed) + // the demoted option is still inserted relative to the remaining later options. + if let Some(tail_name) = body.positionals.tail.as_ref().map(|t| t.name.clone()) + && let Some(tail_idx) = body + .positional_plan + .iter() + .position(|c| c.name() == tail_name) + && tail_idx < last_idx + { + demote_tail_to_option(body, tail_idx)?; + } + + // Promote: the last surviving candidate must hold the tail slot. When it is a + // `Vec` currently projected as a repeatable-list option (its natural tail + // was de-projected), move it into the tail slot. + if matches!( + body.positional_plan[last_idx], + PositionalCandidate::VecCandidate { .. } + ) { + promote_option_to_tail(body, last_idx)?; + } + Ok(()) +} + +/// Demote the body's installed inferred tail (the candidate at `tail_idx`) into a +/// repeatable-list option, because a positional survives after it. The option is +/// reconstructed from the tail's value graph and inserted in declaration order +/// among the body options. Rejects an inferred tail whose authored occurrence +/// bounds (`min`/`max`) or tail-only attributes a repeatable-list option cannot +/// represent. (An explicit tail before a survivor is rejected earlier, in +/// [`reinfer_body_tail`].) +fn demote_tail_to_option( + body: &mut ExtendedCommandBody, + tail_idx: usize, +) -> Result<(), ToolBuildError> { + let PositionalCandidate::VecCandidate { + name, + has_min_or_max_attr, + later_option_names, + .. + } = &body.positional_plan[tail_idx] + else { + return Ok(()); + }; + let name = name.clone(); + let has_min_or_max_attr = *has_min_or_max_attr; + let later_option_names = later_option_names.clone(); + + // Only act on the candidate that actually holds the tail slot. + if body.positionals.tail.as_ref().map(|t| &t.name) != Some(&name) { + return Ok(()); + } + + // `min`/`max` are overloaded between surfaces — occurrence bounds on a tail, + // item numeric bounds on a repeatable-list option — so a candidate that + // authored either cannot switch surface without changing their meaning. This + // consults the authored fact rather than the materialized tail shape because + // an authored `min = 0` coincides with the tail default and so leaves no trace + // in the tail's `min`/`max` fields. + if has_min_or_max_attr { + return Err(ToolBuildError::VecSurfaceConflict { + name, + reason: "it authored a `min`/`max` bound, which means occurrence count \ + on a tail positional but item count on a repeatable-list \ + option; a parameter now follows it so it must become a \ + repeatable-list option, which would change that meaning" + .to_string(), + }); + } + + let tail = body + .positionals + .tail + .as_ref() + .expect("tail name matched above"); + // A repeatable-list option has no separator/verbatim/stdio handling, so a + // tail using any of those cannot be represented as one. + if tail.separator.is_some() || tail.verbatim || tail.accepts_stdio { + return Err(ToolBuildError::VecSurfaceConflict { + name, + reason: "it has a tail-only attribute (`separator`/`verbatim`/`accepts_stdio`) \ + that a repeatable-list option cannot express, but a parameter now \ + follows it so it must become a repeatable-list option" + .to_string(), + }); + } + + let tail = body + .positionals + .tail + .take() + .expect("tail name matched above"); + let option = ExtendedOptionSpec { + long: tail.name, + short: None, + aliases: Vec::new(), + doc: tail.doc, + value_name: tail.value_name, + shape: ExtendedOptionShape::RepeatableList(ExtendedRepeatableListShape { + repetition: wire::Repetition::Repeated, + item_type: tail.item_type, + }), + default: None, + required: false, + env_var: None, + }; + // §D7: body options are in declaration order. Insert before the first option + // declared after this `Vec` that survived de-projection; otherwise append. + let insert_at = later_option_names + .iter() + .find_map(|later| body.options.iter().position(|o| &o.long == later)); + match insert_at { + Some(pos) => body.options.insert(pos, option), + None => body.options.push(option), + } + Ok(()) +} + +/// Promote the last surviving `Vec` candidate (at `last_idx`) from a +/// repeatable-list option into the tail positional, because its natural tail was +/// de-projected. An explicit tail lowered to an inherited-global surrogate option +/// installs its full authored spec (`authored_tail_surrogate`) verbatim, so its +/// tail-only attributes are preserved; an inferred candidate is reconstructed +/// from the option's value graph instead. A no-op if it already holds the tail +/// slot or never projected to an option; rejects an inferred candidate carrying +/// option-only attributes (or an `Option>`, or authored `min`/`max`) that +/// a tail cannot represent. +fn promote_option_to_tail( + body: &mut ExtendedCommandBody, + last_idx: usize, +) -> Result<(), ToolBuildError> { + let PositionalCandidate::VecCandidate { + name, + optional_vec, + has_min_or_max_attr, + authored_tail_surrogate, + .. + } = &body.positional_plan[last_idx] + else { + return Ok(()); + }; + let name = name.clone(); + let optional_vec = *optional_vec; + let has_min_or_max_attr = *has_min_or_max_attr; + let authored_tail_surrogate = authored_tail_surrogate.clone(); + + // Already the tail (its natural tail survived): nothing to do. + if body + .positionals + .tail + .as_ref() + .is_some_and(|t| t.name == name) + { + return Ok(()); + } + let Some(pos) = body.options.iter().position(|o| o.long == name) else { + return Ok(()); + }; + + // An explicit tail lowered to an inherited-global surrogate option: install + // its full authored spec verbatim. The surrogate option carries none of the + // tail-only fields (`separator`/`verbatim`/`accepts_stdio`/occurrence bounds), + // so reconstructing from it would silently drop them; the authored spec keeps + // them (and any resulting invalid state, e.g. `verbatim` without `separator`, + // is caught later by `validate_tool`). `min`/`max` are already occurrence + // bounds here, so the inferred-only `has_min_or_max_attr` rejection is skipped. + if let Some(authored_tail) = authored_tail_surrogate { + // Defensive against hand-built bodies: confirm the option really is the + // droppable repeatable-list surrogate before replacing it with the tail. + verify_promotable_surrogate(&body.options[pos], &name)?; + body.options.remove(pos); + body.positionals.tail = Some(*authored_tail); + return Ok(()); + } + + // A tail is variadic with no absent state and interprets `min`/`max` as + // occurrence bounds, so these authored shapes cannot move onto a tail. + if optional_vec { + return Err(ToolBuildError::VecSurfaceConflict { + name, + reason: "it is an `Option>`, which has no tail-positional \ + representation, but de-projection made it the last positional \ + so it must become the tail" + .to_string(), + }); + } + if has_min_or_max_attr { + return Err(ToolBuildError::VecSurfaceConflict { + name, + reason: "it has a `min`/`max` bound applied to its items as a \ + repeatable-list option, but de-projection made it the last \ + positional so it must become the tail (where `min`/`max` would \ + instead bound the occurrence count)" + .to_string(), + }); + } + verify_promotable_surrogate(&body.options[pos], &name)?; + + let option = body.options.remove(pos); + let item_type = match option.shape { + ExtendedOptionShape::RepeatableList(list) => list.item_type, + _ => unreachable!("shape checked as RepeatableList above"), + }; + body.positionals.tail = Some(ExtendedTailPositional { + name: option.long, + doc: option.doc, + value_name: option.value_name, + item_type, + min: 0, + max: None, + separator: None, + verbatim: false, + accepts_stdio: false, + }); + Ok(()) +} + +/// Verify that `option` is a droppable repeatable-list surrogate that can take the +/// tail slot: it must carry no option-only surface a tail positional cannot +/// express (`short`/`aliases`/`default`/`required`/`env`), and must be a +/// `RepeatableList` with `Repeated` (non-delimited) repetition. +fn verify_promotable_surrogate( + option: &ExtendedOptionSpec, + name: &str, +) -> Result<(), ToolBuildError> { + if option.short.is_some() + || !option.aliases.is_empty() + || option.default.is_some() + || option.required + || option.env_var.is_some() + { + return Err(ToolBuildError::VecSurfaceConflict { + name: name.to_string(), + reason: "it has an option-only attribute (`short`/`aliases`/`default`/\ + `required`/`env`) that a tail positional cannot express, but \ + de-projection made it the last positional so it must become the tail" + .to_string(), + }); + } + let ExtendedOptionShape::RepeatableList(list) = &option.shape else { + return Err(ToolBuildError::VecSurfaceConflict { + name: name.to_string(), + reason: "it does not project to a repeatable list, so it has no \ + tail-positional representation" + .to_string(), + }); + }; + if !matches!(list.repetition, wire::Repetition::Repeated) { + return Err(ToolBuildError::VecSurfaceConflict { + name: name.to_string(), + reason: "it uses a delimited repetition that a tail positional cannot \ + express, but de-projection made it the last positional so it \ + must become the tail" + .to_string(), + }); + } + Ok(()) +} + +/// Whether the body still carries a positional-eligible parameter with the given +/// surface name (as a fixed positional, the tail, or a repeatable-list option), +/// i.e. it survived de-projection. +fn body_contains_positional(body: &ExtendedCommandBody, name: &str) -> bool { + body.positionals.fixed.iter().any(|p| p.name == name) + || body + .positionals + .tail + .as_ref() + .is_some_and(|t| t.name == name) + || body.options.iter().any(|o| o.long == name) +} + /// Decide the fate of one local declaration against the inherited globals in /// scope. Returns `Ok(true)` when the local is a compatible re-declaration that /// should be removed (the inherited global covers it), `Ok(false)` when no @@ -2330,7 +2900,10 @@ fn reconcile_local( command: command.to_string(), }); } - compatible.push(effective_field_primary_name(inherited)); + let primary = effective_field_primary_name(inherited); + if !compatible.iter().any(|p| p == &primary) { + compatible.push(primary); + } } if compatible.len() > 1 { return Err(ToolBuildError::InheritedGlobalConflict { @@ -2789,6 +3362,7 @@ mod tests { }), errors: vec![], annotations: None, + positional_plan: vec![], }), }, ], @@ -2872,6 +3446,7 @@ mod tests { result: None, errors: vec![], annotations: None, + positional_plan: vec![], }), }, ], @@ -2954,24 +3529,187 @@ mod tests { } #[test] - fn graft_rejects_root_with_body() { - let err = graft_subtree( + fn graft_accepts_root_with_body() { + // A grafted subtree root may carry its own body (the child trait's + // implicit-body method). With no parent globals, the body survives + // unchanged. + let graft = graft_subtree( leaf_tool_with_body(empty_body()), "t", + ExtendedGlobals::default(), + &[], + None, + None, + None, + None, + ) + .unwrap(); + assert!(graft[0].body.is_some(), "grafted root keeps its body"); + } + + #[test] + fn graft_deprojects_child_body_against_parent_globals() { + // The child root body re-declares `verbose` as a string option, which is + // compatible with the parent global of the same name; it is de-projected + // and the parent global is the single source of truth. + let parent_globals = ExtendedGlobals { + options: vec![scalar_opt("verbose", None)], + flags: vec![], + }; + let mut child_body = empty_body(); + child_body.options = vec![scalar_opt("verbose", None)]; + child_body.options[0].doc = doc("local verbose"); + let graft = graft_subtree( + leaf_tool_with_body(child_body), + "t", + parent_globals, + &[], + None, + None, + None, + None, + ) + .unwrap(); + let body = graft[0].body.as_ref().expect("body preserved"); + assert!( + !body.options.iter().any(|o| o.long == "verbose"), + "compatible body option is de-projected onto the parent global" + ); + assert!( + graft[0].globals.options.iter().any(|o| o.long == "verbose"), + "parent global is prepended onto the grafted root globals" + ); + } + + #[test] + fn graft_rejects_incompatible_child_body_vs_parent_global() { + // The child root body declares `verbose` as a string option, but the + // parent global is a bool flag of the same name: incompatible shapes + // are an `InheritedGlobalConflict`, reported against the final grafted + // command name. + let parent_globals = ExtendedGlobals { + options: vec![], + flags: vec![bool_flag("verbose", None)], + }; + let mut child_body = empty_body(); + child_body.options = vec![scalar_opt("verbose", None)]; + let err = graft_subtree( + leaf_tool_with_body(child_body), + "t", + parent_globals, + &[], + None, + None, + None, + None, + ) + .unwrap_err(); + assert!(matches!( + err, + ToolBuildError::InheritedGlobalConflict { name, command, .. } + if name == "verbose" && command == "t" + )); + } + + /// A single-root child whose root carries `globals` (no body). Used to + /// exercise graft-time reconciliation of the grafted root's own globals + /// against `parent_globals`. + fn leaf_tool_with_globals(globals: ExtendedGlobals) -> ExtendedToolType { + ExtendedToolType { + version: "0.1.0".to_string(), + commands: vec![ExtendedCommandNode { + name: "t".to_string(), + aliases: vec![], + doc: doc(""), + globals, + subcommands: vec![], + body: None, + }], + } + } + + #[test] + fn graft_deprojects_child_root_globals_against_parent_globals() { + // The child root re-declares `verbose` as its own global (e.g. the + // standalone child trait propagating it to its own descendants). It is + // compatible with the parent global of the same name, so it is + // de-projected and the prepended parent global is the single source. + let parent_globals = ExtendedGlobals { + options: vec![], + flags: vec![bool_flag("verbose", None)], + }; + let child_globals = ExtendedGlobals { + options: vec![], + flags: vec![bool_flag("verbose", None)], + }; + let graft = graft_subtree( + leaf_tool_with_globals(child_globals), + "t", + parent_globals, + &[], + None, + None, + None, + None, + ) + .unwrap(); + let verbose_count = graft[0] + .globals + .flags + .iter() + .filter(|f| f.long == "verbose") + .count(); + assert_eq!( + verbose_count, 1, + "compatible child-root global is de-projected; exactly one verbose global remains" + ); + } + + #[test] + fn graft_rejects_incompatible_child_root_global_vs_parent_global() { + // The child root global `verbose` (string option) is incompatible with + // the parent global `verbose` (bool flag): `InheritedGlobalConflict`. + let parent_globals = ExtendedGlobals { + options: vec![], + flags: vec![bool_flag("verbose", None)], + }; + let child_globals = ExtendedGlobals { + options: vec![scalar_opt("verbose", None)], + flags: vec![], + }; + let err = graft_subtree( + leaf_tool_with_globals(child_globals), + "t", + parent_globals, + &[], None, None, None, None, ) .unwrap_err(); - assert!(matches!(err, ToolBuildError::SubtreeRootHasBody(_))); + assert!(matches!( + err, + ToolBuildError::InheritedGlobalConflict { name, command, .. } + if name == "verbose" && command == "t" + )); } #[test] fn graft_preserves_local_indices() { - // The child root stays at index 0 as a body-less placeholder; its - // graft-local subcommand index (1) is unchanged. - let graft = graft_subtree(dispatcher_child(), "child", None, None, None, None).unwrap(); + // The child root stays at index 0; its graft-local subcommand index (1) + // is unchanged. + let graft = graft_subtree( + dispatcher_child(), + "child", + ExtendedGlobals::default(), + &[], + None, + None, + None, + None, + ) + .unwrap(); assert_eq!(graft.len(), 2); assert!(graft[0].body.is_none()); assert_eq!(graft[0].subcommands, vec![1]); @@ -2993,8 +3731,17 @@ mod tests { #[test] fn graft_enforces_name_rule_and_rejects_annotations() { - let mismatch = - graft_subtree(dispatcher_child(), "remote", None, None, None, None).unwrap_err(); + let mismatch = graft_subtree( + dispatcher_child(), + "remote", + ExtendedGlobals::default(), + &[], + None, + None, + None, + None, + ) + .unwrap_err(); assert!(matches!( mismatch, ToolBuildError::SubtreeRootNameMismatch { .. } @@ -3004,6 +3751,8 @@ mod tests { let ok = graft_subtree( dispatcher_child(), "remote", + ExtendedGlobals::default(), + &[], Some("remote".into()), None, None, @@ -3015,6 +3764,8 @@ mod tests { let ann = graft_subtree( dispatcher_child(), "child", + ExtendedGlobals::default(), + &[], None, None, None, @@ -3171,6 +3922,7 @@ mod tests { result: None, errors: vec![], annotations: None, + positional_plan: vec![], } } diff --git a/sdks/rust/golem-rust/tests/tool.rs b/sdks/rust/golem-rust/tests/tool.rs index 7f4fd457af..0503ddae31 100644 --- a/sdks/rust/golem-rust/tests/tool.rs +++ b/sdks/rust/golem-rust/tests/tool.rs @@ -803,6 +803,887 @@ mod tests { ); } + #[tool_definition] + trait RootBodyAliasCollisionChild { + #[arg(format = "option", aliases = ["count"])] + #[constraint(requires_all = value_is("count", 1))] + fn root_body_alias_collision_child(&self, format: String) -> Result<(), RemoteError>; + } + + struct RootBodyAliasCollisionSubtree; + + #[tool_definition] + trait RootBodyAliasCollisionParent { + #[arg(count = "global")] + fn root_body_alias_collision_parent( + &self, + count: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = RootBodyAliasCollisionChild)] + fn root_body_alias_collision_child(&self, format: String) -> RootBodyAliasCollisionSubtree; + } + + #[test] + fn grafted_root_body_alias_collision_with_strict_ancestor_is_rejected() { + let err = __golem_tool_descriptor_for_RootBodyAliasCollisionParent(&mut ToolBuildCtx::new()) + .expect_err( + "a grafted root body option colliding with the subtree global and an incompatible strict ancestor global must be rejected", + ); + assert!( + matches!( + err, + ToolBuildError::InheritedGlobalConflict { ref name, ref inherited, ref command } + if name == "count" + && inherited == "count" + && command == "root-body-alias-collision-child" + ), + "expected an InheritedGlobalConflict for alias `count` on the grafted root body, got {err:?}", + ); + } + + #[tool_definition] + trait RootBodyTailInferenceChild { + fn root_body_tail_inference_child( + &self, + items: Vec, + format: String, + ) -> Result<(), RemoteError>; + } + + struct RootBodyTailInferenceSubtree; + + #[tool_definition] + trait RootBodyTailInferenceParent { + #[command(subtree = RootBodyTailInferenceChild)] + fn root_body_tail_inference_child(&self, format: String) -> RootBodyTailInferenceSubtree; + } + + #[test] + fn grafted_root_body_deprojection_preserves_tail_inference() { + let tool = + __golem_tool_descriptor_for_RootBodyTailInferenceParent(&mut ToolBuildCtx::new()) + .expect("descriptor builds"); + + let child_idx = tool.commands[0] + .subcommands + .iter() + .copied() + .find(|&idx| tool.commands[idx as usize].name == "root-body-tail-inference-child") + .expect("child subtree is grafted") as usize; + let body = tool.commands[child_idx] + .body + .as_ref() + .expect("grafted root body is preserved"); + + assert!( + !body.positionals.fixed.iter().any(|p| p.name == "format") + && !body.options.iter().any(|o| o.long == "format"), + "root-body-local `format` must be removed because the subtree method supplies it as an inherited global", + ); + assert_eq!( + body.positionals.tail.as_ref().map(|t| t.name.as_str()), + Some("items"), + "the trailing inherited-global re-declaration must not prevent `items` from being inferred as the tail positional on a grafted root body", + ); + assert!( + !body.options.iter().any(|o| o.long == "items"), + "`items` should not be projected as a repeatable-list option when the only later positional is de-projected", + ); + tool.try_to_tool().expect("composed tool is valid"); + } + + #[tool_definition] + trait OverrideConflictChild { + #[arg(verbose = "option")] + fn override_conflict_child(&self, verbose: String) -> Result<(), RemoteError>; + } + + struct OverrideConflictSubtree; + + #[tool_definition] + trait OverrideConflictParent { + #[command(subtree = OverrideConflictChild, name = "renamed")] + fn child(&self, verbose: bool) -> OverrideConflictSubtree; + } + + #[test] + fn grafted_root_body_conflict_reports_overridden_command_name() { + let err = __golem_tool_descriptor_for_OverrideConflictParent(&mut ToolBuildCtx::new()) + .expect_err("incompatible inherited global must be rejected"); + assert!( + matches!( + err, + ToolBuildError::InheritedGlobalConflict { ref name, ref inherited, ref command } + if name == "verbose" && inherited == "verbose" && command == "renamed" + ), + "expected the inherited-global conflict to be reported against the final overridden command name `renamed`, got {err:?}", + ); + } + + #[tool_definition] + trait MismatchedConflictChild { + #[arg(verbose = "option")] + fn mismatched_conflict_child(&self, verbose: String) -> Result<(), RemoteError>; + } + + struct MismatchedConflictSubtree; + + #[tool_definition] + trait MismatchedConflictParent { + #[command(subtree = MismatchedConflictChild)] + fn renamed(&self, verbose: bool) -> MismatchedConflictSubtree; + } + + #[test] + fn subtree_root_name_mismatch_is_reported_before_inherited_global_conflict() { + let err = __golem_tool_descriptor_for_MismatchedConflictParent(&mut ToolBuildCtx::new()) + .expect_err( + "a subtree root whose name differs from the parent command must be rejected", + ); + assert!( + matches!( + err, + ToolBuildError::SubtreeRootNameMismatch { ref expected, ref actual } + if expected == "renamed" && actual == "mismatched-conflict-child" + ), + "expected SubtreeRootNameMismatch to win before inherited-global reconciliation, got {err:?}", + ); + } + + #[tool_definition] + trait MismatchedParentGlobalConflictChild { + fn mismatched_parent_global_conflict_child(&self, value: String) + -> Result<(), RemoteError>; + } + + struct MismatchedParentGlobalConflictSubtree; + + #[tool_definition] + trait MismatchedParentGlobalConflictParent { + #[arg(verbose = "global")] + fn mismatched_parent_global_conflict_parent( + &self, + verbose: String, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = MismatchedParentGlobalConflictChild)] + fn renamed(&self, verbose: bool) -> MismatchedParentGlobalConflictSubtree; + } + + #[test] + fn subtree_root_name_mismatch_beats_parent_global_reconciliation() { + let err = __golem_tool_descriptor_for_MismatchedParentGlobalConflictParent( + &mut ToolBuildCtx::new(), + ) + .expect_err("a subtree root whose name differs from the parent command must be rejected"); + assert!( + matches!( + err, + ToolBuildError::SubtreeRootNameMismatch { ref expected, ref actual } + if expected == "renamed" && actual == "mismatched-parent-global-conflict-child" + ), + "expected SubtreeRootNameMismatch to win before parent-global reconciliation, got {err:?}", + ); + } + + #[tool_definition] + trait AliasDeprojectedNestedLeaf { + #[arg(format = "option")] + fn alias_deprojected_nested_leaf(&self, format: String) -> Result<(), RemoteError>; + } + + struct AliasDeprojectedNestedLeafSubtree; + + #[tool_definition] + trait AliasDeprojectedNestedMiddle { + #[command(subtree = AliasDeprojectedNestedLeaf)] + fn alias_deprojected_nested_leaf(&self) -> AliasDeprojectedNestedLeafSubtree; + } + + struct AliasDeprojectedNestedMiddleSubtree; + + #[tool_definition] + trait AliasDeprojectedNestedParent { + #[arg(count = "global")] + fn alias_deprojected_nested_parent( + &self, + count: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = AliasDeprojectedNestedMiddle)] + #[arg(format = "global", aliases = ["count"])] + fn alias_deprojected_nested_middle( + &self, + format: u32, + ) -> AliasDeprojectedNestedMiddleSubtree; + } + + #[test] + fn deprojected_subtree_global_alias_does_not_shadow_nested_root_body() { + let tool = __golem_tool_descriptor_for_AliasDeprojectedNestedParent(&mut ToolBuildCtx::new()) + .expect( + "a subtree global de-projected through an alias must not remain effective under nested grafts", + ); + let middle_idx = tool.commands[0] + .subcommands + .iter() + .copied() + .find(|&idx| tool.commands[idx as usize].name == "alias-deprojected-nested-middle") + .expect("middle subtree is grafted") as usize; + assert!( + !tool.commands[middle_idx] + .globals + .options + .iter() + .any(|o| o.long == "format"), + "the alias-compatible subtree global is de-projected and must not survive as `format`", + ); + let leaf_idx = tool.commands[middle_idx] + .subcommands + .iter() + .copied() + .find(|&idx| tool.commands[idx as usize].name == "alias-deprojected-nested-leaf") + .expect("leaf subtree is grafted") as usize; + let leaf_body = tool.commands[leaf_idx].body.as_ref().expect("leaf body"); + assert!( + leaf_body.options.iter().any(|o| o.long == "format"), + "the nested leaf's local `format` option must remain because no effective inherited global named `format` survives", + ); + } + + #[tool_definition] + trait AliasDeprojectedRootGlobalNestedLeaf { + #[arg(format = "option")] + fn alias_deprojected_root_global_nested_leaf( + &self, + format: String, + ) -> Result<(), RemoteError>; + } + + struct AliasDeprojectedRootGlobalNestedLeafSubtree; + + #[tool_definition] + trait AliasDeprojectedRootGlobalNestedMiddle { + #[arg(format = "global", aliases = ["count"])] + fn alias_deprojected_root_global_nested_middle( + &self, + format: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = AliasDeprojectedRootGlobalNestedLeaf)] + fn alias_deprojected_root_global_nested_leaf( + &self, + ) -> AliasDeprojectedRootGlobalNestedLeafSubtree; + } + + struct AliasDeprojectedRootGlobalNestedMiddleSubtree; + + #[tool_definition] + trait AliasDeprojectedRootGlobalNestedParent { + #[arg(count = "global")] + fn alias_deprojected_root_global_nested_parent( + &self, + count: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = AliasDeprojectedRootGlobalNestedMiddle)] + fn alias_deprojected_root_global_nested_middle( + &self, + ) -> AliasDeprojectedRootGlobalNestedMiddleSubtree; + } + + #[test] + fn deprojected_child_root_global_alias_does_not_shadow_nested_root_body() { + let tool = __golem_tool_descriptor_for_AliasDeprojectedRootGlobalNestedParent( + &mut ToolBuildCtx::new(), + ) + .expect( + "a child root global de-projected through an alias must not remain effective under nested grafts", + ); + let middle_idx = tool.commands[0] + .subcommands + .iter() + .copied() + .find(|&idx| { + tool.commands[idx as usize].name == "alias-deprojected-root-global-nested-middle" + }) + .expect("middle subtree is grafted") as usize; + assert!( + !tool.commands[middle_idx] + .globals + .options + .iter() + .any(|o| o.long == "format"), + "the alias-compatible child root global is de-projected and must not survive as `format`", + ); + let leaf_idx = tool.commands[middle_idx] + .subcommands + .iter() + .copied() + .find(|&idx| { + tool.commands[idx as usize].name == "alias-deprojected-root-global-nested-leaf" + }) + .expect("leaf subtree is grafted") as usize; + let leaf_body = tool.commands[leaf_idx].body.as_ref().expect("leaf body"); + assert!( + leaf_body.options.iter().any(|o| o.long == "format"), + "the nested leaf's local `format` option must remain because no effective inherited global named `format` survives", + ); + } + + #[tool_definition] + trait AliasDeprojectedRootGlobalTailChild { + #[arg(format = "global", aliases = ["count"])] + fn alias_deprojected_root_global_tail_child(&self, format: u32) -> Result<(), RemoteError>; + + fn leaf(&self, items: Vec, format: u32) -> Result<(), RemoteError>; + } + + struct AliasDeprojectedRootGlobalTailSubtree; + + #[tool_definition] + trait AliasDeprojectedRootGlobalTailParent { + #[arg(count = "global")] + fn alias_deprojected_root_global_tail_parent( + &self, + count: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = AliasDeprojectedRootGlobalTailChild)] + fn alias_deprojected_root_global_tail_child(&self) + -> AliasDeprojectedRootGlobalTailSubtree; + } + + #[test] + fn deprojected_child_root_global_alias_does_not_affect_leaf_tail_inference() { + let tool = __golem_tool_descriptor_for_AliasDeprojectedRootGlobalTailParent( + &mut ToolBuildCtx::new(), + ) + .expect("descriptor builds"); + + let child_idx = tool.commands[0] + .subcommands + .iter() + .copied() + .find(|&idx| { + tool.commands[idx as usize].name == "alias-deprojected-root-global-tail-child" + }) + .expect("child subtree is grafted") as usize; + assert!( + !tool.commands[child_idx] + .globals + .options + .iter() + .any(|o| o.long == "format"), + "the child root global `format` is de-projected through alias `count` and must not survive", + ); + + let leaf_idx = tool.commands[child_idx] + .subcommands + .iter() + .copied() + .find(|&idx| tool.commands[idx as usize].name == "leaf") + .expect("leaf command is present") as usize; + let body = tool.commands[leaf_idx].body.as_ref().expect("leaf body"); + + assert!( + body.positionals.fixed.iter().any(|p| p.name == "format"), + "leaf-local `format` remains because no effective inherited global named `format` survives", + ); + assert!( + body.positionals.tail.is_none(), + "`items: Vec<_>` is followed by surviving local `format`, so it is not in tail position", + ); + assert!( + body.options.iter().any(|o| { + o.long == "items" && matches!(o.shape, ExtendedOptionShape::RepeatableList(_)) + }), + "a non-tail Vec parameter projects as a repeatable-list option", + ); + } + + #[tool_definition] + trait DemotedTailOptionOrderChild { + #[arg(format = "global", aliases = ["count"])] + fn demoted_tail_option_order_child( + &self, + format: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[arg(mode = "option")] + fn leaf(&self, items: Vec, mode: String, format: u32) -> Result<(), RemoteError>; + } + + struct DemotedTailOptionOrderSubtree; + + #[tool_definition] + trait DemotedTailOptionOrderParent { + #[arg(count = "global")] + fn demoted_tail_option_order_parent( + &self, + count: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = DemotedTailOptionOrderChild)] + fn demoted_tail_option_order_child(&self) -> DemotedTailOptionOrderSubtree; + } + + #[test] + fn demoted_tail_option_is_reinserted_in_declaration_order() { + let tool = + __golem_tool_descriptor_for_DemotedTailOptionOrderParent(&mut ToolBuildCtx::new()) + .expect("descriptor builds"); + + let leaf = tool + .commands + .iter() + .find(|command| command.name == "leaf") + .expect("leaf command"); + let body = leaf.body.as_ref().expect("leaf body"); + + assert!( + body.positionals.tail.is_none(), + "items must be demoted because leaf-local format survives", + ); + let option_names: Vec<&str> = body + .options + .iter() + .map(|option| option.long.as_str()) + .collect(); + assert_eq!( + option_names, + vec!["items", "mode"], + "demoting items from tail to repeatable-list option should preserve declaration order among body options", + ); + } + + #[tool_definition] + trait DemotedTailMinZeroChild { + #[arg(format = "global", aliases = ["count"])] + fn demoted_tail_min_zero_child( + &self, + format: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[arg(items, min = 0)] + fn leaf(&self, items: Vec, format: u32) -> Result<(), RemoteError>; + } + + struct DemotedTailMinZeroSubtree; + + #[tool_definition] + trait DemotedTailMinZeroParent { + #[arg(count = "global")] + fn demoted_tail_min_zero_parent( + &self, + count: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = DemotedTailMinZeroChild)] + fn demoted_tail_min_zero_child(&self) -> DemotedTailMinZeroSubtree; + } + + #[test] + fn demoted_tail_with_authored_min_zero_is_rejected() { + let err = __golem_tool_descriptor_for_DemotedTailMinZeroParent(&mut ToolBuildCtx::new()) + .expect_err("authored min/max cannot be reinterpreted when demoting a tail"); + + assert!( + matches!(err, ToolBuildError::VecSurfaceConflict { ref name, .. } if name == "items"), + "expected VecSurfaceConflict for demoted items with authored min = 0, got {err:?}", + ); + } + + #[tool_definition] + trait ExplicitTailBeforeSurvivingLocalChild { + #[arg(format = "global", aliases = ["count"])] + fn explicit_tail_before_surviving_local_child( + &self, + format: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[arg(items = "tail")] + fn leaf(&self, items: Vec, format: u32) -> Result<(), RemoteError>; + } + + struct ExplicitTailBeforeSurvivingLocalSubtree; + + #[tool_definition] + trait ExplicitTailBeforeSurvivingLocalParent { + #[arg(count = "global")] + fn explicit_tail_before_surviving_local_parent( + &self, + count: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = ExplicitTailBeforeSurvivingLocalChild)] + fn explicit_tail_before_surviving_local_child( + &self, + ) -> ExplicitTailBeforeSurvivingLocalSubtree; + } + + #[test] + fn deprojected_child_root_global_alias_revalidates_explicit_tail_order() { + let result = __golem_tool_descriptor_for_ExplicitTailBeforeSurvivingLocalParent( + &mut ToolBuildCtx::new(), + ); + let Ok(tool) = result else { + return; + }; + + assert!( + tool.try_to_tool().is_err(), + "once child root global `format` is de-projected via alias `count`, leaf-local `format` survives; explicitly-authored tail `items` before that fixed positional must be rejected", + ); + } + + #[tool_definition] + trait ExplicitInheritedTailSurrogateChild { + #[arg(items = "global", aliases = ["count"])] + fn explicit_inherited_tail_surrogate_child( + &self, + items: Vec, + target: String, + ) -> Result<(), RemoteError>; + + #[arg(items = "tail")] + fn leaf(&self, items: Vec, format: String) -> Result<(), RemoteError>; + } + + struct ExplicitInheritedTailSurrogateSubtree; + + #[tool_definition] + trait ExplicitInheritedTailSurrogateParent { + #[arg(count = "global")] + fn explicit_inherited_tail_surrogate_parent( + &self, + count: Vec, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = ExplicitInheritedTailSurrogateChild)] + fn explicit_inherited_tail_surrogate_child(&self) -> ExplicitInheritedTailSurrogateSubtree; + } + + #[test] + fn explicit_inherited_tail_surrogate_before_surviving_positional_is_rejected() { + let result = __golem_tool_descriptor_for_ExplicitInheritedTailSurrogateParent( + &mut ToolBuildCtx::new(), + ); + let err = match result { + Ok(tool) => tool.try_to_tool().expect_err( + "an explicitly-authored tail lowered through an inherited-global surrogate must still be rejected when a later fixed positional survives", + ), + Err(err) => err, + }; + + assert!( + matches!(err, ToolBuildError::FixedPositionalAfterTail(ref name) if name == "format"), + "expected FixedPositionalAfterTail for surviving positional after explicit tail, got {err:?}", + ); + } + + #[tool_definition] + trait ExplicitInheritedTailSurrogateAttrsChild { + #[arg(items = "global", aliases = ["count"])] + fn explicit_inherited_tail_surrogate_attrs_child( + &self, + items: Vec, + target: String, + ) -> Result<(), RemoteError>; + + #[arg(items = "tail", separator = "--", accepts_stdio = true)] + fn leaf(&self, items: Vec) -> Result<(), RemoteError>; + } + + struct ExplicitInheritedTailSurrogateAttrsSubtree; + + #[tool_definition] + trait ExplicitInheritedTailSurrogateAttrsParent { + #[arg(count = "global")] + fn explicit_inherited_tail_surrogate_attrs_parent( + &self, + count: Vec, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = ExplicitInheritedTailSurrogateAttrsChild)] + fn explicit_inherited_tail_surrogate_attrs_child( + &self, + ) -> ExplicitInheritedTailSurrogateAttrsSubtree; + } + + #[test] + fn promoted_explicit_inherited_tail_surrogate_preserves_tail_attrs() { + let tool = __golem_tool_descriptor_for_ExplicitInheritedTailSurrogateAttrsParent( + &mut ToolBuildCtx::new(), + ) + .expect("descriptor builds"); + let leaf = tool + .commands + .iter() + .find(|command| command.name == "leaf") + .expect("leaf command"); + let tail = leaf + .body + .as_ref() + .and_then(|body| body.positionals.tail.as_ref()) + .expect("items survives as the leaf tail"); + + assert_eq!(tail.name, "items"); + assert_eq!( + tail.separator.as_deref(), + Some("--"), + "a surviving explicit tail surrogate must keep authored tail separator", + ); + assert!( + tail.accepts_stdio, + "a surviving explicit tail surrogate must keep authored accepts_stdio", + ); + tool.try_to_tool().expect("tool is valid"); + } + + #[tool_definition] + trait ExplicitInheritedTailSurrogateVerbatimChild { + #[arg(items = "global", aliases = ["count"])] + fn explicit_inherited_tail_surrogate_verbatim_child( + &self, + items: Vec, + target: String, + ) -> Result<(), RemoteError>; + + #[arg(items = "tail", verbatim = true)] + fn leaf(&self, items: Vec) -> Result<(), RemoteError>; + } + + struct ExplicitInheritedTailSurrogateVerbatimSubtree; + + #[tool_definition] + trait ExplicitInheritedTailSurrogateVerbatimParent { + #[arg(count = "global")] + fn explicit_inherited_tail_surrogate_verbatim_parent( + &self, + count: Vec, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = ExplicitInheritedTailSurrogateVerbatimChild)] + fn explicit_inherited_tail_surrogate_verbatim_child( + &self, + ) -> ExplicitInheritedTailSurrogateVerbatimSubtree; + } + + #[test] + fn promoted_explicit_inherited_tail_surrogate_rejects_verbatim_without_separator() { + let result = __golem_tool_descriptor_for_ExplicitInheritedTailSurrogateVerbatimParent( + &mut ToolBuildCtx::new(), + ); + let err = match result { + Ok(tool) => tool.try_to_tool().expect_err( + "verbatim=true without a separator must remain invalid when an explicit inherited tail surrogate is promoted", + ), + Err(err) => err, + }; + + assert!( + matches!(err, ToolBuildError::VerbatimWithoutSeparator(ref name) if name == "items"), + "expected VerbatimWithoutSeparator for promoted explicit tail `items`, got {err:?}", + ); + } + + #[tool_definition] + trait AliasDeprojectedAncestorTailChild { + #[arg(format = "global", aliases = ["count"])] + fn alias_deprojected_ancestor_tail_child( + &self, + format: u32, + target: String, + ) -> Result<(), RemoteError>; + + fn leaf(&self, items: Vec, count: u32) -> Result<(), RemoteError>; + } + + struct AliasDeprojectedAncestorTailSubtree; + + #[tool_definition] + trait AliasDeprojectedAncestorTailParent { + #[arg(count = "global")] + fn alias_deprojected_ancestor_tail_parent( + &self, + count: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = AliasDeprojectedAncestorTailChild)] + fn alias_deprojected_ancestor_tail_child(&self) -> AliasDeprojectedAncestorTailSubtree; + } + + #[test] + fn deprojected_child_root_global_alias_keeps_strict_ancestor_for_leaf_tail_inference() { + let tool = __golem_tool_descriptor_for_AliasDeprojectedAncestorTailParent( + &mut ToolBuildCtx::new(), + ) + .expect("descriptor builds"); + + let child_idx = tool.commands[0] + .subcommands + .iter() + .copied() + .find(|&idx| { + tool.commands[idx as usize].name == "alias-deprojected-ancestor-tail-child" + }) + .expect("child subtree is grafted") as usize; + assert!( + !tool.commands[child_idx] + .globals + .options + .iter() + .any(|o| o.long == "format"), + "the child root global `format` is de-projected through alias `count` and must not survive", + ); + + let leaf_idx = tool.commands[child_idx] + .subcommands + .iter() + .copied() + .find(|&idx| tool.commands[idx as usize].name == "leaf") + .expect("leaf command is present") as usize; + let body = tool.commands[leaf_idx].body.as_ref().expect("leaf body"); + + assert!( + !body.positionals.fixed.iter().any(|p| p.name == "count") + && !body.options.iter().any(|o| o.long == "count"), + "leaf-local `count` must be removed because strict ancestor global `count` remains effective", + ); + assert_eq!( + body.positionals.tail.as_ref().map(|t| t.name.as_str()), + Some("items"), + "the trailing strict-ancestor global re-declaration must not prevent `items` from being inferred as the tail positional", + ); + assert!( + !body.options.iter().any(|o| o.long == "items"), + "`items` should not be projected as a repeatable-list option when the only later positional is de-projected", + ); + tool.try_to_tool().expect("composed tool is valid"); + } + + #[tool_definition] + trait PureStrictAncestorAliasTailChild { + fn leaf(&self, items: Vec, format: u32) -> Result<(), RemoteError>; + } + + struct PureStrictAncestorAliasTailSubtree; + + #[tool_definition] + trait PureStrictAncestorAliasTailParent { + #[arg(count = "global", aliases = ["format"])] + fn pure_strict_ancestor_alias_tail_parent( + &self, + count: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = PureStrictAncestorAliasTailChild)] + fn pure_strict_ancestor_alias_tail_child(&self) -> PureStrictAncestorAliasTailSubtree; + } + + #[test] + fn strict_ancestor_alias_deprojection_keeps_leaf_tail_inference_without_child_root_global() { + let tool = + __golem_tool_descriptor_for_PureStrictAncestorAliasTailParent(&mut ToolBuildCtx::new()) + .expect("descriptor builds"); + + let child_idx = tool.commands[0] + .subcommands + .iter() + .copied() + .find(|&idx| { + tool.commands[idx as usize].name == "pure-strict-ancestor-alias-tail-child" + }) + .expect("child subtree is grafted") as usize; + let leaf_idx = tool.commands[child_idx] + .subcommands + .iter() + .copied() + .find(|&idx| tool.commands[idx as usize].name == "leaf") + .expect("leaf command is present") as usize; + let body = tool.commands[leaf_idx].body.as_ref().expect("leaf body"); + + assert!( + !body.positionals.fixed.iter().any(|p| p.name == "format") + && !body.options.iter().any(|o| o.long == "format"), + "leaf-local `format` must be removed because strict ancestor global alias `format` remains effective", + ); + assert_eq!( + body.positionals.tail.as_ref().map(|t| t.name.as_str()), + Some("items"), + "the trailing strict-ancestor alias re-declaration must not prevent `items` from being inferred as the tail positional", + ); + assert!( + !body.options.iter().any(|o| o.long == "items"), + "`items` should not be projected as a repeatable-list option when the only later positional is de-projected", + ); + tool.try_to_tool().expect("composed tool is valid"); + } + + #[tool_definition] + trait AliasDeprojectedOptionalPositionalChild { + #[arg(format = "global", aliases = ["count"])] + fn alias_deprojected_optional_positional_child( + &self, + format: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[arg(format = "positional", required = false)] + fn leaf(&self, format: String, name: String) -> Result<(), RemoteError>; + } + + struct AliasDeprojectedOptionalPositionalSubtree; + + #[tool_definition] + trait AliasDeprojectedOptionalPositionalParent { + #[arg(count = "global")] + fn alias_deprojected_optional_positional_parent( + &self, + count: u32, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = AliasDeprojectedOptionalPositionalChild)] + fn alias_deprojected_optional_positional_child( + &self, + ) -> AliasDeprojectedOptionalPositionalSubtree; + } + + #[test] + fn deprojected_child_root_global_alias_does_not_hide_optional_before_required() { + let result = __golem_tool_descriptor_for_AliasDeprojectedOptionalPositionalParent( + &mut ToolBuildCtx::new(), + ); + let Ok(tool) = result else { + return; + }; + + assert!( + tool.try_to_tool().is_err(), + "an optional fixed positional before a required fixed positional must be rejected either while building the descriptor or during runtime validation after de-projection leaves it local", + ); + } + // Cross-subtree tail-inference boundary (oracle finding 2): a subtree child // is synthesized standalone, before it knows which of its parameters the // parent hoists into a propagating global, so a child subcommand cannot rely @@ -826,63 +1707,190 @@ mod tests { } #[test] - fn explicit_child_tail_survives_subtree_global_hoisting() { - let tool = __golem_tool_descriptor_for_Downloader(&mut ToolBuildCtx::new()) - .expect("downloader subtree descriptor builds"); - let collect = tool - .commands - .iter() - .find(|c| c.name == "collect") - .expect("collect subcommand"); - let body = collect.body.as_ref().expect("collect body"); - assert_eq!( - body.positionals.tail.as_ref().map(|t| t.name.as_str()), - Some("items"), - "the explicit child tail must survive composition under the hoisted global" + fn explicit_child_tail_survives_subtree_global_hoisting() { + let tool = __golem_tool_descriptor_for_Downloader(&mut ToolBuildCtx::new()) + .expect("downloader subtree descriptor builds"); + let collect = tool + .commands + .iter() + .find(|c| c.name == "collect") + .expect("collect subcommand"); + let body = collect.body.as_ref().expect("collect body"); + assert_eq!( + body.positionals.tail.as_ref().map(|t| t.name.as_str()), + Some("items"), + "the explicit child tail must survive composition under the hoisted global" + ); + assert!( + !body.options.iter().any(|o| o.long == "format"), + "the child `format` option must be reconciled away under the inherited `format` global" + ); + tool.try_to_tool().expect("downloader tool is valid"); + } + + // Tail inference must survive a trailing parameter that repeats an inherited + // root global: the inherited duplicate is removed by normalization, and the + // preceding `Vec` remains a tail positional. + #[tool_definition] + trait TailWithInheritedTrailingGlobal { + #[arg(format = "global")] + fn tail_with_inherited_trailing_global( + &self, + format: String, + target: String, + ) -> Result<(), RemoteError>; + fn collect(&self, items: Vec, format: String) -> Result<(), RemoteError>; + } + + #[test] + fn tail_inference_survives_trailing_inherited_global() { + let tool = + __golem_tool_descriptor_for_TailWithInheritedTrailingGlobal(&mut ToolBuildCtx::new()) + .expect("descriptor builds"); + let collect = tool + .commands + .iter() + .find(|c| c.name == "collect") + .expect("collect command"); + let body = collect.body.as_ref().expect("collect body"); + assert_eq!( + body.positionals.tail.as_ref().map(|t| t.name.as_str()), + Some("items"), + "a trailing parameter repeating an inherited global must not prevent tail inference" + ); + assert!( + !body.positionals.fixed.iter().any(|p| p.name == "format") + && !body.options.iter().any(|o| o.long == "format"), + "the inherited `format` re-declaration must be removed from the collect body" + ); + tool.try_to_tool().expect("tool is valid"); + } + + #[test] + fn inferred_tail_after_inherited_trailing_global_accepts_tail_separator() { + let output = cargo_check_tool_crate( + "inferred-tail-separator-after-inherited-global", + r#" +use golem_rust::{tool_definition, ToolError}; + +#[derive(ToolError)] +enum E { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait GoodTool { + #[arg(format = "global")] + fn good_tool(&self, format: String, target: String) -> Result<(), E>; + + #[arg(items, separator = "--")] + fn collect(&self, items: Vec, format: String) -> Result<(), E>; +} +"#, + ); + + assert!( + output.status.success(), + "after inherited `format` is de-projected, `items` is the inferred tail; `separator` is a valid tail attr and should be consumed by the final tail shape, but cargo check failed\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn inferred_tail_after_inherited_trailing_global_accepts_tail_min() { + let output = cargo_check_tool_crate( + "inferred-tail-min-after-inherited-global", + r#" +use golem_rust::{tool_definition, ToolError}; + +#[derive(ToolError)] +enum E { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait GoodTool { + #[arg(format = "global")] + fn good_tool(&self, format: String, target: String) -> Result<(), E>; + + #[arg(items, min = 1)] + fn collect(&self, items: Vec, format: String) -> Result<(), E>; +} +"#, + ); + + assert!( + output.status.success(), + "after inherited `format` is de-projected, `items` is the inferred tail; `min` is a valid tail occurrence bound and should be consumed by the final tail shape, but cargo check failed\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[test] + fn non_tail_vec_option_signed_min_does_not_typecheck_unused_tail_form() { + let output = cargo_check_tool_crate( + "vec-option-signed-min-unused-tail", + r#" +use golem_rust::{tool_definition, ToolError}; + +#[derive(ToolError)] +enum E { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait GoodTool { + #[arg(nums, min = -5_i64)] + fn run(&self, nums: Vec, suffix: String) -> Result<(), E>; +} +"#, ); + assert!( - !body.options.iter().any(|o| o.long == "format"), - "the child `format` option must be reconciled away under the inherited `format` global" + output.status.success(), + "a non-tail Vec should treat min as an item numeric bound; the unused tail form must not typecheck it as u32\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), ); - tool.try_to_tool().expect("downloader tool is valid"); - } - - // Tail inference must survive a trailing parameter that repeats an inherited - // root global: the inherited duplicate is removed by normalization, and the - // preceding `Vec` remains a tail positional. - #[tool_definition] - trait TailWithInheritedTrailingGlobal { - #[arg(format = "global")] - fn tail_with_inherited_trailing_global( - &self, - format: String, - target: String, - ) -> Result<(), RemoteError>; - fn collect(&self, items: Vec, format: String) -> Result<(), RemoteError>; } #[test] - fn tail_inference_survives_trailing_inherited_global() { - let tool = - __golem_tool_descriptor_for_TailWithInheritedTrailingGlobal(&mut ToolBuildCtx::new()) - .expect("descriptor builds"); - let collect = tool - .commands - .iter() - .find(|c| c.name == "collect") - .expect("collect command"); - let body = collect.body.as_ref().expect("collect body"); - assert_eq!( - body.positionals.tail.as_ref().map(|t| t.name.as_str()), - Some("items"), - "a trailing parameter repeating an inherited global must not prevent tail inference" + fn inferred_tail_custom_item_occurrence_min_does_not_typecheck_unused_option_form() { + let output = cargo_check_tool_crate( + "inferred-tail-custom-item-min-unused-option", + r#" +use golem_rust::{tool_definition, FromSchema, IntoSchema, ToolError}; + +#[derive(Clone, IntoSchema, FromSchema)] +struct Item { + value: String, +} + +#[derive(ToolError)] +enum E { + #[tool_error(kind = "usage-error", exit_code = 2)] + Bad(String), +} + +#[tool_definition] +trait GoodTool { + #[arg(items, min = 1)] + fn run(&self, items: Vec) -> Result<(), E>; +} +"#, ); + assert!( - !body.positionals.fixed.iter().any(|p| p.name == "format") - && !body.options.iter().any(|o| o.long == "format"), - "the inherited `format` re-declaration must be removed from the collect body" + output.status.success(), + "an inferred tail over a custom item should treat min as an occurrence bound; the unused option form must not typecheck it as Item\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), ); - tool.try_to_tool().expect("tool is valid"); } #[tool_definition] @@ -1099,7 +2107,7 @@ impl BadTool for BadToolImpl { #[test] fn explicit_tail_parameter_before_fixed_positional_is_rejected() { - let output = cargo_check_tool_crate( + let output = cargo_test_tool_crate( "tail-before-fixed", r#" use golem_rust::{tool_definition, tool_implementation, ToolError}; @@ -1129,7 +2137,7 @@ impl BadTool for BadToolImpl { assert!( !output.status.success(), - "an explicit tail positional before a later fixed positional should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + "an explicit tail positional before a later fixed positional should be rejected, but cargo test succeeded\nstdout:\n{}\nstderr:\n{}", String::from_utf8_lossy(&output.stdout), String::from_utf8_lossy(&output.stderr), ); @@ -1212,8 +2220,447 @@ impl BadTool for BadToolImpl { } #[test] - fn optional_fixed_positional_before_required_fixed_positional_is_rejected() { + fn many_root_globals_with_leaf_command_compile() { + let global_count = usize::BITS as usize; + let mut source = String::from("use golem_rust::tool_definition;\n\n"); + source.push_str("#[tool_definition]\ntrait ManyGlobals {\n"); + for i in 0..global_count { + source.push_str(&format!(" #[arg(g{i} = \"global\")]\n")); + } + source.push_str(" fn many_globals(\n &self,\n"); + for i in 0..global_count { + source.push_str(&format!(" g{i}: String,\n")); + } + source.push_str(" target: String,\n );\n"); + source.push_str(" fn leaf(&self, value: String);\n}\n"); + + let output = cargo_check_tool_crate("many-root-globals", &source); + + assert!( + output.status.success(), + "a tool definition should not panic or fail to compile merely because it has {global_count} root globals and a leaf command, but cargo check failed\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[tool_definition] + trait ManyContextSensitiveLeafPositionals { + fn leaf( + &self, + v0: Vec, + v1: Vec, + v2: Vec, + v3: Vec, + v4: Vec, + v5: Vec, + v6: Vec, + v7: Vec, + v8: Vec, + v9: Vec, + v10: Vec, + v11: Vec, + v12: Vec, + ) -> Result<(), RemoteError>; + } + + #[test] + fn many_context_sensitive_leaf_positionals_build_without_inherited_globals() { + let tool = __golem_tool_descriptor_for_ManyContextSensitiveLeafPositionals( + &mut ToolBuildCtx::new(), + ) + .expect( + "a standalone leaf with many Vec positionals and no inherited globals should use normal option/tail projection", + ); + + let leaf = tool + .commands + .iter() + .find(|command| command.name == "leaf") + .expect("leaf command exists"); + let body = leaf.body.as_ref().expect("leaf body"); + assert_eq!( + body.positionals + .tail + .as_ref() + .map(|tail| tail.name.as_str()), + Some("v12"), + "the final Vec parameter should infer as the tail positional", + ); + for i in 0..12 { + let name = format!("v{i}"); + assert!( + body.options.iter().any(|option| { + option.long == name + && matches!(option.shape, ExtendedOptionShape::RepeatableList(_)) + }), + "non-final Vec parameter {name} should project as a repeatable-list option", + ); + } + tool.try_to_tool().expect("standalone tool is valid"); + } + + #[test] + fn many_context_sensitive_leaf_positionals_preserve_option_attrs_without_inherited_globals() { let output = cargo_check_tool_crate( + "many-vec-option-attrs", + r#" +use golem_rust::tool_definition; + +#[tool_definition] +trait ManyVecOptionAttrs { + #[arg(v0, short = 'a')] + fn leaf( + &self, + v0: Vec, + v1: Vec, + v2: Vec, + v3: Vec, + v4: Vec, + v5: Vec, + v6: Vec, + v7: Vec, + v8: Vec, + v9: Vec, + v10: Vec, + v11: Vec, + v12: Vec, + ); +} +"#, + ); + + assert!( + output.status.success(), + "with no inherited globals, only the final Vec is a tail; earlier Vec parameters are repeatable-list options and option attributes such as `short` must be accepted, but cargo check failed\nstdout:\n{}\nstderr:\n{}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + ); + } + + #[tool_definition] + trait SparseInheritedManyVecChild { + fn leaf( + &self, + v0: Vec, + v1: Vec, + v2: Vec, + v3: Vec, + v4: Vec, + v5: Vec, + v6: Vec, + v7: Vec, + v8: Vec, + v9: Vec, + v10: Vec, + v11: Vec, + v12: Vec, + ) -> Result<(), RemoteError>; + } + + struct SparseInheritedManyVecSubtree; + + #[tool_definition] + trait SparseInheritedManyVecParent { + #[arg(v0 = "global")] + #[command(subtree = SparseInheritedManyVecChild)] + fn sparse_inherited_many_vec_child(&self, v0: Vec) + -> SparseInheritedManyVecSubtree; + } + + #[test] + fn many_context_sensitive_leaf_positionals_allow_sparse_inherited_subset() { + let tool = + __golem_tool_descriptor_for_SparseInheritedManyVecParent(&mut ToolBuildCtx::new()) + .expect("only v0 is inherited; the remaining Vec parameters have a valid shape"); + + let child_idx = tool.commands[0] + .subcommands + .iter() + .copied() + .find(|&idx| tool.commands[idx as usize].name == "sparse-inherited-many-vec-child") + .expect("child subtree is grafted") as usize; + let leaf_idx = tool.commands[child_idx] + .subcommands + .iter() + .copied() + .find(|&idx| tool.commands[idx as usize].name == "leaf") + .expect("leaf command is present") as usize; + let body = tool.commands[leaf_idx].body.as_ref().expect("leaf body"); + + assert!( + !body.options.iter().any(|option| option.long == "v0"), + "v0 is de-projected onto the inherited global", + ); + assert_eq!( + body.positionals + .tail + .as_ref() + .map(|tail| tail.name.as_str()), + Some("v12"), + "the final non-inherited Vec parameter remains the tail positional", + ); + tool.try_to_tool().expect("composed tool is valid"); + } + + #[tool_definition] + trait SparseInheritedTrailingManyVecChild { + fn leaf( + &self, + v0: Vec, + v1: Vec, + v2: Vec, + v3: Vec, + v4: Vec, + v5: Vec, + v6: Vec, + v7: Vec, + v8: Vec, + v9: Vec, + v10: Vec, + v11: Vec, + v12: Vec, + ) -> Result<(), RemoteError>; + } + + struct SparseInheritedTrailingManyVecSubtree; + + #[tool_definition] + trait SparseInheritedTrailingManyVecParent { + #[arg(v12 = "global")] + #[command(subtree = SparseInheritedTrailingManyVecChild)] + fn sparse_inherited_trailing_many_vec_child( + &self, + v12: Vec, + ) -> SparseInheritedTrailingManyVecSubtree; + } + + #[test] + fn many_context_sensitive_leaf_positionals_allow_sparse_trailing_inherited_subset() { + let tool = __golem_tool_descriptor_for_SparseInheritedTrailingManyVecParent( + &mut ToolBuildCtx::new(), + ) + .expect("only v12 is inherited; v11 should become the remaining tail positional"); + + let child_idx = tool.commands[0] + .subcommands + .iter() + .copied() + .find(|&idx| { + tool.commands[idx as usize].name == "sparse-inherited-trailing-many-vec-child" + }) + .expect("child subtree is grafted") as usize; + let leaf_idx = tool.commands[child_idx] + .subcommands + .iter() + .copied() + .find(|&idx| tool.commands[idx as usize].name == "leaf") + .expect("leaf command is present") as usize; + let body = tool.commands[leaf_idx].body.as_ref().expect("leaf body"); + + assert!( + !body.options.iter().any(|option| option.long == "v12") + && body + .positionals + .tail + .as_ref() + .map(|tail| tail.name.as_str()) + != Some("v12"), + "v12 is de-projected onto the inherited global", + ); + assert_eq!( + body.positionals + .tail + .as_ref() + .map(|tail| tail.name.as_str()), + Some("v11"), + "after the trailing inherited Vec is de-projected, the preceding Vec parameter must be inferred as the tail positional", + ); + tool.try_to_tool().expect("composed tool is valid"); + } + + #[tool_definition] + trait MixedRootAndStrictSparseManyVecChild { + #[arg(v0 = "global")] + fn mixed_root_and_strict_sparse_many_vec_child( + &self, + v0: Vec, + target: String, + ) -> Result<(), RemoteError>; + + fn leaf( + &self, + v0: Vec, + v1: Vec, + v2: Vec, + v3: Vec, + v4: Vec, + v5: Vec, + v6: Vec, + v7: Vec, + v8: Vec, + v9: Vec, + v10: Vec, + v11: Vec, + v12: Vec, + ) -> Result<(), RemoteError>; + } + + struct MixedRootAndStrictSparseManyVecSubtree; + + #[tool_definition] + trait MixedRootAndStrictSparseManyVecParent { + #[arg(v12 = "global")] + #[command(subtree = MixedRootAndStrictSparseManyVecChild)] + fn mixed_root_and_strict_sparse_many_vec_child( + &self, + v12: Vec, + ) -> MixedRootAndStrictSparseManyVecSubtree; + } + + #[test] + fn many_context_sensitive_leaf_positionals_allow_mixed_root_and_sparse_strict_subset() { + let tool = __golem_tool_descriptor_for_MixedRootAndStrictSparseManyVecParent( + &mut ToolBuildCtx::new(), + ) + .expect( + "a bounded root global plus one sparse strict inherited global still leaves a valid leaf shape", + ); + + let child_idx = tool.commands[0] + .subcommands + .iter() + .copied() + .find(|&idx| { + tool.commands[idx as usize].name == "mixed-root-and-strict-sparse-many-vec-child" + }) + .expect("child subtree is grafted") as usize; + let leaf_idx = tool.commands[child_idx] + .subcommands + .iter() + .copied() + .find(|&idx| tool.commands[idx as usize].name == "leaf") + .expect("leaf command is present") as usize; + let body = tool.commands[leaf_idx].body.as_ref().expect("leaf body"); + + assert!( + !body.options.iter().any(|option| option.long == "v12") + && body + .positionals + .tail + .as_ref() + .map(|tail| tail.name.as_str()) + != Some("v12"), + "v12 is de-projected onto the strict inherited global", + ); + assert_eq!( + body.positionals + .tail + .as_ref() + .map(|tail| tail.name.as_str()), + Some("v11"), + "after the sparse strict inherited Vec is de-projected, v11 must be inferred as the tail positional even when another context-sensitive root global exists", + ); + tool.try_to_tool().expect("composed tool is valid"); + } + + #[tool_definition] + trait ManyOverlappingGraftedRootGlobalsChild { + #[arg(g0 = "global")] + #[arg(g1 = "global")] + #[arg(g2 = "global")] + #[arg(g3 = "global")] + #[arg(g4 = "global")] + #[arg(g5 = "global")] + #[arg(g6 = "global")] + #[arg(g7 = "global")] + #[arg(g8 = "global")] + #[arg(g9 = "global")] + #[arg(g10 = "global")] + #[arg(g11 = "global")] + #[arg(g12 = "global")] + fn many_overlapping_grafted_root_globals_child( + &self, + g0: String, + g1: String, + g2: String, + g3: String, + g4: String, + g5: String, + g6: String, + g7: String, + g8: String, + g9: String, + g10: String, + g11: String, + g12: String, + target: String, + ) -> Result<(), RemoteError>; + + fn leaf( + &self, + g0: String, + g1: String, + g2: String, + g3: String, + g4: String, + g5: String, + g6: String, + g7: String, + g8: String, + g9: String, + g10: String, + g11: String, + g12: String, + value: String, + ) -> Result<(), RemoteError>; + } + + struct ManyOverlappingGraftedRootGlobalsSubtree; + + #[tool_definition] + trait ManyOverlappingGraftedRootGlobalsParent { + #[arg(g0 = "global")] + fn many_overlapping_grafted_root_globals_parent( + &self, + g0: String, + target: String, + ) -> Result<(), RemoteError>; + + #[command(subtree = ManyOverlappingGraftedRootGlobalsChild)] + fn many_overlapping_grafted_root_globals_child( + &self, + ) -> ManyOverlappingGraftedRootGlobalsSubtree; + } + + #[test] + fn many_overlapping_grafted_root_globals_build_when_one_is_deprojected() { + let tool = __golem_tool_descriptor_for_ManyOverlappingGraftedRootGlobalsParent( + &mut ToolBuildCtx::new(), + ) + .expect( + "a valid grafted child with many overlapping root globals should build when one child root global is de-projected", + ); + + let child = tool + .commands + .iter() + .find(|command| command.name == "many-overlapping-grafted-root-globals-child") + .expect("child subtree root is grafted"); + assert!( + !child + .globals + .options + .iter() + .any(|option| option.long == "g0"), + "the child root's duplicate g0 global is de-projected onto the parent root global" + ); + tool.try_to_tool().expect("composed tool is valid"); + } + + #[test] + fn optional_fixed_positional_before_required_fixed_positional_is_rejected() { + let output = cargo_test_tool_crate( "optional-before-required-positional", r#" use golem_rust::{tool_definition, tool_implementation, ToolError}; @@ -1246,7 +2693,7 @@ impl BadTool for BadToolImpl { assert!( !output.status.success(), - "an optional fixed positional before a required fixed positional should be rejected, but cargo check succeeded\nstdout:\n{}\nstderr:\n{}", + "an optional fixed positional before a required fixed positional should be rejected, but cargo test succeeded\nstdout:\n{}\nstderr:\n{}", String::from_utf8_lossy(&output.stdout), String::from_utf8_lossy(&output.stderr), ); @@ -2678,6 +4125,14 @@ impl BadTool for BadToolImpl { } fn cargo_check_tool_crate(name: &str, source: &str) -> std::process::Output { + cargo_tool_crate(name, source, "check") + } + + fn cargo_test_tool_crate(name: &str, source: &str) -> std::process::Output { + cargo_tool_crate(name, source, "test") + } + + fn cargo_tool_crate(name: &str, source: &str, command: &str) -> std::process::Output { let root = std::env::temp_dir().join(format!( "golem-rust-tool-{name}-{}-{}", std::process::id(), @@ -2712,12 +4167,14 @@ golem-rust = {{ path = {}, features = ["export_golem_agentic"] }} .expect("golem-rust crate should have an SDK workspace parent") .join("target"); let output = Command::new("cargo") - .arg("check") + .arg(command) .arg("--quiet") .env("CARGO_TARGET_DIR", target_dir) .current_dir(&root) .output() - .expect("failed to run cargo check for temporary tool crate"); + .unwrap_or_else(|error| { + panic!("failed to run cargo {command} for temporary tool crate: {error}") + }); fs::remove_dir_all(&root).unwrap_or_else(|error| { panic!( diff --git a/sdks/rust/golem-rust/tests/tool_canonical.rs b/sdks/rust/golem-rust/tests/tool_canonical.rs index a0b536de3c..bf32a20f04 100644 --- a/sdks/rust/golem-rust/tests/tool_canonical.rs +++ b/sdks/rust/golem-rust/tests/tool_canonical.rs @@ -458,7 +458,7 @@ mod canonical { use golem_rust::agentic::{ EffectiveCommandField, ExtendedConstraint, ExtendedOptionShape, ExtendedRef, ExtendedRepeatableListShape, ExtendedToolType, ExtendedValueIsLiteral, - get_extended_tool_by_name, get_tool_by_name, option_collected_graph, + get_extended_tool_by_name, get_tool_by_name, option_collected_graph, render_help, }; use golem_rust::golem_agentic::golem::tool::common::{ErrorKind, FlagShape, Repetition}; use golem_rust::schema::{SchemaType, SchemaValue}; @@ -523,6 +523,12 @@ mod canonical { Failed(String), } + #[derive(ToolError)] + enum StashError { + #[tool_error(kind = "usage-error", exit_code = 128)] + NoSuchStash { name: String }, + } + /// Stupid content tracker. #[tool_definition] trait Git { @@ -573,6 +579,14 @@ mod canonical { config: BTreeMap, ) -> RemoteSubtree; + /// Stash the changes in a dirty working directory away. Subtree with + /// an implicit body: `git stash` runs the `stash` body, while + /// `git stash pop` / `git stash apply` walk to the child commands. + #[command(subtree = Stash)] + #[arg(verbose = "global", short = 'v', kind = "count-flag", max = 3)] + #[arg(git_dir = "global", env = "GIT_DIR", default = ".git")] + fn stash(&self, verbose: u32, git_dir: PathBuf) -> StashSubtree; + /// Show commit logs. #[command(annotations(read_only = true, idempotent = true))] #[arg(max_count = "option", short = 'n', bounds = (0, i64::MAX))] @@ -655,6 +669,38 @@ mod canonical { ) -> Result<(), SetUrlError>; } + /// Placeholder return type for the `stash` subtree dispatcher. + struct StashSubtree; + + /// Subcommand subtree under `git stash`. The root carries an implicit + /// body (the `stash` method), so `git stash` runs the body while + /// `git stash pop` / `git stash apply` walk to the child commands. + #[tool_definition] + trait Stash { + /// Stash the changes in a dirty working directory away. + #[arg(message = "option", short = 'm', required = true)] + #[arg(keep_index = "flag", short = 'k', default = false)] + // `verbose` repeats the inherited `git stash` global; it is de-projected + // from the body when grafted under `git stash`. + #[arg(verbose, kind = "count-flag", max = 3)] + fn stash( + &self, + message: String, + keep_index: bool, + verbose: u32, + ) -> Result<(), StashError>; + + /// Remove and apply a single stashed state. + #[arg(name = "positional", required = false)] + #[arg(index = "option", short = 'i')] + fn pop(&self, name: Option, index: Option) -> Result<(), StashError>; + + /// Apply a single stashed state without removing it. + #[arg(name = "positional", required = false)] + #[arg(index = "option", short = 'i')] + fn apply(&self, name: Option, index: Option) -> Result<(), StashError>; + } + struct LeafGit; #[tool_implementation] @@ -690,6 +736,10 @@ mod canonical { RemoteSubtree } + fn stash(&self, _verbose: u32, _git_dir: PathBuf) -> StashSubtree { + StashSubtree + } + fn log( &self, _max_count: Option, @@ -1126,6 +1176,100 @@ mod canonical { ); } + #[test] + #[test_r::never_capture] + fn git_stash_subtree_has_implicit_body_and_children() { + let tool = git_tool(); + let stash_idx = child_index(&tool, 0, "stash"); + let stash = &tool.commands[stash_idx]; + + // §4.1 / §4.4: a command node may carry both a body and subcommands. + // `git stash` runs the implicit body; `git stash pop`/`apply` walk to + // the children. + assert!(stash.body.is_some(), "stash subtree root carries a body"); + let sub_names: Vec<&str> = stash + .subcommands + .iter() + .map(|&i| tool.commands[i as usize].name.as_str()) + .collect(); + assert!(sub_names.contains(&"pop")); + assert!(sub_names.contains(&"apply")); + + // The body carries its own `message` input and the `keep-index` flag. + let body = stash.body.as_ref().unwrap(); + let message = body + .options + .iter() + .find(|o| o.long == "message") + .expect("stash body has a message option"); + assert_eq!(message.short, Some('m')); + assert!(message.required); + assert!(body.flags.iter().any(|f| f.long == "keep-index")); + + // The parent globals (verbose count-flag, git-dir option) propagate + // onto the grafted root. + assert!(stash.globals.flags.iter().any(|f| f.long == "verbose")); + assert!(stash.globals.options.iter().any(|o| o.long == "git-dir")); + + // The body's own `verbose` (re-declaring the inherited count-flag + // global) is de-projected: it does not duplicate the inherited global. + assert!( + !body.flags.iter().any(|f| f.long == "verbose"), + "inherited verbose global must be suppressed from the stash body" + ); + + // D7 at the grafted-subtree root: canonical input field order is + // inherited globals (options then flags), then this body's options + // then flags — no duplicate `verbose`. + let fields = tool.canonical_input_fields(stash_idx); + let names: Vec<&str> = fields.iter().map(|f| f.name.as_str()).collect(); + assert_eq!( + names, + vec!["git-dir", "verbose", "message", "keep-index"], + "canonical input field order for the stash subtree root (D7)" + ); + + // Help at the stash path shows both the body inputs and Subcommands:. + let help = render_help(&tool, &["stash".to_string()]).expect("stash help"); + assert!( + help.contains("--message"), + "help shows the body option: {help}" + ); + assert!( + help.contains("--keep-index"), + "help shows the body flag: {help}" + ); + assert!( + help.contains("Subcommands:"), + "help lists the child commands: {help}" + ); + + // The `pop` child resolves under stash and has its own body. + let pop_idx = child_index(&tool, stash_idx, "pop"); + let pop = &tool.commands[pop_idx]; + assert!(pop.body.is_some(), "pop has its own body"); + + // The `pop` child inherits the stash subtree's propagating globals + // (git-dir option, verbose count-flag) on top of which its own body + // fields (name positional, index option) are layered — D7 below an + // implicit-body subtree root. + let pop_fields = tool.canonical_input_fields(pop_idx); + let pop_names: Vec<&str> = pop_fields.iter().map(|f| f.name.as_str()).collect(); + assert_eq!( + pop_names, + vec!["git-dir", "verbose", "name", "index"], + "canonical input field order for a child below an implicit-body subtree root (D7)" + ); + + // Help at the `stash pop` path resolves and shows the child's inputs. + let pop_help = render_help(&tool, &["stash".to_string(), "pop".to_string()]) + .expect("stash pop help"); + assert!( + pop_help.contains("--index"), + "pop help shows --index: {pop_help}" + ); + } + #[test] #[test_r::never_capture] fn git_builds_valid_wire_metadata() { From d3c5c3841bc34d8647bb366e00cccae70df80e44 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Mon, 29 Jun 2026 19:56:32 +0200 Subject: [PATCH 09/11] Fix --- golem-common/src/schema/tool/validation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/golem-common/src/schema/tool/validation.rs b/golem-common/src/schema/tool/validation.rs index a8485d35d1..dc70ca4035 100644 --- a/golem-common/src/schema/tool/validation.rs +++ b/golem-common/src/schema/tool/validation.rs @@ -1264,8 +1264,8 @@ fn map_schema_errors( /// well-formedness check walks, so it can seed pure-alias suppression. fn collect_structural_ref_ids(ty: &SchemaType, out: &mut HashSet) { match ty { - SchemaType::Ref { id, .. } if graph.lookup(id).is_none() => { - out.push(id.to_string()); + SchemaType::Ref { id, .. } => { + out.insert(id.clone()); } SchemaType::Record { fields, .. } => { for field in fields { From 1f60863e5eea83f79c94ada09d2af7ec73927e99 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Tue, 30 Jun 2026 05:35:56 +0200 Subject: [PATCH 10/11] Fix --- openapi/golem-registry-service.yaml | 105 ++++++++++++++++++ openapi/golem-service.yaml | 105 ++++++++++++++++++ openapi/golem-worker-service.yaml | 105 ++++++++++++++++++ .../src/agentic/extended_tool_type.rs | 26 ++++- .../tests/agentTemplateExports.test.ts | 4 +- 5 files changed, 339 insertions(+), 6 deletions(-) diff --git a/openapi/golem-registry-service.yaml b/openapi/golem-registry-service.yaml index e71b995a53..d89339520b 100644 --- a/openapi/golem-registry-service.yaml +++ b/openapi/golem-registry-service.yaml @@ -10419,6 +10419,61 @@ components: $ref: '#/components/schemas/MetadataEnvelope' NormalizedJsonValue: type: object + NumericBound: + type: object + oneOf: + - type: object + required: + - kind + - value + properties: + kind: + type: string + enum: + - signed + value: + type: integer + format: int64 + - type: object + required: + - kind + - value + properties: + kind: + type: string + enum: + - unsigned + value: + type: integer + format: uint64 + - type: object + required: + - kind + - value + properties: + kind: + type: string + enum: + - float-bits + value: + type: integer + format: uint64 + NumericRestrictions: + type: object + properties: + min: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericBound' + - nullable: true + max: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericBound' + - nullable: true + unit: + type: string + nullable: true OAuth2Provider: type: string enum: @@ -11700,6 +11755,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -11714,6 +11774,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -11728,6 +11793,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -11742,6 +11812,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -11756,6 +11831,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -11770,6 +11850,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -11784,6 +11869,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -11798,6 +11888,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -11812,6 +11907,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -11826,6 +11926,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object diff --git a/openapi/golem-service.yaml b/openapi/golem-service.yaml index 7771c178df..2ed8093295 100644 --- a/openapi/golem-service.yaml +++ b/openapi/golem-service.yaml @@ -11601,6 +11601,61 @@ components: - body NormalizedJsonValue: type: object + NumericBound: + type: object + oneOf: + - type: object + properties: + kind: + type: string + enum: + - signed + value: + type: integer + format: int64 + required: + - kind + - value + - type: object + properties: + kind: + type: string + enum: + - unsigned + value: + type: integer + format: uint64 + required: + - kind + - value + - type: object + properties: + kind: + type: string + enum: + - float-bits + value: + type: integer + format: uint64 + required: + - kind + - value + NumericRestrictions: + type: object + properties: + min: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericBound' + - nullable: true + max: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericBound' + - nullable: true + unit: + nullable: true + type: string OplogCursor: title: OplogCursor type: object @@ -13327,6 +13382,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' required: @@ -13341,6 +13401,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' required: @@ -13355,6 +13420,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' required: @@ -13369,6 +13439,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' required: @@ -13383,6 +13458,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' required: @@ -13397,6 +13477,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' required: @@ -13411,6 +13496,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' required: @@ -13425,6 +13515,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' required: @@ -13439,6 +13534,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' required: @@ -13453,6 +13553,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' required: diff --git a/openapi/golem-worker-service.yaml b/openapi/golem-worker-service.yaml index bcec2fe4b5..b8cabb1dd5 100644 --- a/openapi/golem-worker-service.yaml +++ b/openapi/golem-worker-service.yaml @@ -3675,6 +3675,61 @@ components: $ref: '#/components/schemas/MetadataEnvelope' NormalizedJsonValue: type: object + NumericBound: + type: object + oneOf: + - type: object + required: + - kind + - value + properties: + kind: + type: string + enum: + - signed + value: + type: integer + format: int64 + - type: object + required: + - kind + - value + properties: + kind: + type: string + enum: + - unsigned + value: + type: integer + format: uint64 + - type: object + required: + - kind + - value + properties: + kind: + type: string + enum: + - float-bits + value: + type: integer + format: uint64 + NumericRestrictions: + type: object + properties: + min: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericBound' + - nullable: true + max: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericBound' + - nullable: true + unit: + type: string + nullable: true OplogCursor: type: object title: OplogCursor @@ -5404,6 +5459,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -5418,6 +5478,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -5432,6 +5497,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -5446,6 +5516,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -5460,6 +5535,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -5474,6 +5554,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -5488,6 +5573,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -5502,6 +5592,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -5516,6 +5611,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object @@ -5530,6 +5630,11 @@ components: value: type: object properties: + restrictions: + nullable: true + allOf: + - $ref: '#/components/schemas/NumericRestrictions' + - nullable: true metadata: $ref: '#/components/schemas/MetadataEnvelope' - type: object diff --git a/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs index 7ac9fabb7f..f6cdcba99a 100644 --- a/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs +++ b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs @@ -4626,18 +4626,22 @@ mod tests { fn rich_leaf_secret_and_quota_identity_is_compared() { assert!(shapes_match( SchemaType::secret(SecretSpec { - category: Some("api-key".into()) + inner: Box::new(SchemaType::string()), + category: Some("api-key".into()), }), SchemaType::secret(SecretSpec { - category: Some("api-key".into()) + inner: Box::new(SchemaType::string()), + category: Some("api-key".into()), }), )); assert!(!shapes_match( SchemaType::secret(SecretSpec { - category: Some("api-key".into()) + inner: Box::new(SchemaType::string()), + category: Some("api-key".into()), }), SchemaType::secret(SecretSpec { - category: Some("oauth-token".into()) + inner: Box::new(SchemaType::string()), + category: Some("oauth-token".into()), }), )); assert!(!shapes_match( @@ -4650,6 +4654,20 @@ mod tests { )); } + #[test] + fn rich_leaf_secret_inner_identity_is_compared() { + assert!(!shapes_match( + SchemaType::secret(SecretSpec { + inner: Box::new(SchemaType::string()), + category: Some("api-key".into()), + }), + SchemaType::secret(SecretSpec { + inner: Box::new(SchemaType::u64()), + category: Some("api-key".into()), + }), + )); + } + #[test] fn rich_leaf_text_and_binary_identity_is_compared_but_other_bounds_ignored() { let text = |languages: Option<&[&str]>, regex: Option<&str>| { diff --git a/sdks/ts/packages/golem-ts-sdk/tests/agentTemplateExports.test.ts b/sdks/ts/packages/golem-ts-sdk/tests/agentTemplateExports.test.ts index a10ff43bfc..743a8cea3c 100644 --- a/sdks/ts/packages/golem-ts-sdk/tests/agentTemplateExports.test.ts +++ b/sdks/ts/packages/golem-ts-sdk/tests/agentTemplateExports.test.ts @@ -201,7 +201,7 @@ describe('agent template export wiring', () => { }); expect(formatted).toEqual([]); - }); + }, 15_000); it('review repro: getWithConfig rejects nested secret-only config override groups', () => { const packageRoot = fileURLToPath(new URL('..', import.meta.url)); @@ -268,7 +268,7 @@ describe('agent template export wiring', () => { }); expect(formatted).toEqual([]); - }); + }, 15_000); it('review repro: remote method Config parameters are injected and not caller supplied', () => { const packageRoot = fileURLToPath(new URL('..', import.meta.url)); From c1d16b55842c37ea52a2416f744e940d0c3dc042 Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Tue, 30 Jun 2026 09:18:35 +0200 Subject: [PATCH 11/11] fix --- .../rust/golem-rust/src/agentic/extended_tool_type.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs index f6cdcba99a..2e034f7f73 100644 --- a/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs +++ b/sdks/rust/golem-rust/src/agentic/extended_tool_type.rs @@ -3105,11 +3105,11 @@ fn schema_types_match( // Rust type — e.g. `Quantity` vs `Quantity`, which // share the `Quantity` discriminant but are not interchangeable values. // Identity here means the parts of the spec derived from the Rust type - // (not overlaid by `#[arg]`): the quantity unit set, the secret category, - // the quota-token resource, and the unstructured text languages / binary - // MIME sets. Pure validation restrictions (numeric/text/url bounds, path - // direction/kind — all `#[arg]`-refinable) stay ignored per this - // function's contract. + // (not overlaid by `#[arg]`): the quantity unit set, the secret payload + // type and category, the quota-token resource, and the unstructured text + // languages / binary MIME sets. Pure validation restrictions + // (numeric/text/url bounds, path direction/kind — all `#[arg]`-refinable) + // stay ignored per this function's contract. (SchemaType::Quantity { spec: sa, .. }, SchemaType::Quantity { spec: sb, .. }) => { sa.base_unit == sb.base_unit && str_sets_match( @@ -3119,6 +3119,7 @@ fn schema_types_match( } (SchemaType::Secret { spec: sa, .. }, SchemaType::Secret { spec: sb, .. }) => { sa.category == sb.category + && schema_types_match(a_graph, &sa.inner, b_graph, &sb.inner, next, visiting) } (SchemaType::QuotaToken { spec: sa, .. }, SchemaType::QuotaToken { spec: sb, .. }) => { sa.resource_name == sb.resource_name